skill-flow 1.0.0 → 1.0.2
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.
- package/.gstack/browse-network.log +1 -0
- package/.gstack/browse.json +7 -0
- package/.gstack/qa-reports/base-branch.txt +1 -0
- package/.gstack/qa-reports/qa-report-skill-flow-cli-2026-03-22.md +159 -0
- package/.gstack/qa-reports/qa-report-skill-manager-2026-03-22.md +60 -0
- package/README.md +58 -4
- package/README.zh.md +58 -4
- package/dist/cli.js +51 -9
- package/dist/cli.js.map +1 -1
- package/dist/domain/types.d.ts +34 -2
- package/dist/services/deployment-applier.js +6 -0
- package/dist/services/deployment-applier.js.map +1 -1
- package/dist/services/deployment-planner.d.ts +5 -0
- package/dist/services/deployment-planner.js +205 -31
- package/dist/services/deployment-planner.js.map +1 -1
- package/dist/services/doctor-service.js +13 -0
- package/dist/services/doctor-service.js.map +1 -1
- package/dist/services/inventory-service.d.ts +1 -1
- package/dist/services/inventory-service.js +4 -2
- package/dist/services/inventory-service.js.map +1 -1
- package/dist/services/skill-flow.d.ts +34 -2
- package/dist/services/skill-flow.js +360 -5
- package/dist/services/skill-flow.js.map +1 -1
- package/dist/services/source-service.d.ts +10 -1
- package/dist/services/source-service.js +192 -34
- package/dist/services/source-service.js.map +1 -1
- package/dist/state/store.d.ts +6 -1
- package/dist/state/store.js +19 -2
- package/dist/state/store.js.map +1 -1
- package/dist/tests/skill-flow.test.js.map +1 -1
- package/dist/tui/config-app.d.ts +2 -2
- package/dist/tui/config-app.js +76 -8
- package/dist/tui/config-app.js.map +1 -1
- package/dist/tui/find-app.d.ts +9 -0
- package/dist/tui/find-app.js +117 -0
- package/dist/tui/find-app.js.map +1 -0
- package/dist/utils/builtin-git-sources.d.ts +5 -0
- package/dist/utils/builtin-git-sources.js +23 -0
- package/dist/utils/builtin-git-sources.js.map +1 -0
- package/dist/utils/clawhub.d.ts +38 -0
- package/dist/utils/clawhub.js +65 -0
- package/dist/utils/clawhub.js.map +1 -0
- package/dist/utils/find-command.d.ts +2 -0
- package/dist/utils/find-command.js +21 -0
- package/dist/utils/find-command.js.map +1 -0
- package/dist/utils/format.d.ts +2 -1
- package/dist/utils/format.js +27 -4
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/github-catalog.d.ts +1 -0
- package/dist/utils/github-catalog.js +25 -0
- package/dist/utils/github-catalog.js.map +1 -0
- package/dist/utils/naming.d.ts +28 -0
- package/dist/utils/naming.js +109 -0
- package/dist/utils/naming.js.map +1 -0
- package/dist/utils/source-id.js +29 -0
- package/dist/utils/source-id.js.map +1 -1
- package/docs/DESIGN.md +407 -0
- package/docs/PRD/PRD-1.0.0.md +1862 -0
- package/docs/PRD/renew/PRD-0.0.0.md +26 -0
- package/docs/PRD/renew/PRD-0.0.1.md +408 -0
- package/docs/PRD/renew/PRD-0.0.2.md +705 -0
- package/docs/PRD/renew/PRD-0.0.3.md +740 -0
- package/docs/PRD/renew/PRD-0.0.4.md +1494 -0
- package/docs/README.md +242 -0
- package/docs/plan/PLAN_v1.0.0.md +663 -0
- package/docs/plan/PLAN_v1.0.1.md +845 -0
- package/docs/refrences/README.md +9 -0
- package/docs/refrences/agent-skill-paths.md +274 -0
- package/docs/refrences/config-state-reconciliation.md +199 -0
- package/docs/refrences/naming-dedupe-warning-rules.md +482 -0
- package/img/img-1.jpg +0 -0
- package/package.json +18 -7
- package/dist/tests/skill-flow.test.js +0 -926
- package/src/adapters/channel-adapters.ts +0 -75
- package/src/cli.tsx +0 -147
- package/src/domain/types.ts +0 -175
- package/src/services/deployment-applier.ts +0 -81
- package/src/services/deployment-planner.ts +0 -259
- package/src/services/doctor-service.ts +0 -156
- package/src/services/inventory-service.ts +0 -251
- package/src/services/skill-flow.ts +0 -381
- package/src/services/source-service.ts +0 -427
- package/src/services/workflow-service.ts +0 -56
- package/src/state/store.ts +0 -68
- package/src/tests/skill-flow.test.ts +0 -1184
- package/src/tui/config-app.tsx +0 -1094
- package/src/tui/selection-state.ts +0 -45
- package/src/utils/constants.ts +0 -201
- package/src/utils/format.ts +0 -59
- package/src/utils/fs.ts +0 -102
- package/src/utils/git.ts +0 -16
- package/src/utils/result.ts +0 -23
- package/src/utils/source-id.ts +0 -19
- package/tsconfig.json +0 -22
- package/vitest.config.ts +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[2026-03-21T10:24:32.733Z] GET file:///tmp/gstack-sketch-skill-flow.html → 200 (5ms, 7267B)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
main
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# QA Report
|
|
2
|
+
|
|
3
|
+
Date: 2026-03-22
|
|
4
|
+
Target: `skill-flow` CLI v1.0.1
|
|
5
|
+
Mode: full functional regression
|
|
6
|
+
Base branch: `main`
|
|
7
|
+
Baseline commit: `c21868e`
|
|
8
|
+
Final status: `DONE_WITH_CONCERNS`
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
- Automated baseline passed: `npm run build`, `npm test` (`49 passed`)
|
|
13
|
+
- Verified manually:
|
|
14
|
+
- Git add with `--path`
|
|
15
|
+
- `list`
|
|
16
|
+
- `update --all`
|
|
17
|
+
- `uninstall`
|
|
18
|
+
- GitHub tree URL add
|
|
19
|
+
- ClawHub add / update / uninstall
|
|
20
|
+
- Blocking issue found:
|
|
21
|
+
- `find` / `search` can hang for 15s+ on cold start because built-in catalog search waits on many remote Git repos
|
|
22
|
+
|
|
23
|
+
## Health Score
|
|
24
|
+
|
|
25
|
+
- Baseline: 82
|
|
26
|
+
- Final: 82
|
|
27
|
+
|
|
28
|
+
Rationale:
|
|
29
|
+
- Functional: mostly works
|
|
30
|
+
- Performance: materially degraded for `find`
|
|
31
|
+
- Reliability: build/tests clean, but discovery cold start is not ship-ready
|
|
32
|
+
|
|
33
|
+
## Tested Flows
|
|
34
|
+
|
|
35
|
+
### 1. Git add with path filtering
|
|
36
|
+
|
|
37
|
+
Command pattern:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
node dist/cli.js add <local-repo> --path skills/find-skills
|
|
41
|
+
node dist/cli.js list
|
|
42
|
+
node dist/cli.js update --all
|
|
43
|
+
node dist/cli.js uninstall repo
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Observed:
|
|
47
|
+
- add succeeded
|
|
48
|
+
- only one skill was registered
|
|
49
|
+
- list/update/uninstall all behaved correctly
|
|
50
|
+
|
|
51
|
+
### 2. GitHub tree URL add
|
|
52
|
+
|
|
53
|
+
Command:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
node dist/cli.js add https://github.com/vercel-labs/skills/tree/main/skills/find-skills
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Observed:
|
|
60
|
+
- succeeded
|
|
61
|
+
- installed as repo-level source `vercel-labs-skills`
|
|
62
|
+
- leaf count was `1`
|
|
63
|
+
- runtime was about `7.76s`
|
|
64
|
+
|
|
65
|
+
### 3. ClawHub lifecycle
|
|
66
|
+
|
|
67
|
+
Command pattern:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
node dist/cli.js add clawhub:find-skills-skill
|
|
71
|
+
node dist/cli.js update --all
|
|
72
|
+
node dist/cli.js list
|
|
73
|
+
node dist/cli.js uninstall clawhub-find-skills-skill
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Observed:
|
|
77
|
+
- add/update/uninstall all succeeded
|
|
78
|
+
- `list` reported the source as `PARTIAL` because of a metadata warning:
|
|
79
|
+
- `name should match parent directory name 'find-skills-skill'`
|
|
80
|
+
|
|
81
|
+
Assessment:
|
|
82
|
+
- functional flow passes
|
|
83
|
+
- warning is noisy but not a blocker
|
|
84
|
+
|
|
85
|
+
## Findings
|
|
86
|
+
|
|
87
|
+
### ISSUE-001
|
|
88
|
+
|
|
89
|
+
- Severity: critical
|
|
90
|
+
- Category: performance / functional
|
|
91
|
+
- Title: `find` does not complete promptly on cold start
|
|
92
|
+
- Status: deferred
|
|
93
|
+
|
|
94
|
+
What happens:
|
|
95
|
+
- `find` / `search` attempts to search the full built-in Git catalog set
|
|
96
|
+
- on a fresh state root, many built-in repos are not cached
|
|
97
|
+
- command can remain blocked for 15s+ even when a local result already exists
|
|
98
|
+
- `--json` has the same issue
|
|
99
|
+
|
|
100
|
+
Repro:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
export SKILL_FLOW_STATE_ROOT="$(mktemp -d)/state"
|
|
104
|
+
node dist/cli.js add <local-repo> --path skills/find-skills
|
|
105
|
+
perl -e 'alarm shift; exec @ARGV' 15 node dist/cli.js find find
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Observed output before timeout:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
1. find-skills local installed
|
|
112
|
+
Find useful skills quickly.
|
|
113
|
+
repo · skills/find-skills
|
|
114
|
+
next: already installed
|
|
115
|
+
|
|
116
|
+
2. Using Skills builtin-git
|
|
117
|
+
...
|
|
118
|
+
warning: Unable to refresh built-in source 'https://github.com/anthropics/skills.git': Error: Built-in source 'https://github.com/anthropics/skills.git' timed out.
|
|
119
|
+
...
|
|
120
|
+
time: command terminated abnormally
|
|
121
|
+
real 15.02
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Impact:
|
|
125
|
+
- makes `find` feel hung
|
|
126
|
+
- especially bad on first use or slow network
|
|
127
|
+
- blocks the main new v1.0.1 discovery path
|
|
128
|
+
|
|
129
|
+
Recommendation:
|
|
130
|
+
- redesign built-in catalog search so it does not depend on cloning every remote repo during request time
|
|
131
|
+
- acceptable solutions include a prebuilt index, explicit catalog sync step, or a lightweight remote metadata search path
|
|
132
|
+
|
|
133
|
+
### ISSUE-002
|
|
134
|
+
|
|
135
|
+
- Severity: medium
|
|
136
|
+
- Category: UX
|
|
137
|
+
- Title: ClawHub install shows as `PARTIAL` immediately after successful add
|
|
138
|
+
- Status: deferred
|
|
139
|
+
|
|
140
|
+
Observed:
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
find-skills-skill PARTIAL 1 skills 0 targets, 1 warnings
|
|
144
|
+
warning: .: name should match parent directory name 'find-skills-skill'
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Impact:
|
|
148
|
+
- user sees warning/partial state on a successful install
|
|
149
|
+
- creates uncertainty about whether the source is healthy
|
|
150
|
+
|
|
151
|
+
## Ship Readiness
|
|
152
|
+
|
|
153
|
+
- `add`, `update`, and `uninstall` are in good shape
|
|
154
|
+
- `find/search` is functionally correct in some cases but not performance-safe enough for cold-start use
|
|
155
|
+
- v1.0.1 is not fully ship-ready if discovery is considered a headline feature
|
|
156
|
+
|
|
157
|
+
## PR Summary
|
|
158
|
+
|
|
159
|
+
QA found 2 issues, fixed 0, health score 82 -> 82.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# QA Report: skill-flow
|
|
2
|
+
|
|
3
|
+
Date: 2026-03-22
|
|
4
|
+
Mode: full CLI QA
|
|
5
|
+
Scope: build, unit tests, empty-state CLI flows, add/apply/update/uninstall end-to-end flow, interactive config smoke check
|
|
6
|
+
|
|
7
|
+
## Coverage
|
|
8
|
+
|
|
9
|
+
- `npm test`
|
|
10
|
+
- `npm run build`
|
|
11
|
+
- `node dist/cli.js --help`
|
|
12
|
+
- Empty state:
|
|
13
|
+
- `list`
|
|
14
|
+
- `doctor`
|
|
15
|
+
- `config`
|
|
16
|
+
- `uninstall missing`
|
|
17
|
+
- End-to-end fixture workflow:
|
|
18
|
+
- `add <git-source>`
|
|
19
|
+
- `list`
|
|
20
|
+
- `doctor`
|
|
21
|
+
- `applyDraft(...)` through app service with real state root + target roots
|
|
22
|
+
- `update --all` after upstream repo change
|
|
23
|
+
- `uninstall <sourceId>`
|
|
24
|
+
|
|
25
|
+
## Findings
|
|
26
|
+
|
|
27
|
+
### ISSUE-001
|
|
28
|
+
|
|
29
|
+
- Severity: medium
|
|
30
|
+
- Title: `uninstall` reported success for unknown workflow groups
|
|
31
|
+
- Repro:
|
|
32
|
+
1. Start with a fresh state root.
|
|
33
|
+
2. Run `node dist/cli.js uninstall missing`.
|
|
34
|
+
- Expected:
|
|
35
|
+
- Command should fail and say the workflow group is not registered.
|
|
36
|
+
- Actual:
|
|
37
|
+
- Command printed `Removed: missing` and exited `0`.
|
|
38
|
+
- Fix status: verified
|
|
39
|
+
|
|
40
|
+
## Fix
|
|
41
|
+
|
|
42
|
+
- Updated source removal to reject unknown workflow groups with `SOURCE_NOT_FOUND`.
|
|
43
|
+
- Added regression test coverage for uninstalling an unknown workflow group.
|
|
44
|
+
|
|
45
|
+
## Verification
|
|
46
|
+
|
|
47
|
+
- `npm test` -> 33 passed
|
|
48
|
+
- `npm run build` -> passed
|
|
49
|
+
- `node dist/cli.js uninstall missing` -> prints `Workflow group 'missing' is not registered.` and exits `1`
|
|
50
|
+
- End-to-end fixture flow still passes:
|
|
51
|
+
- add source
|
|
52
|
+
- apply targets
|
|
53
|
+
- doctor healthy
|
|
54
|
+
- update after source change
|
|
55
|
+
- uninstall existing source
|
|
56
|
+
- list returns empty state
|
|
57
|
+
|
|
58
|
+
## Summary
|
|
59
|
+
|
|
60
|
+
QA found 1 issue, fixed 1, deferred 0.
|
package/README.md
CHANGED
|
@@ -35,12 +35,27 @@ Intuitive TUI: view groups → select skills → choose targets → save configu
|
|
|
35
35
|
|
|
36
36
|
Requires Node.js >= 20, currently optimized for macOS.
|
|
37
37
|
|
|
38
|
+
Install from npm:
|
|
39
|
+
|
|
38
40
|
```bash
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
npm install -g skill-flow
|
|
42
|
+
skill-flow --help
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Run without a global install:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx skill-flow --help
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Install from source for local development:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
git clone https://github.com/VintLin/skill-flow.git
|
|
55
|
+
cd skill-flow
|
|
41
56
|
npm install
|
|
42
57
|
npm run build
|
|
43
|
-
npm link
|
|
58
|
+
npm link
|
|
44
59
|
```
|
|
45
60
|
|
|
46
61
|
## Quick Start
|
|
@@ -65,23 +80,33 @@ skill-flow doctor
|
|
|
65
80
|
skill-flow uninstall my-source-id
|
|
66
81
|
```
|
|
67
82
|
|
|
83
|
+
`add <source>` supports local paths, `owner/repo`, full https/ssh Git URLs, GitHub tree URLs, and `clawhub:<slug>[@version]`.
|
|
84
|
+
|
|
85
|
+
By default, `add` preselects all discovered skills and all detected agent targets. When `--path <repoSubpath>` is provided, the full repo is still imported, but only skills under that path are preselected.
|
|
86
|
+
|
|
68
87
|
## Command Reference
|
|
69
88
|
|
|
70
89
|
| Command | Description |
|
|
71
90
|
|---|---|
|
|
72
|
-
| `add <source>` | Add
|
|
91
|
+
| `add <source>` | Add a source from Git or ClawHub |
|
|
92
|
+
| `find <query>` | Search installed skills, built-in Git catalogs, and ClawHub |
|
|
93
|
+
| `search <query>` | Alias of `find` |
|
|
73
94
|
| `list` | Show workflow groups |
|
|
74
95
|
| `config` | Open interactive configuration UI |
|
|
75
96
|
| `update [sourceId] --all` | Update sources and re-project |
|
|
76
97
|
| `doctor` | Diagnose projection health |
|
|
77
98
|
| `uninstall <sourceIds...>` | Remove workflow groups and projections |
|
|
78
99
|
|
|
100
|
+
When selected skills collide by name, `skill-flow` keeps identical duplicates as warnings and renames different-content collisions with repo/author-prefixed link names such as `gstack-browse`, `gstack(garrytan)-browse`, or `garrytan-skill-creator`.
|
|
101
|
+
|
|
79
102
|
## How It Works
|
|
80
103
|
|
|
81
104
|
**State Management**
|
|
82
105
|
- `~/.skillflow/manifest.json` - Your configuration intent
|
|
83
106
|
- `~/.skillflow/lock.json` - Actual deployment state
|
|
84
107
|
- `~/.skillflow/source/git/<source-id>/` - Git source cache
|
|
108
|
+
- `~/.skillflow/source/clawhub/<source-id>/` - ClawHub source cache
|
|
109
|
+
- `~/.skillflow/catalog/git/<source-id>/` - Built-in Git catalog cache
|
|
85
110
|
|
|
86
111
|
**Projection Strategy**
|
|
87
112
|
Symlinks preferred, file copies when necessary. Target directories are projections only; true state managed by lock.json.
|
|
@@ -92,6 +117,35 @@ Claude Code · Codex · Cursor · GitHub Copilot · Gemini CLI · OpenCode · Op
|
|
|
92
117
|
|
|
93
118
|
Customize target paths via environment variables (e.g., `SKILL_FLOW_TARGET_CLAUDE_CODE`).
|
|
94
119
|
|
|
120
|
+
Broader ecosystem path references, including project-level rules and instructions paths, are tracked in [docs/refrences/agent-skill-paths.md](./docs/refrences/agent-skill-paths.md).
|
|
121
|
+
|
|
122
|
+
## Built-in Discovery Catalogs
|
|
123
|
+
|
|
124
|
+
`find/search` searches built-in Git catalogs in addition to local installed skills and ClawHub.
|
|
125
|
+
|
|
126
|
+
For more reliable built-in Git catalog search, set `GITHUB_TOKEN` to avoid low unauthenticated GitHub API rate limits.
|
|
127
|
+
|
|
128
|
+
| Repository | Description | Stars | Skills |
|
|
129
|
+
| --- | --- | ---: | ---: |
|
|
130
|
+
| [anthropic-skills](https://github.com/anthropics/skills) | Official Agent Skills from Anthropic | 95,957 | 18 |
|
|
131
|
+
| [superpowers](https://github.com/obra/superpowers) | Agentic skills framework & development methodology | 89,816 | 14 |
|
|
132
|
+
| [everything-claude-code](https://github.com/affaan-m/everything-claude-code) | Performance optimization system for Claude Code, Codex, and beyond | 81,392 | 147 |
|
|
133
|
+
| [agency-agents](https://github.com/msitarzewski/agency-agents) | Specialized expert agents with personality and proven deliverables | 50,749 | — |
|
|
134
|
+
| [ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) | Design intelligence for building professional UI/UX | 43,112 | 7 |
|
|
135
|
+
| [antigravity-awesome-skills](https://github.com/sickn33/antigravity-awesome-skills) | 1,000+ battle-tested skills for Claude Code, Cursor, and more | 25,047 | 1,258 |
|
|
136
|
+
| [marketingskills](https://github.com/coreyhaines31/marketingskills) | Marketing skills — CRO, copywriting, SEO, analytics, growth | 14,099 | 33 |
|
|
137
|
+
| [agentskills](https://github.com/agentskills/agentskills) | Specification and documentation for Agent Skills | 13,342 | — |
|
|
138
|
+
| [taste-skill](https://github.com/Leonxlnx/taste-skill) | Gives your AI good taste — stops generic, boring output | 3,389 | 5 |
|
|
139
|
+
| [affiliate-skills](https://github.com/Affitor/affiliate-skills) | Full affiliate marketing funnel: research to deploy | 99 | 47 |
|
|
140
|
+
| [skills](https://github.com/luongnv89/skills) | Reusable skills to supercharge your AI agents | 1 | 29 |
|
|
141
|
+
| [awesome-claude-skills](https://github.com/ComposioHQ/awesome-claude-skills) | Community Claude skills collection | — | — |
|
|
142
|
+
| [myclaude](https://github.com/cexll/myclaude) | Personal Claude skills collection | — | — |
|
|
143
|
+
| [baoyu-skills](https://github.com/JimLiu/baoyu-skills) | Community skills collection | — | — |
|
|
144
|
+
| [dbskill](https://github.com/dontbesilent2025/dbskill) | Database-focused skills collection | — | — |
|
|
145
|
+
| [gstack](https://github.com/garrytan/gstack) | Gstack skills and workflows | — | — |
|
|
146
|
+
| [impeccable](https://github.com/pbakaus/impeccable) | Design and taste skills collection | — | — |
|
|
147
|
+
| [frontend-slides](https://github.com/zarazhangrui/frontend-slides) | Frontend presentation skills collection | — | — |
|
|
148
|
+
|
|
95
149
|
## Development
|
|
96
150
|
|
|
97
151
|
```bash
|
package/README.zh.md
CHANGED
|
@@ -35,12 +35,27 @@
|
|
|
35
35
|
|
|
36
36
|
需要 Node.js >= 20,当前版本针对 macOS 优化。
|
|
37
37
|
|
|
38
|
+
通过 npm 安装:
|
|
39
|
+
|
|
38
40
|
```bash
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
npm install -g skill-flow
|
|
42
|
+
skill-flow --help
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
不做全局安装也可以直接运行:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx skill-flow --help
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
如果你要本地开发,再使用源码安装:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
git clone https://github.com/VintLin/skill-flow.git
|
|
55
|
+
cd skill-flow
|
|
41
56
|
npm install
|
|
42
57
|
npm run build
|
|
43
|
-
npm link
|
|
58
|
+
npm link
|
|
44
59
|
```
|
|
45
60
|
|
|
46
61
|
## 快速开始
|
|
@@ -65,23 +80,33 @@ skill-flow doctor
|
|
|
65
80
|
skill-flow uninstall my-source-id
|
|
66
81
|
```
|
|
67
82
|
|
|
83
|
+
`add <source>` 支持本地路径、`owner/repo`、完整的 https/ssh Git URL、GitHub tree URL,以及 `clawhub:<slug>[@version]`。
|
|
84
|
+
|
|
85
|
+
`add` 默认会预选该源的全部 skill,以及当前检测到的全部 agent 目标。传入 `--path <repoSubpath>` 时,仍然会导入整个仓库,但只会预选该路径下的 skill。
|
|
86
|
+
|
|
68
87
|
## 命令参考
|
|
69
88
|
|
|
70
89
|
| 命令 | 说明 |
|
|
71
90
|
|---|---|
|
|
72
|
-
| `add <source>` |
|
|
91
|
+
| `add <source>` | 从 Git 或 ClawHub 添加技能源 |
|
|
92
|
+
| `find <query>` | 搜索本地已安装技能、内置 Git 仓库和 ClawHub |
|
|
93
|
+
| `search <query>` | `find` 的别名 |
|
|
73
94
|
| `list` | 显示工作流分组 |
|
|
74
95
|
| `config` | 打开交互式配置界面 |
|
|
75
96
|
| `update [sourceId] --all` | 更新源并重新投影 |
|
|
76
97
|
| `doctor` | 诊断投影健康状态 |
|
|
77
98
|
| `uninstall <sourceIds...>` | 移除工作流组及其投影 |
|
|
78
99
|
|
|
100
|
+
当已选 skill 出现同名冲突时,`skill-flow` 会把内容完全相同的重复项保留为 warning,把内容不同的冲突项改成带 repo / author 前缀的链接名,例如 `gstack-browse`、`gstack(garrytan)-browse` 或 `garrytan-skill-creator`。
|
|
101
|
+
|
|
79
102
|
## 工作原理
|
|
80
103
|
|
|
81
104
|
**状态管理**
|
|
82
105
|
- `~/.skillflow/manifest.json` - 你的配置意图
|
|
83
106
|
- `~/.skillflow/lock.json` - 实际部署状态
|
|
84
107
|
- `~/.skillflow/source/git/<source-id>/` - Git 源缓存
|
|
108
|
+
- `~/.skillflow/source/clawhub/<source-id>/` - ClawHub 源缓存
|
|
109
|
+
- `~/.skillflow/catalog/git/<source-id>/` - 内置 Git 仓库缓存
|
|
85
110
|
|
|
86
111
|
**投影策略**
|
|
87
112
|
优先使用符号链接,必要时使用文件复制。目标目录仅作为投影,真实状态由 lock.json 管理。
|
|
@@ -92,6 +117,35 @@ Claude Code · Codex · Cursor · GitHub Copilot · Gemini CLI · OpenCode · Op
|
|
|
92
117
|
|
|
93
118
|
可通过环境变量自定义目标路径(如 `SKILL_FLOW_TARGET_CLAUDE_CODE`)。
|
|
94
119
|
|
|
120
|
+
更广义的生态路径参考,包括 project 级 rules / instructions 路径,见 [docs/refrences/agent-skill-paths.md](./docs/refrences/agent-skill-paths.md)。
|
|
121
|
+
|
|
122
|
+
## 默认内置发现仓库
|
|
123
|
+
|
|
124
|
+
`find/search` 除了搜索本地已安装技能和 ClawHub,也会搜索默认内置的 Git 仓库目录。
|
|
125
|
+
|
|
126
|
+
如果希望内置 Git 仓库搜索更稳定,建议设置 `GITHUB_TOKEN`,避免 GitHub 未认证 API 的低速率限制。
|
|
127
|
+
|
|
128
|
+
| Repository | Description | Stars | Skills |
|
|
129
|
+
| --- | --- | ---: | ---: |
|
|
130
|
+
| [anthropic-skills](https://github.com/anthropics/skills) | Official Agent Skills from Anthropic | 95,957 | 18 |
|
|
131
|
+
| [superpowers](https://github.com/obra/superpowers) | Agentic skills framework & development methodology | 89,816 | 14 |
|
|
132
|
+
| [everything-claude-code](https://github.com/affaan-m/everything-claude-code) | Performance optimization system for Claude Code, Codex, and beyond | 81,392 | 147 |
|
|
133
|
+
| [agency-agents](https://github.com/msitarzewski/agency-agents) | Specialized expert agents with personality and proven deliverables | 50,749 | — |
|
|
134
|
+
| [ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) | Design intelligence for building professional UI/UX | 43,112 | 7 |
|
|
135
|
+
| [antigravity-awesome-skills](https://github.com/sickn33/antigravity-awesome-skills) | 1,000+ battle-tested skills for Claude Code, Cursor, and more | 25,047 | 1,258 |
|
|
136
|
+
| [marketingskills](https://github.com/coreyhaines31/marketingskills) | Marketing skills — CRO, copywriting, SEO, analytics, growth | 14,099 | 33 |
|
|
137
|
+
| [agentskills](https://github.com/agentskills/agentskills) | Specification and documentation for Agent Skills | 13,342 | — |
|
|
138
|
+
| [taste-skill](https://github.com/Leonxlnx/taste-skill) | Gives your AI good taste — stops generic, boring output | 3,389 | 5 |
|
|
139
|
+
| [affiliate-skills](https://github.com/Affitor/affiliate-skills) | Full affiliate marketing funnel: research to deploy | 99 | 47 |
|
|
140
|
+
| [skills](https://github.com/luongnv89/skills) | Reusable skills to supercharge your AI agents | 1 | 29 |
|
|
141
|
+
| [awesome-claude-skills](https://github.com/ComposioHQ/awesome-claude-skills) | Community Claude skills collection | — | — |
|
|
142
|
+
| [myclaude](https://github.com/cexll/myclaude) | Personal Claude skills collection | — | — |
|
|
143
|
+
| [baoyu-skills](https://github.com/JimLiu/baoyu-skills) | Community skills collection | — | — |
|
|
144
|
+
| [dbskill](https://github.com/dontbesilent2025/dbskill) | Database-focused skills collection | — | — |
|
|
145
|
+
| [gstack](https://github.com/garrytan/gstack) | Gstack skills and workflows | — | — |
|
|
146
|
+
| [impeccable](https://github.com/pbakaus/impeccable) | Design and taste skills collection | — | — |
|
|
147
|
+
| [frontend-slides](https://github.com/zarazhangrui/frontend-slides) | Frontend presentation skills collection | — | — |
|
|
148
|
+
|
|
95
149
|
## 开发
|
|
96
150
|
|
|
97
151
|
```bash
|
package/dist/cli.js
CHANGED
|
@@ -4,25 +4,34 @@ import { Command } from "commander";
|
|
|
4
4
|
import { render } from "ink";
|
|
5
5
|
import { SkillFlowApp } from "./services/skill-flow.js";
|
|
6
6
|
import { ConfigApp } from "./tui/config-app.js";
|
|
7
|
-
import {
|
|
7
|
+
import { FindApp } from "./tui/find-app.js";
|
|
8
|
+
import { formatGroupRef } from "./utils/naming.js";
|
|
9
|
+
import { formatDoctorIssue, formatWorkflowList, } from "./utils/format.js";
|
|
10
|
+
import { buildFindCommand } from "./utils/find-command.js";
|
|
8
11
|
const program = new Command();
|
|
9
12
|
const app = new SkillFlowApp();
|
|
10
13
|
program
|
|
11
14
|
.name("skill-flow")
|
|
12
15
|
.description("Workflow-first skill projection manager")
|
|
13
|
-
.version("1.0.
|
|
16
|
+
.version("1.0.2");
|
|
14
17
|
program
|
|
15
18
|
.command("add")
|
|
16
|
-
.argument("<source>", "
|
|
17
|
-
.
|
|
18
|
-
|
|
19
|
+
.argument("<source>", "Source locator")
|
|
20
|
+
.option("--path <repoSubpath>", "Filter Git sources to a specific repo subpath")
|
|
21
|
+
.action(async (source, options) => {
|
|
22
|
+
const result = await app.addSource(source, options.path ? { path: options.path } : undefined);
|
|
19
23
|
if (!result.ok) {
|
|
20
24
|
printErrors(result.errors);
|
|
21
25
|
process.exitCode = 1;
|
|
22
26
|
return;
|
|
23
27
|
}
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
const duplicateSkipCount = result.warnings.filter((warning) => warning.message.includes("Duplicate skill content skipped because")).length;
|
|
29
|
+
const visibleWarnings = result.warnings.filter((warning) => !warning.message.includes("Duplicate skill content skipped because"));
|
|
30
|
+
const duplicateSummary = duplicateSkipCount > 0
|
|
31
|
+
? `, skipped ${duplicateSkipCount} duplicate skill${duplicateSkipCount === 1 ? "" : "s"}`
|
|
32
|
+
: "";
|
|
33
|
+
console.log(`Added ${formatGroupRef(result.data.manifest)} with ${result.data.leafCount} valid skills${duplicateSummary}.`);
|
|
34
|
+
printWarnings(visibleWarnings.map((warning) => warning.message));
|
|
26
35
|
});
|
|
27
36
|
program.command("list").action(async () => {
|
|
28
37
|
const result = await app.listWorkflows();
|
|
@@ -33,6 +42,34 @@ program.command("list").action(async () => {
|
|
|
33
42
|
}
|
|
34
43
|
console.log(formatWorkflowList(result.data.summaries));
|
|
35
44
|
});
|
|
45
|
+
program
|
|
46
|
+
.command("find")
|
|
47
|
+
.alias("search")
|
|
48
|
+
.argument("<query>", "Search query")
|
|
49
|
+
.option("--json", "Print JSON output")
|
|
50
|
+
.action(async (query, options) => {
|
|
51
|
+
const result = await app.findSkills(query);
|
|
52
|
+
if (!result.ok) {
|
|
53
|
+
printErrors(result.errors);
|
|
54
|
+
process.exitCode = 1;
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (options.json) {
|
|
58
|
+
console.log(JSON.stringify(result.data.candidates.map((candidate) => ({
|
|
59
|
+
...candidate,
|
|
60
|
+
nextCommand: buildFindCommand(candidate),
|
|
61
|
+
})), null, 2));
|
|
62
|
+
printWarnings(result.warnings.map((warning) => warning.message));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const instance = render(_jsx(FindApp, { app: app, query: query, candidates: result.data.candidates }));
|
|
66
|
+
if (result.warnings.length > 0) {
|
|
67
|
+
for (const warning of result.warnings) {
|
|
68
|
+
console.warn(`warning: ${warning.message}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
await instance.waitUntilExit();
|
|
72
|
+
});
|
|
36
73
|
program.command("config").action(async () => {
|
|
37
74
|
const result = await app.getConfigData();
|
|
38
75
|
if (!result.ok) {
|
|
@@ -70,8 +107,12 @@ program
|
|
|
70
107
|
process.exitCode = 1;
|
|
71
108
|
return;
|
|
72
109
|
}
|
|
110
|
+
const summariesResult = await app.listWorkflows();
|
|
111
|
+
const summaries = summariesResult.ok ? summariesResult.data.summaries : [];
|
|
73
112
|
for (const item of result.data.updated) {
|
|
74
|
-
|
|
113
|
+
const summary = summaries.find((summary) => summary.source.id === item.sourceId);
|
|
114
|
+
const groupRef = summary ? formatGroupRef(summary.source) : item.sourceId;
|
|
115
|
+
console.log(`${groupRef} changed:${item.changed} +${item.addedLeafIds.length} -${item.removedLeafIds.length} invalidated:${item.invalidatedLeafIds.length}`);
|
|
75
116
|
}
|
|
76
117
|
printWarnings(result.warnings.map((warning) => warning.message));
|
|
77
118
|
});
|
|
@@ -101,7 +142,8 @@ program
|
|
|
101
142
|
process.exitCode = 1;
|
|
102
143
|
return;
|
|
103
144
|
}
|
|
104
|
-
|
|
145
|
+
const removed = result.data.removedRefs.map((source) => formatGroupRef(source));
|
|
146
|
+
console.log(`Removed: ${removed.join(", ")}`);
|
|
105
147
|
printWarnings(result.data.warnings);
|
|
106
148
|
});
|
|
107
149
|
await program.parseAsync(process.argv);
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":";;AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":";;AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAEL,iBAAiB,EAEjB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAC9B,MAAM,GAAG,GAAG,IAAI,YAAY,EAAE,CAAC;AAE/B,OAAO;KAC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L,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAEvC,SAAS,WAAW,CAAC,MAAkC;IACrD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,QAAkB;IACvC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,OAAO,CAAC,IAAI,CAAC,YAAY,OAAO,EAAE,CAAC,CAAC;IACtC,CAAC;AACH,CAAC"}
|
package/dist/domain/types.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type Result<T> = {
|
|
|
17
17
|
warnings: Warning[];
|
|
18
18
|
errors: Failure[];
|
|
19
19
|
};
|
|
20
|
-
export type SourceKind = "git";
|
|
20
|
+
export type SourceKind = "git" | "clawhub";
|
|
21
21
|
export type DeploymentTargetName = "claude-code" | "codex" | "cursor" | "github-copilot" | "gemini-cli" | "opencode" | "openclaw" | "pi" | "windsurf" | "roo-code" | "cline" | "amp" | "kiro";
|
|
22
22
|
export type DeploymentStrategy = "symlink" | "copy";
|
|
23
23
|
export type HealthStatus = "HEALTHY" | "ACTIVE" | "INACTIVE" | "PARTIAL" | "BLOCKED" | "INVALID" | "UPDATE AVAILABLE" | "UP TO DATE" | "DRIFT DETECTED";
|
|
@@ -27,6 +27,7 @@ export type SourceManifestRecord = {
|
|
|
27
27
|
kind: SourceKind;
|
|
28
28
|
displayName: string;
|
|
29
29
|
addedAt: string;
|
|
30
|
+
requestedPath?: string;
|
|
30
31
|
};
|
|
31
32
|
export type TargetBinding = {
|
|
32
33
|
enabled: boolean;
|
|
@@ -50,10 +51,14 @@ export type SourceLockRecord = {
|
|
|
50
51
|
kind: SourceKind;
|
|
51
52
|
displayName: string;
|
|
52
53
|
checkoutPath: string;
|
|
53
|
-
commitSha: string;
|
|
54
54
|
updatedAt: string;
|
|
55
55
|
leafIds: string[];
|
|
56
56
|
invalidLeafs: InvalidLeafRecord[];
|
|
57
|
+
commitSha?: string;
|
|
58
|
+
packageSlug?: string;
|
|
59
|
+
resolvedVersion?: string;
|
|
60
|
+
contentHash?: string;
|
|
61
|
+
versionMode?: "pinned" | "floating";
|
|
57
62
|
};
|
|
58
63
|
export type LeafRecord = {
|
|
59
64
|
id: string;
|
|
@@ -102,6 +107,7 @@ export type DeploymentAction = {
|
|
|
102
107
|
sourcePath: string;
|
|
103
108
|
targetPath: string;
|
|
104
109
|
previousTargetPath?: string;
|
|
110
|
+
relocateExternalToTargetPath?: string;
|
|
105
111
|
reason?: string;
|
|
106
112
|
contentHash: string;
|
|
107
113
|
};
|
|
@@ -114,8 +120,10 @@ export type DoctorIssueSeverity = "info" | "warning" | "error";
|
|
|
114
120
|
export type DoctorIssue = {
|
|
115
121
|
severity: DoctorIssueSeverity;
|
|
116
122
|
sourceId: string;
|
|
123
|
+
sourceLabel?: string;
|
|
117
124
|
target?: DeploymentTargetName;
|
|
118
125
|
leafId?: string;
|
|
126
|
+
leafLabel?: string;
|
|
119
127
|
code: string;
|
|
120
128
|
message: string;
|
|
121
129
|
};
|
|
@@ -131,3 +139,27 @@ export type WorkflowSummary = {
|
|
|
131
139
|
activeTargetCount: number;
|
|
132
140
|
health: HealthStatus;
|
|
133
141
|
};
|
|
142
|
+
export type SkillCandidateAction = {
|
|
143
|
+
type: "none";
|
|
144
|
+
} | {
|
|
145
|
+
type: "add-git";
|
|
146
|
+
locator: string;
|
|
147
|
+
requestedPath?: string;
|
|
148
|
+
} | {
|
|
149
|
+
type: "add-clawhub";
|
|
150
|
+
slug: string;
|
|
151
|
+
version?: string;
|
|
152
|
+
};
|
|
153
|
+
export type SkillCandidate = {
|
|
154
|
+
id: string;
|
|
155
|
+
title: string;
|
|
156
|
+
description: string;
|
|
157
|
+
source: "local" | "builtin-git" | "clawhub";
|
|
158
|
+
sourceLabel: string;
|
|
159
|
+
sourceId: string;
|
|
160
|
+
sourceKind: SourceKind;
|
|
161
|
+
locator: string;
|
|
162
|
+
relativePath?: string;
|
|
163
|
+
installed: boolean;
|
|
164
|
+
action: SkillCandidateAction;
|
|
165
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
1
2
|
import path from "node:path";
|
|
2
3
|
import { copyDirectory, createSymlink, ensureDir, pathExists, removePath } from "../utils/fs.js";
|
|
3
4
|
import { ok } from "../utils/result.js";
|
|
@@ -24,6 +25,11 @@ export class DeploymentApplier {
|
|
|
24
25
|
(await pathExists(action.previousTargetPath))) {
|
|
25
26
|
await removePath(action.previousTargetPath);
|
|
26
27
|
}
|
|
28
|
+
if (action.relocateExternalToTargetPath &&
|
|
29
|
+
(await pathExists(action.targetPath))) {
|
|
30
|
+
await ensureDir(path.dirname(action.relocateExternalToTargetPath));
|
|
31
|
+
await fs.rename(action.targetPath, action.relocateExternalToTargetPath);
|
|
32
|
+
}
|
|
27
33
|
if (action.strategy === "symlink") {
|
|
28
34
|
await createSymlink(action.sourcePath, action.targetPath);
|
|
29
35
|
}
|