Skip to content

Commit 8ba1f51

Browse files
committed
feat: add uni-app template skills
1 parent be86eac commit 8ba1f51

File tree

158 files changed

+29648
-1606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+29648
-1606
lines changed

eslint.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export default icebreaker(
2525
'**/test-*/**',
2626
'benchmark/**',
2727
'.claude/**',
28+
'.agents/**',
29+
'**/.agents/**',
2830
'.codex/**',
2931
'skills/**',
3032
// 忽略 apps 中生成的 CSS 和类型声明

lint-staged.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export default {
22
'**/*.{js,jsx,mjs,ts,tsx,mts,vue}': [
3-
'eslint --fix',
3+
'eslint --fix --ignore-pattern .agents/** --ignore-pattern **/.agents/**',
44
],
55
'**/*.{json,md,mdx,css,html,yml,yaml,scss}': [
6-
'eslint --fix',
6+
'eslint --fix --ignore-pattern .agents/** --ignore-pattern **/.agents/**',
77
],
88
// for rust
99
// '*.rs': ['cargo fmt --'],
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Generation Info
2+
3+
- **Source:** `sources/uniapp`
4+
- **Git SHA:** `91423a240a5b0714fc5e7e13bd3f93a79b8cc8d7`
5+
- **Generated:** 2026-01-30
6+
7+
## Generated Skills
8+
9+
| Category | File | Description |
10+
|----------|------|-------------|
11+
| Core | core-framework.md | Framework basics, platform support, condition compilation |
12+
| Core | core-view-components.md | Container components: view, scroll-view, swiper, movable-area |
13+
| Core | core-form-components.md | Form controls: input, textarea, picker, checkbox, radio |
14+
| Features | feature-media-components.md | Media: image, video, camera, map, live-player |
15+
| Features | feature-navigation.md | Navigation: navigator, routing APIs |
16+
| Features | feature-network.md | Network: request, upload, download, WebSocket |
17+
| Features | feature-storage.md | Storage: localStorage, file system |
18+
| Features | feature-system-info.md | System: device info, network, screen, vibration |
19+
| Features | feature-file-operations.md | Files: image/video selection, file operations |
20+
| Features | feature-location.md | Location: geolocation, map component |
21+
| Features | feature-ui-feedback.md | UI: toast, modal, loading, action sheet |
22+
| Features | feature-lifecycle.md | Lifecycle: app and page hooks |
23+
| Config | config-pages.md | pages.json configuration |
24+
| Config | config-manifest.md | manifest.json configuration |
25+
26+
## Source Documentation Structure
27+
28+
```
29+
sources/uniapp/docs/
30+
├── README.md # Framework overview
31+
├── api/ # API documentation
32+
│ ├── README.md # API overview
33+
│ ├── request/ # Network APIs
34+
│ ├── storage/ # Storage APIs
35+
│ ├── media/ # Media APIs
36+
│ ├── file/ # File APIs
37+
│ ├── location/ # Location APIs
38+
│ ├── ui/ # UI APIs
39+
│ └── system/ # System APIs
40+
├── component/ # Component documentation
41+
├── collocation/ # Configuration
42+
│ ├── pages.md # pages.json
43+
│ ├── manifest.md # manifest.json
44+
│ └── manifest-app.md # App-specific manifest
45+
├── tutorial/ # Tutorials
46+
└── quickstart.md # Getting started
47+
```
48+
49+
## Notes
50+
51+
- Skills focus on practical usage patterns and code examples
52+
- Platform-specific differences are highlighted where relevant
53+
- Configuration files include common use cases for each platform
54+
- API skills include both callback and Promise usage patterns
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
name: uni-app
3+
description: Comprehensive skill reference for uni-app cross-platform development framework
4+
metadata:
5+
author: FlippeDround
6+
version: "2026.1.30"
7+
source: Generated from https://gitcode.com/dcloud/unidocs-zh, skills located at https://github.com/antfu/skills
8+
---
9+
10+
> The skill is based on uni-app documentation, generated at 2026-01-30.
11+
12+
uni-app is a Vue.js-based cross-platform framework for developing applications that run on iOS, Android, HarmonyOS, Web (responsive), and various mini-program platforms (WeChat/Alipay/Baidu/Douyin/Feishu/QQ/Kuaishou/DingTalk/Taobao/Jingdong/Xiaohongshu).
13+
14+
## Core
15+
16+
| Topic | Description | Reference |
17+
|-------|-------------|-----------|
18+
| Core Framework | Project structure, platform support, condition compilation | [core-framework](references/core-framework.md) |
19+
| View Components | view, scroll-view, swiper, movable-area, cover-view | [core-view-components](references/core-view-components.md) |
20+
| Form Components | input, textarea, picker, checkbox, radio, switch, slider | [core-form-components](references/core-form-components.md) |
21+
22+
## Features
23+
24+
### UI Components
25+
26+
| Topic | Description | Reference |
27+
|-------|-------------|-----------|
28+
| Media Components | image, video, camera, live-player, map | [feature-media-components](references/feature-media-components.md) |
29+
| Navigation | navigator, routing, page navigation | [feature-navigation](references/feature-navigation.md) |
30+
| UI Feedback | toast, modal, loading, action sheet, pull refresh | [feature-ui-feedback](references/feature-ui-feedback.md) |
31+
32+
### APIs
33+
34+
| Topic | Description | Reference |
35+
|-------|-------------|-----------|
36+
| Network | HTTP requests, file upload/download, WebSocket | [feature-network](references/feature-network.md) |
37+
| Storage | Local storage, file system, caching | [feature-storage](references/feature-storage.md) |
38+
| System Info | Device info, network status, screen, vibration | [feature-system-info](references/feature-system-info.md) |
39+
| File Operations | Image/video selection, file system operations | [feature-file-operations](references/feature-file-operations.md) |
40+
| Location | Geolocation, map component, address selection | [feature-location](references/feature-location.md) |
41+
| Lifecycle | App and page lifecycle hooks | [feature-lifecycle](references/feature-lifecycle.md) |
42+
43+
## Configuration
44+
45+
| Topic | Description | Reference |
46+
|-------|-------------|-----------|
47+
| pages.json | Page routing, tab bar, global styles, sub-packages | [config-pages](references/config-pages.md) |
48+
| manifest.json | App config, permissions, platform settings | [config-manifest](references/config-manifest.md) |
49+
50+
## Platform Support
51+
52+
| Platform | Support Level |
53+
|----------|---------------|
54+
| iOS App | Full support |
55+
| Android App | Full support |
56+
| HarmonyOS Next | Full support |
57+
| H5/Web | Full support |
58+
| WeChat Mini Program | Full support |
59+
| Alipay Mini Program | Full support |
60+
| Baidu Smart Program | Full support |
61+
| Douyin Mini Program | Full support |
62+
| QQ Mini Program | Full support |
63+
| Kuaishou Mini Program | Full support |
64+
| Feishu Mini Program | Full support |
65+
| JD Mini Program | Full support |
66+
| HarmonyOS Meta Service | Full support |
67+
68+
## Key Concepts
69+
70+
### Condition Compilation
71+
72+
Use special comments to write platform-specific code:
73+
74+
```vue
75+
<!-- #ifdef APP-PLUS -->
76+
<view>App only</view>
77+
<!-- #endif -->
78+
79+
<!-- #ifdef MP-WEIXIN -->
80+
<view>WeChat only</view>
81+
<!-- #endif -->
82+
```
83+
84+
### API Promise Support
85+
86+
Most uni-app APIs support Promise when no callback is provided:
87+
88+
```javascript
89+
const res = await uni.request({ url: 'https://api.example.com' })
90+
```
91+
92+
### Cross-Platform Best Practices
93+
94+
1. Use uni-app components and APIs instead of platform-specific ones
95+
2. Use condition compilation for platform-specific features
96+
3. Test on all target platforms
97+
4. Use rpx for responsive layouts
98+
5. Handle platform differences in manifest.json
99+
6. must use uni-helper tools
100+
101+
102+
### MCP扩展
103+
104+
当需要查询 uni-app 官方文档时,优先调用 `search-docs-by-Uniapp-official` MCP 工具搜索相关 API 文档和使用示例。
105+
106+
**使用场景:**
107+
- 用户询问特定 API 的详细用法
108+
- 需要官方文档中的代码示例
109+
- 查询组件的属性和事件
110+
- 了解 API 的平台兼容性
111+
112+
**工具安装:**
113+
如果检测到该 MCP 工具不可用,引导用户访问 https://github.com/uni-helper/mcp 进行安装。

0 commit comments

Comments
 (0)