harveyz-skill 0.17.1 → 0.19.0
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/CHANGELOG.md +47 -0
- package/README.md +3 -3
- package/package.json +8 -5
- package/skills/creative/capture-insight/SKILL.md +86 -4
- package/skills/experiment/init-skill/SKILL.md +168 -0
- package/skills/experiment/init-skill/references/skill-authoring-guide.md +156 -0
- package/skills/experiment/init-skill/references/skill-standard.md +219 -0
- package/skills/experiment/learn-paper/SKILL.md +310 -0
- package/skills/experiment/probe-session/SKILL.md +93 -0
- package/skills/experiment/probe-session/data/strategies.json +26 -0
- package/skills/experiment/probe-session/scripts/list_profiles.py +69 -0
- package/skills/experiment/probe-session/scripts/probe.py +246 -0
- package/skills/experiment/probe-session/vars.json +8 -0
- package/skills/meta/archive-skill/SKILL.md +2 -2
- package/skills/meta/publish-skill/SKILL.md +106 -11
- package/skills/meta/scout-philosophy/SKILL.md +121 -0
- package/skills/meta/sync-agent/SKILL.md +186 -0
- package/skills/research/extract-url/SKILL.md +69 -30
- package/skills/research/extract-url/platforms/SKILL.claude.md +12 -7
- package/skills/research/extract-url/platforms/SKILL.codex.md +9 -3
- package/skills/research/extract-url/platforms/SKILL.hermes.md +9 -3
- package/skills/research/extract-url/references/article_utils.py +2 -0
- package/skills/research/extract-url/references/core-flow.md +22 -14
- package/skills/research/extract-url/scripts/__pycache__/config.cpython-312.pyc +0 -0
- package/skills/research/extract-url/scripts/config.py +44 -0
- package/skills/research/extract-url/scripts/dedup_check.py +8 -4
- package/skills/research/extract-url/scripts/detect_chrome_profile.py +3 -0
- package/skills/research/extract-url/scripts/playwright_web.py +109 -50
- package/skills/research/extract-url/scripts/playwright_xcom.py +190 -23
- package/skills/research/extract-url/scripts/validate_article.py +10 -6
- package/skills/research/extract-url/tests/conftest.py +79 -0
- package/skills/research/extract-url/tests/test_config.py +69 -0
- package/skills/research/extract-url/tests/test_dedup_check.py +75 -0
- package/skills/research/extract-url/tests/test_playwright_web.py +122 -0
- package/skills/research/extract-url/tests/test_playwright_xcom.py +65 -0
- package/skills/research/extract-url/tests/test_validate_article.py +101 -0
- package/skills/research/extract-url/vars.json +2 -0
- package/skills/research/extract-vision/SKILL.md +34 -121
- package/skills/research/extract-vision/scripts/ocr_extract.py +89 -0
- package/skills/research/learn-skill/SKILL.md +114 -37
- package/skills/research/learn-video/SKILL.md +3 -2
- package/skills/{meta/analyze-skill → research/survey-skillrepo}/CHANGELOG.md +22 -0
- package/skills/research/survey-skillrepo/SKILL.md +200 -0
- package/skills/{meta/analyze-skill → research/survey-skillrepo}/references/output-template.md +6 -7
- package/skills/research/survey-skillrepo/references/prohibitions.md +12 -0
- package/skills/writing/forge-doc/scripts/__pycache__/md_to_pdf.cpython-312.pyc +0 -0
- package/skills-index.json +226 -32
- package/tools/hub/docs/superpowers/plans/2026-06-18-todo-md-sync.md +732 -0
- package/tools/hub/docs/superpowers/specs/2026-06-18-todo-md-sync-design.md +112 -0
- package/tools/hub/hub/__main__.py +13 -2
- package/tools/hub/hub/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/hub/hub/__pycache__/__main__.cpython-312.pyc +0 -0
- package/tools/hub/hub/cli/projects.py +24 -1
- package/tools/hub/hub/core/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/hub/hub/core/__pycache__/db.cpython-312.pyc +0 -0
- package/tools/hub/hub/core/__pycache__/migrate.cpython-312.pyc +0 -0
- package/tools/hub/hub/core/__pycache__/projects.cpython-312.pyc +0 -0
- package/tools/hub/hub/core/__pycache__/tasks.cpython-312.pyc +0 -0
- package/tools/hub/hub/core/projects.py +25 -0
- package/tools/hub/hub/core/todo_sync.py +146 -0
- package/tools/hub/hub/tui/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/hub/hub/tui/__pycache__/app.cpython-312.pyc +0 -0
- package/tools/hub/hub/tui/__pycache__/git.cpython-312.pyc +0 -0
- package/tools/hub/hub/tui/app.py +1 -0
- package/tools/hub/hub/tui/panels/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/hub/hub/tui/panels/__pycache__/git.cpython-312.pyc +0 -0
- package/tools/hub/hub/tui/panels/__pycache__/projects.cpython-312.pyc +0 -0
- package/tools/hub/hub/tui/panels/__pycache__/tasks.cpython-312.pyc +0 -0
- package/tools/hub/hub/tui/panels/projects.py +34 -2
- package/tools/hub/hub/tui/panels/tasks.py +20 -0
- package/tools/hub/tests/test_cli.py +45 -0
- package/tools/hub/tests/test_todo_sync.py +274 -0
- package/tools/hub/tests/test_tui_tasks_panel.py +75 -0
- package/skills/meta/analyze-skill/SKILL.md +0 -161
- package/skills/meta/analyze-skill/references/evaluation-template.md +0 -58
- package/skills/meta/analyze-skill/references/prohibitions.md +0 -27
- package/skills/writing/forge-doc/scripts/__pycache__/md_to_pdf.cpython-314.pyc +0 -0
- package/tools/hub/hub/__pycache__/__init__.cpython-314.pyc +0 -0
- package/tools/hub/hub/__pycache__/__main__.cpython-314.pyc +0 -0
- package/tools/hub/hub/cli/__pycache__/__init__.cpython-314.pyc +0 -0
- package/tools/hub/hub/cli/__pycache__/git.cpython-314.pyc +0 -0
- package/tools/hub/hub/cli/__pycache__/projects.cpython-314.pyc +0 -0
- package/tools/hub/hub/cli/__pycache__/tasks.cpython-314.pyc +0 -0
- package/tools/hub/hub/core/__pycache__/__init__.cpython-314.pyc +0 -0
- package/tools/hub/hub/core/__pycache__/db.cpython-314.pyc +0 -0
- package/tools/hub/hub/core/__pycache__/migrate.cpython-314.pyc +0 -0
- package/tools/hub/hub/core/__pycache__/projects.cpython-314.pyc +0 -0
- package/tools/hub/hub/core/__pycache__/tasks.cpython-314.pyc +0 -0
- package/tools/hub/hub/tui/__pycache__/__init__.cpython-314.pyc +0 -0
- package/tools/hub/hub/tui/__pycache__/app.cpython-314.pyc +0 -0
- package/tools/hub/hub/tui/__pycache__/git.cpython-314.pyc +0 -0
- package/tools/hub/hub/tui/panels/__pycache__/__init__.cpython-314.pyc +0 -0
- package/tools/hub/hub/tui/panels/__pycache__/git.cpython-314.pyc +0 -0
- package/tools/hub/hub/tui/panels/__pycache__/projects.cpython-314.pyc +0 -0
- package/tools/hub/hub/tui/panels/__pycache__/tasks.cpython-314.pyc +0 -0
- package/tools/hub/tests/__pycache__/__init__.cpython-314.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_cli.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_cli.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_db.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_db.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_migrate.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_migrate.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_projects.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_projects.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_scan.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_scan.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tasks.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tasks.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tui_app.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tui_app.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tui_git.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tui_git.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tui_git_panel.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tui_git_panel.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tui_projects_panel.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tui_projects_panel.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tui_tasks_panel.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/hub/tests/__pycache__/test_tui_tasks_panel.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/p-launch/__pycache__/p_launch.cpython-314.pyc +0 -0
- package/tools/p-launch/p-launch.py +0 -6
- package/tools/p-launch/p-launch.sh +0 -34
- package/tools/p-launch/p_launch.py +0 -708
- package/tools/p-launch/tests/__pycache__/test_p_launch.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/p-launch/tests/__pycache__/test_p_launch.cpython-314-pytest-9.1.0.pyc +0 -0
- package/tools/p-launch/tests/e2e.bats +0 -369
- package/tools/p-launch/tests/test_p_launch.py +0 -378
- package/tools/p-launch/tests/unit.bats +0 -139
- package/tools/p-launch/tool.json +0 -11
- package/tools/p-launch/vars.json +0 -9
- package/tools/p-launch/zshrc.snippet +0 -5
- package/tools/todo-tool/frontend/README.md +0 -73
- package/tools/todo-tool/frontend/components.json +0 -25
- package/tools/todo-tool/frontend/eslint.config.js +0 -22
- package/tools/todo-tool/frontend/index.html +0 -13
- package/tools/todo-tool/frontend/package-lock.json +0 -6566
- package/tools/todo-tool/frontend/package.json +0 -42
- package/tools/todo-tool/frontend/postcss.config.js +0 -6
- package/tools/todo-tool/frontend/public/favicon.svg +0 -1
- package/tools/todo-tool/frontend/public/icons.svg +0 -24
- package/tools/todo-tool/frontend/src/App.css +0 -184
- package/tools/todo-tool/frontend/src/App.tsx +0 -78
- package/tools/todo-tool/frontend/src/assets/hero.png +0 -0
- package/tools/todo-tool/frontend/src/assets/react.svg +0 -1
- package/tools/todo-tool/frontend/src/assets/vite.svg +0 -1
- package/tools/todo-tool/frontend/src/components/AddTaskDialog.tsx +0 -92
- package/tools/todo-tool/frontend/src/components/FilterBar.tsx +0 -74
- package/tools/todo-tool/frontend/src/components/TaskList.tsx +0 -35
- package/tools/todo-tool/frontend/src/components/TaskRow.tsx +0 -44
- package/tools/todo-tool/frontend/src/components/ui/badge.tsx +0 -52
- package/tools/todo-tool/frontend/src/components/ui/button.tsx +0 -58
- package/tools/todo-tool/frontend/src/components/ui/dialog.tsx +0 -159
- package/tools/todo-tool/frontend/src/components/ui/input.tsx +0 -20
- package/tools/todo-tool/frontend/src/components/ui/select.tsx +0 -197
- package/tools/todo-tool/frontend/src/index.css +0 -90
- package/tools/todo-tool/frontend/src/lib/api.ts +0 -42
- package/tools/todo-tool/frontend/src/lib/utils.ts +0 -6
- package/tools/todo-tool/frontend/src/main.tsx +0 -10
- package/tools/todo-tool/frontend/tailwind.config.js +0 -66
- package/tools/todo-tool/frontend/tsconfig.app.json +0 -32
- package/tools/todo-tool/frontend/tsconfig.json +0 -7
- package/tools/todo-tool/frontend/tsconfig.node.json +0 -24
- package/tools/todo-tool/frontend/vite.config.ts +0 -17
- package/tools/todo-tool/pyproject.toml +0 -31
- package/tools/todo-tool/tests/__init__.py +0 -0
- package/tools/todo-tool/tests/__pycache__/__init__.cpython-311.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/__init__.cpython-314.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_api.cpython-311-pytest-9.0.2.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_api.cpython-311-pytest-9.0.3.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_api.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_cli.cpython-311-pytest-9.0.2.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_cli.cpython-311-pytest-9.0.3.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_cli.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_cli.cpython-314.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_db.cpython-311-pytest-9.0.2.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_db.cpython-311-pytest-9.0.3.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_db.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_models.cpython-311-pytest-9.0.2.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_models.cpython-311-pytest-9.0.3.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_models.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_parser.cpython-311-pytest-9.0.3.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_parser.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_projects_index.cpython-311-pytest-9.0.3.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_sync.cpython-311-pytest-9.0.3.pyc +0 -0
- package/tools/todo-tool/tests/__pycache__/test_sync.cpython-314-pytest-9.0.2.pyc +0 -0
- package/tools/todo-tool/tests/test_api.py +0 -229
- package/tools/todo-tool/tests/test_cli.py +0 -214
- package/tools/todo-tool/tests/test_db.py +0 -214
- package/tools/todo-tool/tests/test_models.py +0 -24
- package/tools/todo-tool/tests/test_parser.py +0 -120
- package/tools/todo-tool/tests/test_projects_index.py +0 -185
- package/tools/todo-tool/tests/test_sync.py +0 -101
- package/tools/todo-tool/todo/__init__.py +0 -0
- package/tools/todo-tool/todo/__pycache__/__init__.cpython-311.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/__init__.cpython-314.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/cli.cpython-311.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/cli.cpython-314.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/db.cpython-311.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/db.cpython-314.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/models.cpython-311.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/models.cpython-314.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/parser.cpython-311.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/parser.cpython-314.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/projects_index.cpython-311.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/projects_index.cpython-314.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/server.cpython-311.pyc +0 -0
- package/tools/todo-tool/todo/__pycache__/server.cpython-314.pyc +0 -0
- package/tools/todo-tool/todo/cli.py +0 -208
- package/tools/todo-tool/todo/db.py +0 -289
- package/tools/todo-tool/todo/models.py +0 -41
- package/tools/todo-tool/todo/parser.py +0 -122
- package/tools/todo-tool/todo/projects_index.py +0 -152
- package/tools/todo-tool/todo/server.py +0 -98
- package/tools/todo-tool/todo/todo_format.yaml +0 -29
- package/tools/todo-tool/todo-tool.sh +0 -23
- package/tools/todo-tool/tool.json +0 -12
- package/tools/todo-tool/zshrc.snippet +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.19.0] - 2026-06-22
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- `sync-agent`:Syncthing 多设备同步工具与 skill — REST API 客户端、launchd 安装、CLI(start/stop/status/setup)、运行时管理同步 folder/device、为含 `.gitignore` 的目录自动创建 `.stignore`
|
|
14
|
+
- `hub`:TODO.md → SQLite 同步(启动时同步所有项目,ctrl+r 同步当前项目);`hub git` CLI 子命令(status/fetch/branches)与 TUI 对等;`hub projects remove` 命令 + TUI ctrl+d 快捷键
|
|
15
|
+
- `scout-philosophy`:skill 设计哲学研究 skill(meta bundle)
|
|
16
|
+
- `extract-url`:代码块支持;付费墙站点 cookie 重试;`HSKILL_EXTRACT_URL_CONFIG` 环境变量覆盖配置路径
|
|
17
|
+
- `learn-video`:新增字幕翻译步骤(translate_subs)
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- `learn-skill` → v2.0.0:报告持久化到全局 skill 库、四维度归纳式重构、新增 Step 4 跨 skill 索引摘要
|
|
21
|
+
- `analyze-skill` → `survey-skillrepo`:重命名并移至 research bundle,泛化到任意 skill 仓库并集成 learn-skill
|
|
22
|
+
- `extract-url`:重构为从 `~/.hskill/config.json` 读取配置,各脚本不再依赖位置参数
|
|
23
|
+
- `init-skill`:迁移至 experiment bundle;description 移除中文以符合 F3;支持可切换参考标准用于 A/B 实验
|
|
24
|
+
- `publish-skill`:新增 R4 installScope 检查与修复引导
|
|
25
|
+
- 13 篇设计 spec 迁移为正式文档(hub、sync-agent、opencode、init-skill 等)
|
|
26
|
+
- 修正多个 skill 内容哈希与版本号,并为 10 个 skill 补充 `installScope`
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
- `extract-url`:playwright_xcom 图片下载 SSL 验证、脚本路径/setup 顺序/超时/权限等修复
|
|
30
|
+
- `hub`:TUI remove 行为与 CLI 对齐、footer category map、remove 快捷键改为 ctrl+d
|
|
31
|
+
- `sync-agent`:平台感知的 Syncthing 配置路径(macOS/Linux)
|
|
32
|
+
- `learn-skill`:audit findings 修复,移除 reference/script 200 行读取上限
|
|
33
|
+
- 测试:survey-skillrepo fixture 版本同步至 2.0.1,修复 test_config.py 导入与 bats meta-bundle 断言
|
|
34
|
+
|
|
35
|
+
## [0.18.0] - 2026-06-16
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
- `learn-paper` skill:基于三遍阅读法的论文精读 skill(首次以 `read-paper` 命名引入,后改名为 `learn-paper`)
|
|
39
|
+
- `init-skill` skill:从设计文档脚手架生成新 skill
|
|
40
|
+
- `probe-chrome-session` skill(experiment bundle):Chrome profile cookie/session 探测与注入,支持 per-domain 加载策略
|
|
41
|
+
- `experiment` bundle:用于 staging 实验性 skill
|
|
42
|
+
- `publish-skill` F8:基于内容哈希的版本号检查,hash mismatch 时自动 bump
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
- `extract-vision`:overhaul 至 v1.2.0(PaddleOCR v3 API、lang options 修复)
|
|
46
|
+
- `capture-insight`:通过 `~/.hskill` 配置保存到 Writing Agent project
|
|
47
|
+
- release-profile.md 迁移到 `.hskill/release-project/`
|
|
48
|
+
|
|
49
|
+
### Removed
|
|
50
|
+
- 归档 `npm-release` skill(被 `release-project` 取代)
|
|
51
|
+
- 退役 `p-launch` 与 `todo-tool`(被 `hub` 取代),移除对应测试
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
- `publish-skill`:audit 违规修复
|
|
55
|
+
- `read-paper`:真实论文测试后发现的 5 个问题修复
|
|
56
|
+
|
|
10
57
|
## [0.17.1] - 2026-06-15
|
|
11
58
|
|
|
12
59
|
### Fixed
|
package/README.md
CHANGED
|
@@ -71,10 +71,10 @@ Shell 工具,安装到 `~/.local/bin/`。
|
|
|
71
71
|
|
|
72
72
|
| 工具 | Bundle | 说明 |
|
|
73
73
|
|------|--------|------|
|
|
74
|
-
| **
|
|
74
|
+
| **hub** | tools | 开发者 OS — 项目管理 + git 状态 + 任务跟踪 |
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
|
-
hskill install --tool
|
|
77
|
+
hskill install --tool hub
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
---
|
|
@@ -94,7 +94,7 @@ hskill # 交互式选择安装
|
|
|
94
94
|
hskill # 交互式选择
|
|
95
95
|
hskill install --bundle dev # 安装整个 bundle
|
|
96
96
|
hskill install --skill git-workflow-init # 安装单个 skill
|
|
97
|
-
hskill install --tool
|
|
97
|
+
hskill install --tool hub # 安装 shell 工具
|
|
98
98
|
hskill list # 查看可用 skill
|
|
99
99
|
hskill update # 更新到最新版
|
|
100
100
|
hskill --help # 查看帮助
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harveyz-skill",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Skill manager for Claude Code, Cursor, and Codex",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"prepack": "node scripts/generate-npmignore.js",
|
|
11
|
-
"test": "bats tests/ &&
|
|
11
|
+
"test": "bats tests/ && bash scripts/run-skill-tests.sh"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"bin/",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"skills/design/scout-brand/",
|
|
35
35
|
"skills/design/build-style/",
|
|
36
36
|
"skills/design/sync-design/",
|
|
37
|
-
"skills/
|
|
37
|
+
"skills/experiment/init-skill/",
|
|
38
|
+
"skills/research/survey-skillrepo/",
|
|
38
39
|
"skills/meta/clean-git/",
|
|
39
40
|
"skills/meta/archive-skill/",
|
|
40
41
|
"skills/meta/dedup-skill/",
|
|
@@ -42,8 +43,10 @@
|
|
|
42
43
|
"skills/meta/publish-skill/",
|
|
43
44
|
"skills/meta/runby-opencode/",
|
|
44
45
|
"skills/meta/release-project/",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
46
|
+
"skills/meta/sync-agent/",
|
|
47
|
+
"skills/experiment/probe-session/",
|
|
48
|
+
"skills/experiment/learn-paper/",
|
|
49
|
+
"skills/meta/scout-philosophy/",
|
|
47
50
|
"tools/hub/",
|
|
48
51
|
"hooks/check-similar-branch/"
|
|
49
52
|
],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: capture-insight
|
|
3
|
-
version: "
|
|
3
|
+
version: "2.0.0"
|
|
4
4
|
user_invocable: true
|
|
5
|
-
description: "Capture and record a fleeting insight or observation. Triggers immediately when the user expresses an observation, judgment, or idea — phrases like 'I noticed', 'just an observation', 'record this', 'insight', 'I have a judgment', or tossing out an opinionated thought. Distinct from 'I have an idea to execute' (that's a task). Clarifies the core with 2-3 quick Q&As, then saves to the insights/ folder. Trigger early — insights are fragile."
|
|
5
|
+
description: "Capture and record a fleeting insight or observation. Triggers immediately when the user expresses an observation, judgment, or idea — phrases like 'I noticed', 'just an observation', 'record this', 'insight', 'I have a judgment', or tossing out an opinionated thought. Distinct from 'I have an idea to execute' (that's a task). Clarifies the core with 2-3 quick Q&As, then saves to the Writing Agent project's insights/ folder. Trigger early — insights are fragile."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Capture Insight
|
|
@@ -35,6 +35,33 @@ description: "Capture and record a fleeting insight or observation. Triggers imm
|
|
|
35
35
|
|
|
36
36
|
## 流程
|
|
37
37
|
|
|
38
|
+
### 第〇步:确定写入项目路径
|
|
39
|
+
|
|
40
|
+
在开始澄清前,先读取配置:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
~/.hskill/capture-insight/config.json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**配置格式:**
|
|
47
|
+
```json
|
|
48
|
+
{ "writing_agent_path": "/path/to/writing-agent" }
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**若配置文件不存在:**
|
|
52
|
+
|
|
53
|
+
> "没找到 Writing Agent 项目配置。请确认项目路径(默认:`/Users/harveyzhang96/Projects/writing-agent`)?"
|
|
54
|
+
|
|
55
|
+
用户确认后,创建目录并写入配置:
|
|
56
|
+
```bash
|
|
57
|
+
mkdir -p ~/.hskill/capture-insight
|
|
58
|
+
echo '{"writing_agent_path": "/Users/harveyzhang96/Projects/writing-agent"}' > ~/.hskill/capture-insight/config.json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
配置确认后,将 `writing_agent_path` 记为 `{project_path}`,insight 写入目标为 `{project_path}/insights/`。
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
38
65
|
### 第一步:捕捉原始 insight
|
|
39
66
|
|
|
40
67
|
用户说出 insight 后,**先用一句话复述你理解的核心**,让用户确认或纠正方向。这一步不算"问问题",是对齐认知用的。
|
|
@@ -57,7 +84,7 @@ description: "Capture and record a fleeting insight or observation. Triggers imm
|
|
|
57
84
|
澄清完成后:
|
|
58
85
|
|
|
59
86
|
1. 给出一段 **insight 摘要**(3-5 句话),让用户确认是否准确捕捉到了核心
|
|
60
|
-
2.
|
|
87
|
+
2. 用户确认后,生成文件名,按以下步骤写入 `{project_path}/insights/`
|
|
61
88
|
|
|
62
89
|
---
|
|
63
90
|
|
|
@@ -95,18 +122,73 @@ description: "Capture and record a fleeting insight or observation. Triggers imm
|
|
|
95
122
|
|
|
96
123
|
---
|
|
97
124
|
|
|
125
|
+
## 写入 & Git 操作
|
|
126
|
+
|
|
127
|
+
确认写入 `{project_path}/insights/YYYY-MM-DD-<slug>.md` 后:
|
|
128
|
+
|
|
129
|
+
### 切换到 chore/insight 分支
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
cd {project_path}
|
|
133
|
+
|
|
134
|
+
# 1. 记录当前分支
|
|
135
|
+
ORIGINAL_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
136
|
+
|
|
137
|
+
# 2. 确定基准分支
|
|
138
|
+
if git show-ref --verify --quiet refs/heads/staging; then
|
|
139
|
+
BASE_BRANCH=staging
|
|
140
|
+
else
|
|
141
|
+
BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null \
|
|
142
|
+
| sed 's@^refs/remotes/origin/@@' || echo "main")
|
|
143
|
+
fi
|
|
144
|
+
|
|
145
|
+
# 3. 切换到 chore/insight(不存在则从 BASE_BRANCH 创建)
|
|
146
|
+
if git show-ref --verify --quiet refs/heads/chore/insight; then
|
|
147
|
+
git checkout chore/insight
|
|
148
|
+
else
|
|
149
|
+
git checkout -b chore/insight "$BASE_BRANCH"
|
|
150
|
+
fi
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**非 git 仓库**:若 `{project_path}` 不在 git 仓库中,跳过 git 步骤,直接写入文件。
|
|
154
|
+
|
|
155
|
+
### 写入文件
|
|
156
|
+
|
|
157
|
+
将 insight 内容写入 `{project_path}/insights/YYYY-MM-DD-<slug>.md`。
|
|
158
|
+
|
|
159
|
+
### 提交、合并、切回
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
cd {project_path}
|
|
163
|
+
|
|
164
|
+
# 1. 在 chore/insight 上提交
|
|
165
|
+
git add insights/YYYY-MM-DD-<slug>.md
|
|
166
|
+
git commit -m "insight: add YYYY-MM-DD-<slug>"
|
|
167
|
+
|
|
168
|
+
# 2. 合并到基准分支
|
|
169
|
+
git checkout "$BASE_BRANCH"
|
|
170
|
+
git merge --no-ff chore/insight -m "Merge chore/insight: YYYY-MM-DD-<slug>"
|
|
171
|
+
|
|
172
|
+
# 3. 切回原分支
|
|
173
|
+
git checkout "$ORIGINAL_BRANCH"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
98
178
|
## 注意事项
|
|
99
179
|
|
|
100
180
|
- **不要代替用户形成判断**。如果用户说"我觉得 XX 可能是个趋势",摘要里写"你观察到 XX 可能是个趋势",而不是"XX 是个重要趋势"。
|
|
101
181
|
- **保留用户的语气和颗粒度**。用户用的是模糊语言("感觉"、"好像"、"也许"),保存时也保留这种不确定性,不要帮他们"升级"成确定性判断。
|
|
102
182
|
- **简洁优先**。insight 文件不是分析报告,核心价值是"快速找回当时的思路",不是写详尽。
|
|
183
|
+
- **无论从哪个项目触发,始终写入 Writing Agent 项目**。`{project_path}` 来自配置,不受当前工作目录影响。
|
|
103
184
|
|
|
104
185
|
---
|
|
105
186
|
|
|
106
187
|
## 保存后告诉用户
|
|
107
188
|
|
|
108
189
|
```
|
|
109
|
-
✓ 已保存到 insights/YYYY-MM-DD-<slug>.md
|
|
190
|
+
✓ 已保存到 {project_path}/insights/YYYY-MM-DD-<slug>.md
|
|
191
|
+
提交到 chore/insight,合并到 {BASE_BRANCH},当前回到 {ORIGINAL_BRANCH}。
|
|
110
192
|
|
|
111
193
|
[如果发现这个 insight 与现有文章方向相关,可以顺带一提,但不要主动推销"你可以写篇文章"]
|
|
112
194
|
```
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init-skill
|
|
3
|
+
description: "Initialize a new skill from scratch in the harveyz-skill repo — scaffolds SKILL.md, directory structure, and a feature branch from a design spec or free-form notes. Applies the condensed skill design standard (16 philosophies + system mechanisms). Triggers: 'create new skill', 'scaffold a skill', 'init skill', 'bootstrap skill from notes', 'create skill from spec', 'help me start a new skill', 'initialize a skill'."
|
|
4
|
+
user_invocable: true
|
|
5
|
+
version: "1.2.0"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# 从设计文档初始化新 Skill
|
|
9
|
+
|
|
10
|
+
将设计文档(结构化 spec 或自由格式笔记)转化为符合规范的 SKILL.md,创建目录结构和功能分支,交棒给 `publish-skill` 完成注册。
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 触发条件
|
|
15
|
+
|
|
16
|
+
触发本 skill:
|
|
17
|
+
- "创建新 skill"、"初始化一个 skill"、"新建 skill"
|
|
18
|
+
- "从这份 spec 生成 skill"、"help me start a new skill"
|
|
19
|
+
- "scaffold skill"、"bootstrap skill"
|
|
20
|
+
|
|
21
|
+
不触发(其他 skill 负责):
|
|
22
|
+
- 从其他项目**导入**已有 skill → 使用 `contribute-skill`
|
|
23
|
+
- **校验格式或注册** index → 使用 `publish-skill`
|
|
24
|
+
- **修改**已有 skill 内容 → 直接编辑对应 SKILL.md
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 参考标准
|
|
29
|
+
|
|
30
|
+
本 skill 使用 `references/skill-standard.md` 作为单一标准——精简版(约 200 行),含 16 条设计哲学 + 系统机制 + 张力点。Step 2 加载该文件并对照检查。
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 执行流程(6 步)
|
|
35
|
+
|
|
36
|
+
### Step 0 — 需求澄清
|
|
37
|
+
|
|
38
|
+
在任何操作之前,确认以下信息是否完整:
|
|
39
|
+
|
|
40
|
+
- **核心用途**:要创建的 skill 做什么?(哪怕一句话)
|
|
41
|
+
- **设计文档**:是否有 spec 文件路径或可粘贴的描述?还是完全从对话出发?
|
|
42
|
+
- **命名偏好**:是否有指定名称,或由 Claude 根据内容推断?
|
|
43
|
+
|
|
44
|
+
澄清策略:
|
|
45
|
+
- 每次只问一个问题,不堆叠
|
|
46
|
+
- 上下文能推断的不再问
|
|
47
|
+
- 持续提问直到需求完整、无歧义为止
|
|
48
|
+
|
|
49
|
+
只有需求明确后才进入 Step 1。
|
|
50
|
+
|
|
51
|
+
### Step 1 — 定位设计文档
|
|
52
|
+
|
|
53
|
+
按优先级定位输入来源:
|
|
54
|
+
|
|
55
|
+
1. 用户在对话中粘贴的描述文本 → 直接使用
|
|
56
|
+
2. 用户指定的文件路径 → 用 Read 工具读取
|
|
57
|
+
3. 自动扫描最近修改的 spec:
|
|
58
|
+
```bash
|
|
59
|
+
ls -t docs/superpowers/specs/*.md | head -5
|
|
60
|
+
```
|
|
61
|
+
列出候选文件供用户选择。
|
|
62
|
+
|
|
63
|
+
### Step 2 — 提炼要素 + 标准检查
|
|
64
|
+
|
|
65
|
+
**2a. 加载标准:** 用 Read 工具读取 `references/skill-standard.md`(精简版,约 200 行)。
|
|
66
|
+
|
|
67
|
+
**2b. 提炼要素:** 从设计文档中提取以下字段:
|
|
68
|
+
|
|
69
|
+
| 字段 | 提取值 | 规范约束 |
|
|
70
|
+
|------|--------|---------|
|
|
71
|
+
| `name` | `<verb>-<noun>` 格式 | 动词必须在标准词表中 |
|
|
72
|
+
| `bundle` | 从现有 bundleMeta 中选 | 可新建 |
|
|
73
|
+
| `description` | 英文,含触发短语 | ≥ 10 字符,仅英文 |
|
|
74
|
+
| 正文大纲 | 中文,核心步骤列表 | — |
|
|
75
|
+
| `category` 目录 | 对应 bundle 的目录名 | — |
|
|
76
|
+
|
|
77
|
+
读取现有 bundle 列表:
|
|
78
|
+
```bash
|
|
79
|
+
node -e "const i=JSON.parse(require('fs').readFileSync('skills-index.json','utf8')); Object.entries(i.bundleMeta).forEach(([k,v])=>console.log(k+': '+v))"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**2c. 适用哲学识别:** 对照标准的 16 条哲学,识别本 skill 涉及的(通常 3–10 条)。每条按"触发"条件判断是否成立。
|
|
83
|
+
|
|
84
|
+
**2d. 标准检查:** 逐条核对相关哲学的"必做"和"检查"项,输出:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
[✓] Φ1 可回退 — 破坏性 step 前有 y/n 确认
|
|
88
|
+
[✓] Φ5 配置就地 — 路径 .hskill/<name>/ 正确
|
|
89
|
+
[!] Φ12 输入清洁化 — URL 输入缺少控制字符剥离,建议加 re.sub(...)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
涉及多哲学冲突时查标准末尾"张力点"表消歧。
|
|
93
|
+
|
|
94
|
+
**等用户明确确认后才进入 Step 3。**
|
|
95
|
+
|
|
96
|
+
### Step 3 — 生成 SKILL.md
|
|
97
|
+
|
|
98
|
+
根据确认后的要素,生成完整 SKILL.md,遵循以下结构:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
---
|
|
102
|
+
name: <name>
|
|
103
|
+
description: "<英文,含触发短语列表>"
|
|
104
|
+
user_invocable: true
|
|
105
|
+
version: "1.0.0"
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
# <正文标题(中文)>
|
|
109
|
+
|
|
110
|
+
## 触发条件
|
|
111
|
+
(覆盖"触发"和"不触发"两种情况)
|
|
112
|
+
|
|
113
|
+
## 执行步骤(Step 0 — Step N)
|
|
114
|
+
|
|
115
|
+
### Step 0 — 需求澄清
|
|
116
|
+
(如适用)
|
|
117
|
+
|
|
118
|
+
### Step 1 — ...
|
|
119
|
+
...
|
|
120
|
+
|
|
121
|
+
## 不在范围内
|
|
122
|
+
(2-4 条明确边界)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
若 skill 有参考材料(查找表、模板、禁忌清单)且超过 20 行,按标准 Φ18 提取到 `references/` 子目录,而非全部内联在 SKILL.md 中。
|
|
126
|
+
|
|
127
|
+
将生成内容展示给用户预览。**等用户明确确认后才进入 Step 4。**
|
|
128
|
+
|
|
129
|
+
### Step 4 — 创建目录并写入文件
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
REPO_ROOT=$(git rev-parse --show-toplevel)
|
|
133
|
+
mkdir -p "${REPO_ROOT}/skills/<category>/<name>/"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
若目标路径已存在:停止并报错,提示用户使用 `publish-skill` 更新已有 skill,不覆盖任何文件。
|
|
137
|
+
|
|
138
|
+
用 Write 工具写入 `skills/<category>/<name>/SKILL.md`。
|
|
139
|
+
|
|
140
|
+
### Step 5 — 创建功能分支并初始 commit
|
|
141
|
+
|
|
142
|
+
执行前检查:
|
|
143
|
+
```bash
|
|
144
|
+
git status --short
|
|
145
|
+
```
|
|
146
|
+
若有未提交的修改(输出非空):停止并提示用户先提交或暂存当前变更,再重新运行 Step 5。
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
git checkout -b feature/init-<name>
|
|
150
|
+
git add skills/<category>/<name>/
|
|
151
|
+
git commit -m "feat(skill): scaffold <name>"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
输出摘要:
|
|
155
|
+
```
|
|
156
|
+
✓ SKILL.md 已生成:skills/<category>/<name>/SKILL.md
|
|
157
|
+
✓ 分支:feature/init-<name>
|
|
158
|
+
下一步:运行 /publish-skill 完成格式校验和 skills-index.json 注册
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 不在范围内
|
|
164
|
+
|
|
165
|
+
- 注册到 `skills-index.json`(由 `publish-skill` 负责)
|
|
166
|
+
- 修改或更新已有 skill(目标路径已存在时直接报错)
|
|
167
|
+
- 批量创建多个 skill(每次只处理一个)
|
|
168
|
+
- 编写 skill 的实际业务逻辑(只生成符合规范的骨架)
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Skill Authoring Guide
|
|
2
|
+
|
|
3
|
+
init-skill 使用本文件作为生成新 skill 时的规范检查清单。内容分两类:**显性规范**(硬性要求,不符合则 publish-skill 报错)和**隐性模式**(从现有优质 skill 提炼的最佳实践)。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 显性规范
|
|
8
|
+
|
|
9
|
+
### 命名
|
|
10
|
+
|
|
11
|
+
- 目录名格式:`<verb>-<noun>`(2 段,连字符分隔,全小写)
|
|
12
|
+
- 动词必须在词表中:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
extract learn forge draw manage migrate scout
|
|
16
|
+
build sync publish archive contribute analyze clean
|
|
17
|
+
release validate init dispatch close setup capture
|
|
18
|
+
runby dedup survey
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
特殊:以 `runby-` 开头的目录直接视为合规。
|
|
22
|
+
|
|
23
|
+
### Frontmatter 必填字段
|
|
24
|
+
|
|
25
|
+
| 字段 | 要求 |
|
|
26
|
+
|------|------|
|
|
27
|
+
| `name` | 非空,值 == 目录名 |
|
|
28
|
+
| `description` | 英文,≥ 10 字符,不含中文字符 |
|
|
29
|
+
| `user_invocable` | 显式声明 `true` 或 `false` |
|
|
30
|
+
| `version` | semver 格式 `X.Y.Z`,初始值 `"1.0.0"` |
|
|
31
|
+
|
|
32
|
+
### description 格式
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
"<动词短语说明功能>. Triggers when <触发条件>. e.g. '<示例指令1>', '<示例指令2>'."
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
触发词宁宽勿窄,但要避免与现有 skill 触发场景重叠。举例比描述更精确。
|
|
39
|
+
|
|
40
|
+
### 正文语言
|
|
41
|
+
|
|
42
|
+
frontmatter 结束后的正文应为中文(含至少一个中文字符即合规)。
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 隐性模式
|
|
47
|
+
|
|
48
|
+
### 正文结构
|
|
49
|
+
|
|
50
|
+
推荐节顺序:**触发条件 → 执行步骤(Step N) → 边界说明(不在范围内)**
|
|
51
|
+
|
|
52
|
+
- 每个 Step 对应一个可验证的原子操作,不要把两个动作塞进同一步
|
|
53
|
+
- 边界说明必须有,明确列出 2-4 个常见误用场景,防止 skill 在对话中被过度扩展
|
|
54
|
+
|
|
55
|
+
### 状态与配置
|
|
56
|
+
|
|
57
|
+
**1. `.hskill/<skill-name>/` 配置缓存**(7 个 skill 使用此模式)
|
|
58
|
+
|
|
59
|
+
有状态的 skill 将配置持久化到 `$HOME/.hskill/<skill-name>/`,每次运行 Step 1 先读此目录,未找到时落到默认值或询问用户。
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
clean-git → ~/.hskill/clean-git/branch-cleanup.md
|
|
63
|
+
init-workflow → ~/.hskill/init-workflow/workflow-config.yml
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**2. "读取配置"作为第一执行步骤**(6 个 skill 使用此模式)
|
|
67
|
+
|
|
68
|
+
有状态 skill 的第一个实质步骤总是:检测配置文件存在性 → 不存在则用默认或询问 → 解析校验 → 才进入业务步骤。
|
|
69
|
+
|
|
70
|
+
**3. Lock / snapshot 文件做变更检测**(3 个 skill 使用此模式)
|
|
71
|
+
|
|
72
|
+
维护 `.lock` 或 manifest 快照,记录"上次运行状态",实现 delta 操作(只处理变化部分)。
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
init-workflow → .githooks/.workflow-config.lock.yml
|
|
76
|
+
sync-design → manifest.json 含 lastSyncCommit
|
|
77
|
+
publish-skill → skills-index.json 中的 contentHash
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**4. 多源配置覆盖链**(3 个 skill 使用此模式)
|
|
81
|
+
|
|
82
|
+
多个配置源按固定顺序读取,后读优先级更高。明确注明"后读内容优先级更高"。
|
|
83
|
+
|
|
84
|
+
### 错误处理与边界
|
|
85
|
+
|
|
86
|
+
**5. "边界情况"表格放在步骤末尾**(5 个 skill 使用此模式)
|
|
87
|
+
|
|
88
|
+
复杂多分支步骤末尾用表格列出所有边界条件和处理方式,便于一眼看全所有路径。
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
| 情况 | 处理 |
|
|
92
|
+
|------|------|
|
|
93
|
+
| 目标路径已存在 | 停止报错,不覆盖 |
|
|
94
|
+
| generate-npmignore.js 失败 | 报错,不执行 git 操作 |
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**6. 冲突解决:批量收集,统一决策**(3 个 skill 使用此模式)
|
|
98
|
+
|
|
99
|
+
出现冲突时,先收集所有冲突再分组展示,让用户一次性逐条决策。不要边发现边问。
|
|
100
|
+
|
|
101
|
+
### 扩展与组合
|
|
102
|
+
|
|
103
|
+
**7. references/ 承载平台/技术栈特定文档**(5 个 skill 使用此模式)
|
|
104
|
+
|
|
105
|
+
Skill 顶层逻辑保持技术中立,平台/格式特定内容放进 `references/`,运行时按检测结果动态读取。扩展通过加文件而非改 SKILL.md。
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
setup-debug → references/tech-stacks/<stack>.md
|
|
109
|
+
extract-url → platforms/SKILL.<platform>.md
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
阈值:references/ 内单文件 > 20 行时才提取;小内容直接内联。
|
|
113
|
+
|
|
114
|
+
**8. Subagent 委派 + 变量注入**(2 个 skill 使用此模式)
|
|
115
|
+
|
|
116
|
+
Skill 委派 subagent 时用环境变量注入运行时值(不是字符串拼接),并加载平台特定 patch 文件。
|
|
117
|
+
|
|
118
|
+
### 输出格式
|
|
119
|
+
|
|
120
|
+
**9. Emoji 与状态标记规范化**(5 个 skill 使用此模式)
|
|
121
|
+
|
|
122
|
+
统一视觉符号:`✓` / `✅`(通过)、`⚠️`(注意)、`❌`(失败)、`━━━`(分组分隔)。状态标签:`UPDATED` / `UNCHANGED` / `NEW` / `OK` / `FAIL`。
|
|
123
|
+
|
|
124
|
+
**10. 时间戳化 delta 报告**(3 个 skill 使用此模式)
|
|
125
|
+
|
|
126
|
+
批量操作后每个条目标注状态(NEW / UPDATED / UNCHANGED),用户可跳过未变项。
|
|
127
|
+
|
|
128
|
+
```markdown
|
|
129
|
+
| 文件 | 状态 |
|
|
130
|
+
|------|------|
|
|
131
|
+
| .githooks/pre-commit | UPDATED |
|
|
132
|
+
| .githooks/commit-msg | UNCHANGED |
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**11. "下一步"交棒提示**(4 个 skill 使用此模式)
|
|
136
|
+
|
|
137
|
+
Skill 完成后给出明确的下一步建议:调用下一个 skill,或询问用户是否深入某部分。
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
scout-brand: "确认后可运行 /build-style"
|
|
141
|
+
init-skill: "下一步:运行 /publish-skill 完成注册"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### 安全与规范
|
|
145
|
+
|
|
146
|
+
**12. Bash 安全:禁止字符串拼接**(3 个 skill 使用此模式)
|
|
147
|
+
|
|
148
|
+
Skill 中嵌入 bash/Python 时,禁止用 shell 字符串拼接传值。使用 `subprocess` 列表参数或环境变量;URL 净化用正则替换。
|
|
149
|
+
|
|
150
|
+
**13. 版本字段在内容 hash 计算中视为占位**(2 个 skill 使用此模式)
|
|
151
|
+
|
|
152
|
+
计算 SKILL.md 内容 hash 时,将 `version:` 行替换为固定占位符再计算,避免单纯改版本号触发"内容变更"误报。
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
sed 's/^version:.*$/version: __HASH_PLACEHOLDER__/' SKILL.md | sha256sum | cut -c1-16
|
|
156
|
+
```
|