foliko 1.0.85 → 1.0.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/.agent/agents/code-assistant.json +14 -0
  2. package/.agent/agents/email-assistant.json +14 -0
  3. package/.agent/agents/file-assistant.json +15 -0
  4. package/.agent/agents/system-assistant.json +15 -0
  5. package/.agent/agents/web-assistant.json +12 -0
  6. package/.agent/data/ambient/goals.json +50 -0
  7. package/.agent/data/ambient/memories.json +7 -0
  8. package/.agent/data/default.json +21 -311
  9. package/.agent/data/plugins-state.json +162 -174
  10. package/.agent/data/scheduler/tasks.json +1 -0
  11. package/.agent/data/weixin.json +6 -0
  12. package/.agent/mcp_config.json +1 -0
  13. package/.agent/package.json +8 -0
  14. package/.agent/plugins/__pycache__/test_plugin.cpython-312.pyc +0 -0
  15. package/.agent/plugins/daytona/README.md +89 -0
  16. package/.agent/plugins/daytona/index.js +377 -0
  17. package/.agent/plugins/daytona/package.json +12 -0
  18. package/.agent/plugins/marknative/README.md +134 -0
  19. package/.agent/plugins/marknative/index.js +228 -0
  20. package/.agent/plugins/marknative/package.json +12 -0
  21. package/.agent/plugins/marknative/update-readme.js +134 -0
  22. package/.agent/plugins/system-info/index.js +387 -0
  23. package/.agent/plugins/system-info/package.json +4 -0
  24. package/.agent/plugins/system-info/test.js +40 -0
  25. package/.agent/plugins/temp-repo/LICENSE +201 -0
  26. package/.agent/plugins/test_plugin.py +304 -0
  27. package/.agent/plugins.json +14 -5
  28. package/.agent/python-scripts/test_sample.py +24 -0
  29. package/.agent/skills/agent-browser/SKILL.md +311 -0
  30. package/.agent/skills/agent-browser/TEST_PLAN.md +200 -0
  31. package/.agent/skills/sysinfo/SKILL.md +38 -0
  32. package/.agent/skills/sysinfo/system-info.sh +130 -0
  33. package/.agent/skills/workflow/SKILL.md +324 -0
  34. package/.agent/workflows/email-digest.json +50 -0
  35. package/.agent/workflows/file-backup.json +21 -0
  36. package/.agent/workflows/get-ip-notify.json +32 -0
  37. package/.agent/workflows/news-aggregator.json +93 -0
  38. package/.agent/workflows/news-dashboard-v2.json +94 -0
  39. package/.agent/workflows/notification-batch.json +32 -0
  40. package/.claude/settings.local.json +8 -7
  41. package/.env.example +56 -56
  42. package/README.md +441 -441
  43. package/examples/test-chat-debug.js +102 -0
  44. package/examples/test-chat-result.js +76 -0
  45. package/examples/test-chat-stream-diff.js +63 -0
  46. package/examples/test-concurrent-chat.js +60 -0
  47. package/examples/test-long-chat.js +77 -0
  48. package/examples/test-session-chat.js +93 -0
  49. package/package.json +2 -2
  50. package/plugins/ambient-agent/EventWatcher.js +4 -4
  51. package/plugins/extension-executor-plugin.js +44 -1
  52. package/plugins/file-system-plugin.js +44 -5
  53. package/plugins/session-plugin.js +21 -0
  54. package/plugins/weixin-plugin.js +278 -29
  55. package/skills/find-skills/AGENTS.md +162 -162
  56. package/skills/find-skills/SKILL.md +133 -133
  57. package/skills/foliko-dev/SKILL.md +67 -0
  58. package/skills/python-plugin-dev/SKILL.md +238 -238
  59. package/src/core/agent-chat.js +106 -58
  60. package/src/core/agent.js +3 -61
  61. package/src/utils/index.js +1 -1
  62. package/.agent/.shared/ui-ux-pro-max/data/charts.csv +0 -26
  63. package/.agent/.shared/ui-ux-pro-max/data/colors.csv +0 -97
  64. package/.agent/.shared/ui-ux-pro-max/data/icons.csv +0 -101
  65. package/.agent/.shared/ui-ux-pro-max/data/landing.csv +0 -31
  66. package/.agent/.shared/ui-ux-pro-max/data/products.csv +0 -97
  67. package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +0 -24
  68. package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +0 -45
  69. package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  70. package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  71. package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  72. package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  73. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
  74. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  75. package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
  76. package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +0 -54
  77. package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  78. package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  79. package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  80. package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  81. package/.agent/.shared/ui-ux-pro-max/data/styles.csv +0 -59
  82. package/.agent/.shared/ui-ux-pro-max/data/typography.csv +0 -58
  83. package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +0 -101
  84. package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  85. package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +0 -31
  86. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  87. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  88. package/.agent/.shared/ui-ux-pro-max/scripts/core.py +0 -258
  89. package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +0 -1067
  90. package/.agent/.shared/ui-ux-pro-max/scripts/search.py +0 -106
  91. package/.agent/ARCHITECTURE.md +0 -288
  92. package/.agent/agents/ambient-agent.md +0 -57
  93. package/.agent/agents/debugger.md +0 -55
  94. package/.agent/agents/email-assistant.md +0 -49
  95. package/.agent/agents/file-manager.md +0 -42
  96. package/.agent/agents/python-developer.md +0 -60
  97. package/.agent/agents/scheduler.md +0 -59
  98. package/.agent/agents/web-developer.md +0 -45
  99. package/.agent/data/puppeteer-sessions/undefined.json +0 -6
  100. package/.agent/mcp_config_updated.json +0 -12
  101. package/.agent/rules/GEMINI.md +0 -273
  102. package/.agent/rules/allow-rule.md +0 -77
  103. package/.agent/rules/log-rule.md +0 -83
  104. package/.agent/rules/security-rule.md +0 -93
  105. package/.agent/scripts/auto_preview.py +0 -148
  106. package/.agent/scripts/checklist.py +0 -217
  107. package/.agent/scripts/session_manager.py +0 -120
  108. package/.agent/scripts/verify_all.py +0 -327
  109. package/.agent/skills/api-patterns/SKILL.md +0 -81
  110. package/.agent/skills/api-patterns/api-style.md +0 -42
  111. package/.agent/skills/api-patterns/auth.md +0 -24
  112. package/.agent/skills/api-patterns/documentation.md +0 -26
  113. package/.agent/skills/api-patterns/graphql.md +0 -41
  114. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  115. package/.agent/skills/api-patterns/response.md +0 -37
  116. package/.agent/skills/api-patterns/rest.md +0 -40
  117. package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  118. package/.agent/skills/api-patterns/security-testing.md +0 -122
  119. package/.agent/skills/api-patterns/trpc.md +0 -41
  120. package/.agent/skills/api-patterns/versioning.md +0 -22
  121. package/.agent/skills/app-builder/SKILL.md +0 -75
  122. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  123. package/.agent/skills/app-builder/feature-building.md +0 -53
  124. package/.agent/skills/app-builder/project-detection.md +0 -34
  125. package/.agent/skills/app-builder/scaffolding.md +0 -118
  126. package/.agent/skills/app-builder/tech-stack.md +0 -40
  127. package/.agent/skills/app-builder/templates/SKILL.md +0 -39
  128. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  129. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  130. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  131. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  132. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  133. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  134. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  135. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
  136. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
  137. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
  138. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
  139. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  140. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
  141. package/.agent/skills/architecture/SKILL.md +0 -55
  142. package/.agent/skills/architecture/context-discovery.md +0 -43
  143. package/.agent/skills/architecture/examples.md +0 -94
  144. package/.agent/skills/architecture/pattern-selection.md +0 -68
  145. package/.agent/skills/architecture/patterns-reference.md +0 -50
  146. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  147. package/.agent/skills/clean-code/SKILL.md +0 -201
  148. package/.agent/skills/doc.md +0 -177
  149. package/.agent/skills/frontend-design/SKILL.md +0 -418
  150. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  151. package/.agent/skills/frontend-design/color-system.md +0 -311
  152. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  153. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  154. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  155. package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
  156. package/.agent/skills/frontend-design/typography-system.md +0 -345
  157. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  158. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  159. package/.agent/skills/i18n-localization/SKILL.md +0 -154
  160. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  161. package/.agent/skills/mcp-builder/SKILL.md +0 -176
  162. package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
  163. package/.agent/workflows/brainstorm.md +0 -113
  164. package/.agent/workflows/create.md +0 -59
  165. package/.agent/workflows/debug.md +0 -103
  166. package/.agent/workflows/deploy.md +0 -176
  167. package/.agent/workflows/enhance.md +0 -63
  168. package/.agent/workflows/orchestrate.md +0 -237
  169. package/.agent/workflows/plan.md +0 -89
  170. package/.agent/workflows/preview.md +0 -81
  171. package/.agent/workflows/simple-test.md +0 -42
  172. package/.agent/workflows/status.md +0 -86
  173. package/.agent/workflows/structured-orchestrate.md +0 -180
  174. package/.agent/workflows/test.md +0 -144
  175. package/.agent/workflows/ui-ux-pro-max.md +0 -296
  176. /package/.agent/plugins/{puppeteer-plugin → temp-repo/puppeteer-plugin}/README.md +0 -0
  177. /package/.agent/plugins/{puppeteer-plugin → temp-repo/puppeteer-plugin}/index.js +0 -0
  178. /package/.agent/plugins/{puppeteer-plugin → temp-repo/puppeteer-plugin}/package.json +0 -0
@@ -1,162 +1,162 @@
1
- # AGENTS.md
2
-
3
- This file provides guidance to AI coding agents working on the `skills` CLI codebase.
4
-
5
- ## Project Overview
6
-
7
- `skills` is the CLI for the open agent skills ecosystem.
8
-
9
- ## Commands
10
-
11
- | Command | Description |
12
- | ----------------------------- | --------------------------------------------------- |
13
- | `skills` | Show banner with available commands |
14
- | `skills add <pkg>` | Install skills from git repos, URLs, or local paths |
15
- | `skills experimental_install` | Restore skills from skills-lock.json |
16
- | `skills experimental_sync` | Sync skills from node_modules into agent dirs |
17
- | `skills list` | List installed skills (alias: `ls`) |
18
- | `skills check` | Check for available skill updates |
19
- | `skills update` | Update all skills to latest versions |
20
- | `skills init [name]` | Create a new SKILL.md template |
21
-
22
- Aliases: `skills a` works for `add`. `skills i`, `skills install` (no args) restore from `skills-lock.json`. `skills ls` works for `list`. `skills experimental_install` restores from `skills-lock.json`. `skills experimental_sync` crawls `node_modules` for skills.
23
-
24
- ## Architecture
25
-
26
- ```
27
- src/
28
- ├── cli.ts # Main entry point, command routing, init/check/update
29
- ├── cli.test.ts # CLI tests
30
- ├── add.ts # Core add command logic
31
- ├── add.test.ts # Add command tests
32
- ├── list.ts # List installed skills command
33
- ├── list.test.ts # List command tests
34
- ├── agents.ts # Agent definitions and detection
35
- ├── installer.ts # Skill installation logic (symlink/copy) + listInstalledSkills
36
- ├── skills.ts # Skill discovery and parsing
37
- ├── skill-lock.ts # Global lock file management (~/.agents/.skill-lock.json)
38
- ├── local-lock.ts # Local lock file management (skills-lock.json, checked in)
39
- ├── sync.ts # Sync command - crawl node_modules for skills
40
- ├── source-parser.ts # Parse git URLs, GitHub shorthand, local paths
41
- ├── git.ts # Git clone operations
42
- ├── telemetry.ts # Anonymous usage tracking
43
- ├── types.ts # TypeScript types
44
- ├── mintlify.ts # Mintlify skill fetching (legacy)
45
- ├── providers/ # Remote skill providers (GitHub, HuggingFace, Mintlify)
46
- │ ├── index.ts
47
- │ ├── registry.ts
48
- │ ├── types.ts
49
- │ ├── huggingface.ts
50
- │ └── mintlify.ts
51
- ├── init.test.ts # Init command tests
52
- └── test-utils.ts # Test utilities
53
-
54
- tests/
55
- ├── sanitize-name.test.ts # Tests for sanitizeName (path traversal prevention)
56
- ├── skill-matching.test.ts # Tests for filterSkills (multi-word skill name matching)
57
- ├── source-parser.test.ts # Tests for URL/path parsing
58
- ├── installer-symlink.test.ts # Tests for symlink installation
59
- ├── list-installed.test.ts # Tests for listing installed skills
60
- ├── skill-path.test.ts # Tests for skill path handling
61
- ├── wellknown-provider.test.ts # Tests for well-known provider
62
- └── dist.test.ts # Tests for built distribution
63
- ```
64
-
65
- ## Update Checking System
66
-
67
- ### How `skills check` and `skills update` Work
68
-
69
- 1. Read `~/.agents/.skill-lock.json` for installed skills
70
- 2. For each skill, get `skillFolderHash` from lock file
71
- 3. POST to `https://add-skill.vercel.sh/check-updates` with:
72
- ```json
73
- {
74
- "skills": [{ "name": "...", "source": "...", "skillFolderHash": "..." }],
75
- "forceRefresh": true
76
- }
77
- ```
78
- 4. API fetches fresh content from GitHub, computes hash, compares
79
- 5. Returns list of skills with different hashes (updates available)
80
-
81
- ### Why `forceRefresh: true`?
82
-
83
- Both `check` and `update` always send `forceRefresh: true`. This ensures the API fetches fresh content from GitHub rather than using its Redis cache.
84
-
85
- **Without forceRefresh:** Users saw phantom "updates available" due to stale cached hashes. The fix was to always fetch fresh.
86
-
87
- **Tradeoff:** Slightly slower (GitHub API call per skill), but always accurate.
88
-
89
- ### Lock File Compatibility
90
-
91
- The lock file format is v3. Key field: `skillFolderHash` (GitHub tree SHA for the skill folder).
92
-
93
- If reading an older lock file version, it's wiped. Users must reinstall skills to populate the new format.
94
-
95
- ## Key Integration Points
96
-
97
- | Feature | Implementation |
98
- | -------------------------- | ------------------------------------------- |
99
- | `skills add` | `src/add.ts` - full implementation |
100
- | `skills experimental_sync` | `src/sync.ts` - crawl node_modules |
101
- | `skills check` | `POST /check-updates` API |
102
- | `skills update` | `POST /check-updates` + reinstall per skill |
103
-
104
- ## Development
105
-
106
- ```bash
107
- # Install dependencies
108
- pnpm install
109
-
110
- # Build
111
- pnpm build
112
-
113
- # Test locally
114
- pnpm dev add vercel-labs/agent-skills --list
115
- pnpm dev experimental_sync
116
- pnpm dev check
117
- pnpm dev update
118
- pnpm dev init my-skill
119
-
120
- # Run all tests
121
- pnpm test
122
-
123
- # Run specific test file(s)
124
- pnpm test tests/sanitize-name.test.ts
125
- pnpm test tests/skill-matching.test.ts tests/source-parser.test.ts
126
-
127
- # Type check
128
- pnpm type-check
129
-
130
- # Format code
131
- pnpm format
132
- ```
133
-
134
- ## Code Style
135
-
136
- This project uses Prettier for code formatting. **Always run `pnpm format` before committing changes** to ensure consistent formatting.
137
-
138
- ```bash
139
- # Format all files
140
- pnpm format
141
-
142
- # Check formatting without fixing
143
- pnpm prettier --check .
144
- ```
145
-
146
- CI will fail if code is not properly formatted.
147
-
148
- ## Publishing
149
-
150
- ```bash
151
- # 1. Bump version in package.json
152
- # 2. Build
153
- pnpm build
154
- # 3. Publish
155
- npm publish
156
- ```
157
-
158
- ## Adding a New Agent
159
-
160
- 1. Add the agent definition to `src/agents.ts`
161
- 2. Run `pnpm run -C scripts validate-agents.ts` to validate
162
- 3. Run `pnpm run -C scripts sync-agents.ts` to update README.md
1
+ # AGENTS.md
2
+
3
+ This file provides guidance to AI coding agents working on the `skills` CLI codebase.
4
+
5
+ ## Project Overview
6
+
7
+ `skills` is the CLI for the open agent skills ecosystem.
8
+
9
+ ## Commands
10
+
11
+ | Command | Description |
12
+ | ----------------------------- | --------------------------------------------------- |
13
+ | `skills` | Show banner with available commands |
14
+ | `skills add <pkg>` | Install skills from git repos, URLs, or local paths |
15
+ | `skills experimental_install` | Restore skills from skills-lock.json |
16
+ | `skills experimental_sync` | Sync skills from node_modules into agent dirs |
17
+ | `skills list` | List installed skills (alias: `ls`) |
18
+ | `skills check` | Check for available skill updates |
19
+ | `skills update` | Update all skills to latest versions |
20
+ | `skills init [name]` | Create a new SKILL.md template |
21
+
22
+ Aliases: `skills a` works for `add`. `skills i`, `skills install` (no args) restore from `skills-lock.json`. `skills ls` works for `list`. `skills experimental_install` restores from `skills-lock.json`. `skills experimental_sync` crawls `node_modules` for skills.
23
+
24
+ ## Architecture
25
+
26
+ ```
27
+ src/
28
+ ├── cli.ts # Main entry point, command routing, init/check/update
29
+ ├── cli.test.ts # CLI tests
30
+ ├── add.ts # Core add command logic
31
+ ├── add.test.ts # Add command tests
32
+ ├── list.ts # List installed skills command
33
+ ├── list.test.ts # List command tests
34
+ ├── agents.ts # Agent definitions and detection
35
+ ├── installer.ts # Skill installation logic (symlink/copy) + listInstalledSkills
36
+ ├── skills.ts # Skill discovery and parsing
37
+ ├── skill-lock.ts # Global lock file management (~/.agents/.skill-lock.json)
38
+ ├── local-lock.ts # Local lock file management (skills-lock.json, checked in)
39
+ ├── sync.ts # Sync command - crawl node_modules for skills
40
+ ├── source-parser.ts # Parse git URLs, GitHub shorthand, local paths
41
+ ├── git.ts # Git clone operations
42
+ ├── telemetry.ts # Anonymous usage tracking
43
+ ├── types.ts # TypeScript types
44
+ ├── mintlify.ts # Mintlify skill fetching (legacy)
45
+ ├── providers/ # Remote skill providers (GitHub, HuggingFace, Mintlify)
46
+ │ ├── index.ts
47
+ │ ├── registry.ts
48
+ │ ├── types.ts
49
+ │ ├── huggingface.ts
50
+ │ └── mintlify.ts
51
+ ├── init.test.ts # Init command tests
52
+ └── test-utils.ts # Test utilities
53
+
54
+ tests/
55
+ ├── sanitize-name.test.ts # Tests for sanitizeName (path traversal prevention)
56
+ ├── skill-matching.test.ts # Tests for filterSkills (multi-word skill name matching)
57
+ ├── source-parser.test.ts # Tests for URL/path parsing
58
+ ├── installer-symlink.test.ts # Tests for symlink installation
59
+ ├── list-installed.test.ts # Tests for listing installed skills
60
+ ├── skill-path.test.ts # Tests for skill path handling
61
+ ├── wellknown-provider.test.ts # Tests for well-known provider
62
+ └── dist.test.ts # Tests for built distribution
63
+ ```
64
+
65
+ ## Update Checking System
66
+
67
+ ### How `skills check` and `skills update` Work
68
+
69
+ 1. Read `~/.agents/.skill-lock.json` for installed skills
70
+ 2. For each skill, get `skillFolderHash` from lock file
71
+ 3. POST to `https://add-skill.vercel.sh/check-updates` with:
72
+ ```json
73
+ {
74
+ "skills": [{ "name": "...", "source": "...", "skillFolderHash": "..." }],
75
+ "forceRefresh": true
76
+ }
77
+ ```
78
+ 4. API fetches fresh content from GitHub, computes hash, compares
79
+ 5. Returns list of skills with different hashes (updates available)
80
+
81
+ ### Why `forceRefresh: true`?
82
+
83
+ Both `check` and `update` always send `forceRefresh: true`. This ensures the API fetches fresh content from GitHub rather than using its Redis cache.
84
+
85
+ **Without forceRefresh:** Users saw phantom "updates available" due to stale cached hashes. The fix was to always fetch fresh.
86
+
87
+ **Tradeoff:** Slightly slower (GitHub API call per skill), but always accurate.
88
+
89
+ ### Lock File Compatibility
90
+
91
+ The lock file format is v3. Key field: `skillFolderHash` (GitHub tree SHA for the skill folder).
92
+
93
+ If reading an older lock file version, it's wiped. Users must reinstall skills to populate the new format.
94
+
95
+ ## Key Integration Points
96
+
97
+ | Feature | Implementation |
98
+ | -------------------------- | ------------------------------------------- |
99
+ | `skills add` | `src/add.ts` - full implementation |
100
+ | `skills experimental_sync` | `src/sync.ts` - crawl node_modules |
101
+ | `skills check` | `POST /check-updates` API |
102
+ | `skills update` | `POST /check-updates` + reinstall per skill |
103
+
104
+ ## Development
105
+
106
+ ```bash
107
+ # Install dependencies
108
+ pnpm install
109
+
110
+ # Build
111
+ pnpm build
112
+
113
+ # Test locally
114
+ pnpm dev add vercel-labs/agent-skills --list
115
+ pnpm dev experimental_sync
116
+ pnpm dev check
117
+ pnpm dev update
118
+ pnpm dev init my-skill
119
+
120
+ # Run all tests
121
+ pnpm test
122
+
123
+ # Run specific test file(s)
124
+ pnpm test tests/sanitize-name.test.ts
125
+ pnpm test tests/skill-matching.test.ts tests/source-parser.test.ts
126
+
127
+ # Type check
128
+ pnpm type-check
129
+
130
+ # Format code
131
+ pnpm format
132
+ ```
133
+
134
+ ## Code Style
135
+
136
+ This project uses Prettier for code formatting. **Always run `pnpm format` before committing changes** to ensure consistent formatting.
137
+
138
+ ```bash
139
+ # Format all files
140
+ pnpm format
141
+
142
+ # Check formatting without fixing
143
+ pnpm prettier --check .
144
+ ```
145
+
146
+ CI will fail if code is not properly formatted.
147
+
148
+ ## Publishing
149
+
150
+ ```bash
151
+ # 1. Bump version in package.json
152
+ # 2. Build
153
+ pnpm build
154
+ # 3. Publish
155
+ npm publish
156
+ ```
157
+
158
+ ## Adding a New Agent
159
+
160
+ 1. Add the agent definition to `src/agents.ts`
161
+ 2. Run `pnpm run -C scripts validate-agents.ts` to validate
162
+ 3. Run `pnpm run -C scripts sync-agents.ts` to update README.md
@@ -1,133 +1,133 @@
1
- ---
2
- name: find-skills
3
- description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
4
- ---
5
-
6
- # Find Skills
7
-
8
- This skill helps you discover and install skills from the open agent skills ecosystem.
9
-
10
- ## When to Use This Skill
11
-
12
- Use this skill when the user:
13
-
14
- - Asks "how do I do X" where X might be a common task with an existing skill
15
- - Says "find a skill for X" or "is there a skill for X"
16
- - Asks "can you do X" where X is a specialized capability
17
- - Expresses interest in extending agent capabilities
18
- - Wants to search for tools, templates, or workflows
19
- - Mentions they wish they had help with a specific domain (design, testing, deployment, etc.)
20
-
21
- ## What is the Skills CLI?
22
-
23
- The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools.
24
-
25
- **Key commands:**
26
-
27
- - `npx skills find [query]` - Search for skills interactively or by keyword
28
- - `npx skills add <package>` - Install a skill from GitHub or other sources
29
- - `npx skills check` - Check for skill updates
30
- - `npx skills update` - Update all installed skills
31
-
32
- **Browse skills at:** https://skills.sh/
33
-
34
- ## How to Help Users Find Skills
35
-
36
- ### Step 1: Understand What They Need
37
-
38
- When a user asks for help with something, identify:
39
-
40
- 1. The domain (e.g., React, testing, design, deployment)
41
- 2. The specific task (e.g., writing tests, creating animations, reviewing PRs)
42
- 3. Whether this is a common enough task that a skill likely exists
43
-
44
- ### Step 2: Search for Skills
45
-
46
- Run the find command with a relevant query:
47
-
48
- ```bash
49
- npx skills find [query]
50
- ```
51
-
52
- For example:
53
-
54
- - User asks "how do I make my React app faster?" → `npx skills find react performance`
55
- - User asks "can you help me with PR reviews?" → `npx skills find pr review`
56
- - User asks "I need to create a changelog" → `npx skills find changelog`
57
-
58
- The command will return results like:
59
-
60
- ```
61
- Install with npx skills add <owner/repo@skill>
62
-
63
- vercel-labs/agent-skills@vercel-react-best-practices
64
- └ https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
65
- ```
66
-
67
- ### Step 3: Present Options to the User
68
-
69
- When you find relevant skills, present them to the user with:
70
-
71
- 1. The skill name and what it does
72
- 2. The install command they can run
73
- 3. A link to learn more at skills.sh
74
-
75
- Example response:
76
-
77
- ```
78
- I found a skill that might help! The "vercel-react-best-practices" skill provides
79
- React and Next.js performance optimization guidelines from Vercel Engineering.
80
-
81
- To install it:
82
- npx skills add vercel-labs/agent-skills@vercel-react-best-practices
83
-
84
- Learn more: https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
85
- ```
86
-
87
- ### Step 4: Offer to Install
88
-
89
- If the user wants to proceed, you can install the skill for them:
90
-
91
- ```bash
92
- npx skills add <owner/repo@skill> -g -y
93
- ```
94
-
95
- The `-g` flag installs globally (user-level) and `-y` skips confirmation prompts.
96
-
97
- ## Common Skill Categories
98
-
99
- When searching, consider these common categories:
100
-
101
- | Category | Example Queries |
102
- | --------------- | ---------------------------------------- |
103
- | Web Development | react, nextjs, typescript, css, tailwind |
104
- | Testing | testing, jest, playwright, e2e |
105
- | DevOps | deploy, docker, kubernetes, ci-cd |
106
- | Documentation | docs, readme, changelog, api-docs |
107
- | Code Quality | review, lint, refactor, best-practices |
108
- | Design | ui, ux, design-system, accessibility |
109
- | Productivity | workflow, automation, git |
110
-
111
- ## Tips for Effective Searches
112
-
113
- 1. **Use specific keywords**: "react testing" is better than just "testing"
114
- 2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd"
115
- 3. **Check popular sources**: Many skills come from `vercel-labs/agent-skills` or `ComposioHQ/awesome-claude-skills`
116
-
117
- ## When No Skills Are Found
118
-
119
- If no relevant skills exist:
120
-
121
- 1. Acknowledge that no existing skill was found
122
- 2. Offer to help with the task directly using your general capabilities
123
- 3. Suggest the user could create their own skill with `npx skills init`
124
-
125
- Example:
126
-
127
- ```
128
- I searched for skills related to "xyz" but didn't find any matches.
129
- I can still help you with this task directly! Would you like me to proceed?
130
-
131
- If this is something you do often, you could create your own skill:
132
- npx skills init my-xyz-skill
133
- ```
1
+ ---
2
+ name: find-skills
3
+ description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
4
+ ---
5
+
6
+ # Find Skills
7
+
8
+ This skill helps you discover and install skills from the open agent skills ecosystem.
9
+
10
+ ## When to Use This Skill
11
+
12
+ Use this skill when the user:
13
+
14
+ - Asks "how do I do X" where X might be a common task with an existing skill
15
+ - Says "find a skill for X" or "is there a skill for X"
16
+ - Asks "can you do X" where X is a specialized capability
17
+ - Expresses interest in extending agent capabilities
18
+ - Wants to search for tools, templates, or workflows
19
+ - Mentions they wish they had help with a specific domain (design, testing, deployment, etc.)
20
+
21
+ ## What is the Skills CLI?
22
+
23
+ The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools.
24
+
25
+ **Key commands:**
26
+
27
+ - `npx skills find [query]` - Search for skills interactively or by keyword
28
+ - `npx skills add <package>` - Install a skill from GitHub or other sources
29
+ - `npx skills check` - Check for skill updates
30
+ - `npx skills update` - Update all installed skills
31
+
32
+ **Browse skills at:** https://skills.sh/
33
+
34
+ ## How to Help Users Find Skills
35
+
36
+ ### Step 1: Understand What They Need
37
+
38
+ When a user asks for help with something, identify:
39
+
40
+ 1. The domain (e.g., React, testing, design, deployment)
41
+ 2. The specific task (e.g., writing tests, creating animations, reviewing PRs)
42
+ 3. Whether this is a common enough task that a skill likely exists
43
+
44
+ ### Step 2: Search for Skills
45
+
46
+ Run the find command with a relevant query:
47
+
48
+ ```bash
49
+ npx skills find [query]
50
+ ```
51
+
52
+ For example:
53
+
54
+ - User asks "how do I make my React app faster?" → `npx skills find react performance`
55
+ - User asks "can you help me with PR reviews?" → `npx skills find pr review`
56
+ - User asks "I need to create a changelog" → `npx skills find changelog`
57
+
58
+ The command will return results like:
59
+
60
+ ```
61
+ Install with npx skills add <owner/repo@skill>
62
+
63
+ vercel-labs/agent-skills@vercel-react-best-practices
64
+ └ https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
65
+ ```
66
+
67
+ ### Step 3: Present Options to the User
68
+
69
+ When you find relevant skills, present them to the user with:
70
+
71
+ 1. The skill name and what it does
72
+ 2. The install command they can run
73
+ 3. A link to learn more at skills.sh
74
+
75
+ Example response:
76
+
77
+ ```
78
+ I found a skill that might help! The "vercel-react-best-practices" skill provides
79
+ React and Next.js performance optimization guidelines from Vercel Engineering.
80
+
81
+ To install it:
82
+ npx skills add vercel-labs/agent-skills@vercel-react-best-practices
83
+
84
+ Learn more: https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
85
+ ```
86
+
87
+ ### Step 4: Offer to Install
88
+
89
+ If the user wants to proceed, you can install the skill for them:
90
+
91
+ ```bash
92
+ npx skills add <owner/repo@skill> -g -y
93
+ ```
94
+
95
+ The `-g` flag installs globally (user-level) and `-y` skips confirmation prompts.
96
+
97
+ ## Common Skill Categories
98
+
99
+ When searching, consider these common categories:
100
+
101
+ | Category | Example Queries |
102
+ | --------------- | ---------------------------------------- |
103
+ | Web Development | react, nextjs, typescript, css, tailwind |
104
+ | Testing | testing, jest, playwright, e2e |
105
+ | DevOps | deploy, docker, kubernetes, ci-cd |
106
+ | Documentation | docs, readme, changelog, api-docs |
107
+ | Code Quality | review, lint, refactor, best-practices |
108
+ | Design | ui, ux, design-system, accessibility |
109
+ | Productivity | workflow, automation, git |
110
+
111
+ ## Tips for Effective Searches
112
+
113
+ 1. **Use specific keywords**: "react testing" is better than just "testing"
114
+ 2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd"
115
+ 3. **Check popular sources**: Many skills come from `vercel-labs/agent-skills` or `ComposioHQ/awesome-claude-skills`
116
+
117
+ ## When No Skills Are Found
118
+
119
+ If no relevant skills exist:
120
+
121
+ 1. Acknowledge that no existing skill was found
122
+ 2. Offer to help with the task directly using your general capabilities
123
+ 3. Suggest the user could create their own skill with `npx skills init`
124
+
125
+ Example:
126
+
127
+ ```
128
+ I searched for skills related to "xyz" but didn't find any matches.
129
+ I can still help you with this task directly! Would you like me to proceed?
130
+
131
+ If this is something you do often, you could create your own skill:
132
+ npx skills init my-xyz-skill
133
+ ```
@@ -561,3 +561,70 @@ start(framework) {
561
561
  | `description` | string | 详细描述 |
562
562
  | `tools` | object | 自定义工具 `{ name: toolDef }`,只属于此子Agent |
563
563
  | `parentTools` | array | 从父Agent继承的工具名称列表 |
564
+
565
+ ---
566
+
567
+ ## 访问其他插件
568
+
569
+ ### 获取插件实例
570
+
571
+ 在插件中通过 `pluginManager.get()` 访问其他插件:
572
+
573
+ ```javascript
574
+ install(framework) {
575
+ // 访问 storage 插件
576
+ const storage = this._framework.pluginManager.get('storage')
577
+
578
+ // 访问 session 插件
579
+ const session = this._framework.pluginManager.get('session')
580
+
581
+ // 访问 audit 插件
582
+ const audit = this._framework.pluginManager.get('audit')
583
+ }
584
+ ```
585
+
586
+ ### 可访问的系统插件
587
+
588
+ | 插件名 | 说明 | 可用方法 |
589
+ | ------------- | ---------- | -------------------------------------------- |
590
+ | `storage` | 键值对存储 | `get(key)`, `set(key, value)`, `delete(key)` |
591
+ | `session` | 会话管理 | `getSession(id)`, `getHistory(id)` |
592
+ | `audit` | 审计日志 | `log(type, data)` |
593
+ | `scheduler` | 定时任务 | `addTask()`, `removeTask()` |
594
+ | `file-system` | 文件操作 | 工具已注册: `read_file`, `write_file` |
595
+ | `tools` | 工具管理 | `list()`, `reload()` |
596
+ | `ai` | AI 配置 | `getAIClient()` |
597
+
598
+ ### Storage 插件 API
599
+
600
+ ```javascript
601
+ // 在 install/start 中获取 storage
602
+ const storage = this._framework.pluginManager.get('storage');
603
+
604
+ // 方式1:通过工具调用(推荐)
605
+ // storage_get({ key: 'xxx', namespace: 'yyy' })
606
+ // storage_set({ key: 'xxx', value: {...}, namespace: 'yyy' })
607
+ // storage_delete({ key: 'xxx', namespace: 'yyy' })
608
+ // storage_list({ namespace: 'yyy' })
609
+ // storage_clear({ namespace: 'yyy' })
610
+
611
+ // 方式2:直接调用内部方法
612
+ const value = storage.getStore().get('key'); // 获取 Map
613
+ storage.setDirect('key', value); // 设置并持久化
614
+ storage.deleteDirect('key'); // 删除并持久化
615
+ ```
616
+
617
+ ### Session 插件 API
618
+
619
+ ```javascript
620
+ const session = this._framework.pluginManager.get('session');
621
+
622
+ // 获取会话
623
+ const sess = session.getSession(sessionId);
624
+
625
+ // 获取历史消息
626
+ const messages = session.getHistory(sessionId);
627
+
628
+ // 添加消息
629
+ session.addMessage(sessionId, { role: 'user', content: 'hello' });
630
+ ```