harveyz-skill 0.14.1 → 0.15.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 +24 -0
- package/bin/cli.js +14 -2
- package/lib/installer.js +64 -0
- package/package.json +25 -24
- package/skills/coding/{task-close → close-task}/SKILL.md +1 -1
- package/skills/coding/{pm-task-dispatch → dispatch-task}/SKILL.md +1 -1
- package/skills/coding/{git-workflow-init → init-workflow}/SKILL.md +1 -1
- package/skills/coding/{full-stack-debug-env → setup-debug}/SKILL.md +1 -1
- package/skills/creative/{insight → capture-insight}/SKILL.md +1 -1
- package/skills/creative/{add-todo → capture-todo}/SKILL.md +1 -1
- package/skills/design/{style-build → build-style}/SKILL.md +13 -13
- package/skills/design/{brand-scout → scout-brand}/SKILL.md +6 -6
- package/skills/design/{sync-design-html → sync-design}/SKILL.md +1 -1
- package/skills/meta/{skill-analyzer → analyze-skill}/SKILL.md +1 -1
- package/skills/meta/archive-skill/SKILL.md +170 -0
- package/skills/meta/{git-cleanup → clean-git}/SKILL.md +1 -1
- package/skills/meta/dedup-skill/SKILL.md +187 -0
- package/skills/meta/dedup-skill/references/auto-scan.md +37 -0
- package/skills/meta/{skill-publish → publish-skill}/SKILL.md +31 -3
- package/skills/meta/release-project/SKILL.md +224 -0
- package/skills/meta/release-project/references/release-profile-template.md +19 -0
- package/skills/meta/{opencode-runner → runby-opencode}/SKILL.md +1 -1
- package/skills/research/{url-extract → extract-url}/SKILL.md +1 -1
- package/skills/research/{vision-extract → extract-vision}/SKILL.md +1 -1
- package/skills/research/{youtube-learner → learn-video}/SKILL.md +1 -1
- package/skills/writing/{diagram → draw-diagram}/SKILL.md +1 -1
- package/skills/writing/{doc-forge → forge-doc}/SKILL.md +29 -29
- package/skills/writing/{doc-forge → forge-doc}/scripts/__pycache__/md_to_pdf.cpython-314.pyc +0 -0
- package/skills/writing/{dir-manage → manage-dir}/SKILL.md +1 -1
- package/skills/writing/{diataxis-docs → manage-docs}/SKILL.md +1 -1
- package/skills/writing/{migrate-specs → migrate-spec}/SKILL.md +1 -1
- package/skills-index.json +120 -29
- package/tools/hub/hub/cli/__pycache__/projects.cpython-314.pyc +0 -0
- package/tools/hub/hub/cli/projects.py +22 -0
- package/tools/hub/hub/core/__pycache__/projects.cpython-314.pyc +0 -0
- package/tools/hub/hub/core/projects.py +58 -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/app.py +22 -6
- 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/hub/tui/panels/git.py +2 -0
- package/tools/hub/hub/tui/panels/projects.py +58 -2
- package/tools/hub/hub/tui/panels/tasks.py +2 -2
- package/tools/hub/hub.sh +12 -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_db.cpython-314-pytest-9.0.2.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_projects.cpython-314-pytest-9.0.2.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_tasks.cpython-314-pytest-9.0.2.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_git.cpython-314-pytest-9.0.2.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_projects_panel.cpython-314-pytest-9.0.2.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/test_scan.py +89 -0
- package/tools/hub/tests/test_tui_app.py +1 -1
- package/tools/hub/tests/test_tui_projects_panel.py +62 -1
- package/tools/hub/tests/test_tui_tasks_panel.py +5 -5
- package/skills/meta/npm-release/SKILL.md +0 -214
- package/skills/research/article-fetcher/SKILL.md +0 -209
- package/skills/research/article-fetcher/references/__pycache__/article_utils.cpython-314.pyc +0 -0
- package/skills/research/article-fetcher/references/article_utils.py +0 -252
- package/skills/research/article-fetcher/scripts/import_reading.py +0 -75
- package/skills/research/article-fetcher/scripts/init_db.py +0 -33
- package/skills/research/article-fetcher/scripts/playwright_xcom.py +0 -221
- package/skills/research/article-fetcher/scripts/url-index.db +0 -0
- package/skills/research/article-fetcher/scripts/url-index.db.bak +0 -0
- package/skills/research/article-fetcher/tests/test_security.py +0 -257
- package/skills/research/article-fetcher/vars.json +0 -12
- package/skills/research/url-extract/references/__pycache__/article_utils.cpython-314.pyc +0 -0
- package/skills/research/url-extract/references/file-format.md +0 -73
- package/skills/research/url-extract/scripts/playwright_web.py +0 -172
- package/skills/research/url-extract/scripts/validate_article.py +0 -36
- package/skills/writing/doc-forge/tests/__pycache__/test_md_to_pdf.cpython-314-pytest-9.0.2.pyc +0 -0
- /package/skills/coding/{task-close → close-task}/references/output-templates.md +0 -0
- /package/skills/coding/{pm-task-dispatch → dispatch-task}/references/agent-mapping.md +0 -0
- /package/skills/coding/{pm-task-dispatch → dispatch-task}/references/task-template.md +0 -0
- /package/skills/coding/{git-workflow-init → init-workflow}/references/acceptance-test.md +0 -0
- /package/skills/coding/{git-workflow-init → init-workflow}/references/conflict-analysis.md +0 -0
- /package/skills/coding/{git-workflow-init → init-workflow}/references/git-workflow-template.md +0 -0
- /package/skills/coding/{git-workflow-init → init-workflow}/references/hook-templates.md +0 -0
- /package/skills/coding/{git-workflow-init → init-workflow}/references/lock-file-format.md +0 -0
- /package/skills/coding/{git-workflow-init → init-workflow}/references/render_docs.py +0 -0
- /package/skills/coding/{git-workflow-init → init-workflow}/references/workflow-config.yml +0 -0
- /package/skills/coding/{full-stack-debug-env → setup-debug}/evals/evals.json +0 -0
- /package/skills/coding/{full-stack-debug-env → setup-debug}/references/README.md +0 -0
- /package/skills/coding/{full-stack-debug-env → setup-debug}/references/tech-stacks/browser-spa.md +0 -0
- /package/skills/coding/{full-stack-debug-env → setup-debug}/references/tech-stacks/docker-compose.md +0 -0
- /package/skills/coding/{full-stack-debug-env → setup-debug}/references/tech-stacks/electron.md +0 -0
- /package/skills/coding/{full-stack-debug-env → setup-debug}/references/tech-stacks/node-process.md +0 -0
- /package/skills/design/{style-build → build-style}/references/FORMAT-MAPPING.md +0 -0
- /package/skills/design/{brand-scout → scout-brand}/references/TEMPLATE.md +0 -0
- /package/skills/design/{sync-design-html → sync-design}/references/stack-electron.md +0 -0
- /package/skills/design/{sync-design-html → sync-design}/references/stack-nextjs.md +0 -0
- /package/skills/design/{sync-design-html → sync-design}/references/stack-react.md +0 -0
- /package/skills/design/{sync-design-html → sync-design}/references/stack-swiftui.md +0 -0
- /package/skills/design/{sync-design-html → sync-design}/references/stack-vue.md +0 -0
- /package/skills/design/{sync-design-html → sync-design}/references/stacks.md +0 -0
- /package/skills/meta/{skill-analyzer → analyze-skill}/CHANGELOG.md +0 -0
- /package/skills/meta/{skill-analyzer → analyze-skill}/references/evaluation-template.md +0 -0
- /package/skills/meta/{skill-analyzer → analyze-skill}/references/output-template.md +0 -0
- /package/skills/meta/{skill-analyzer → analyze-skill}/references/prohibitions.md +0 -0
- /package/skills/research/{url-extract → extract-url}/platforms/SKILL.claude.md +0 -0
- /package/skills/research/{url-extract → extract-url}/platforms/SKILL.codex.md +0 -0
- /package/skills/research/{url-extract → extract-url}/platforms/SKILL.hermes.md +0 -0
- /package/skills/research/{url-extract → extract-url}/references/article_utils.py +0 -0
- /package/skills/research/{url-extract → extract-url}/references/core-flow.md +0 -0
- /package/skills/research/{article-fetcher → extract-url}/references/file-format.md +0 -0
- /package/skills/research/{url-extract → extract-url}/scripts/dedup_check.py +0 -0
- /package/skills/research/{url-extract → extract-url}/scripts/detect_chrome_profile.py +0 -0
- /package/skills/research/{article-fetcher → extract-url}/scripts/playwright_web.py +0 -0
- /package/skills/research/{url-extract → extract-url}/scripts/playwright_xcom.py +0 -0
- /package/skills/research/{article-fetcher → extract-url}/scripts/validate_article.py +0 -0
- /package/skills/research/{url-extract → extract-url}/vars.json +0 -0
- /package/skills/writing/{diagram → draw-diagram}/references/color-templates.md +0 -0
- /package/skills/writing/{diagram → draw-diagram}/references/flowchart.md +0 -0
- /package/skills/writing/{diagram → draw-diagram}/references/gantt-timeline.md +0 -0
- /package/skills/writing/{diagram → draw-diagram}/references/other-charts.md +0 -0
- /package/skills/writing/{diagram → draw-diagram}/references/sequence.md +0 -0
- /package/skills/writing/{diagram → draw-diagram}/references/statediagram.md +0 -0
- /package/skills/writing/{diagram → draw-diagram}/scripts/check_mermaid.py +0 -0
- /package/skills/writing/{diagram → draw-diagram}/tests/bain-style-test.md +0 -0
- /package/skills/writing/{diagram → draw-diagram}/themes/bain.json +0 -0
- /package/skills/writing/{diagram → draw-diagram}/themes/bcg.json +0 -0
- /package/skills/writing/{diagram → draw-diagram}/themes/rb.json +0 -0
- /package/skills/writing/{diagram → draw-diagram}/themes/rolandberger.json +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/assets/bain-style.json +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/assets/bain.css +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/assets/bcg-style.json +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/assets/bcg.css +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/assets/rolandberger-style.json +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/assets/rolandberger.css +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/assets/template.html +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/assets/thesis-style.json +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/assets/thesis.css +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/preview/style-preview.html +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/scripts/generate_style_preview.py +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/scripts/md_to_docx.py +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/scripts/md_to_pdf.py +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/full-test-bain.docx +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/full-test-bain.pdf +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/full-test-bcg.docx +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/full-test-bcg.pdf +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/full-test-custom.docx +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/full-test-custom.pdf +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/full-test-rb.docx +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/full-test-rb.pdf +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/full-test-thesis.docx +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/full-test-thesis.pdf +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/full-test.md +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/fixtures/sample.png +0 -0
- /package/skills/writing/{doc-forge → forge-doc}/tests/test_md_to_pdf.py +0 -0
- /package/skills/writing/{dir-manage → manage-dir}/references/built-in/diataxis.md +0 -0
- /package/skills/writing/{dir-manage → manage-dir}/references/built-in/role-based.md +0 -0
- /package/skills/writing/{dir-manage → manage-dir}/references/methodology-spec.md +0 -0
- /package/skills/writing/{diataxis-docs → manage-docs}/references/custom-categories.md +0 -0
- /package/skills/writing/{diataxis-docs → manage-docs}/references/index-template.md +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.15.0] - 2026-06-15
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- `dedup-skill`:新增 meta skill,扫描并分析各 skill 间的重复内容,生成去重报告
|
|
14
|
+
- `archive-skill`:新增 meta skill,将废弃 skill 移至 `skills/archived/` 并更新 skills-index.json
|
|
15
|
+
- `article-fetcher`:归档(superseded by `url-extract`)
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Skill 命名规范**:22 个 skill 目录统一重命名为 verb-noun 格式(如 `skill-analyzer` → `analyze-skill`、`doc-forge` → `forge-doc`、`diagram` → `draw-diagram` 等)
|
|
19
|
+
- `hskill update`:自动执行 skill 目录迁移,将旧名称映射到新 verb-noun 名称
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- `archive-skill`:修复 eval 测试发现的 3 个 bug(v1.1.0)
|
|
23
|
+
- `hub-tui`:修复 GitPanel 无法获得焦点的问题(`can_focus=True`)
|
|
24
|
+
- `hub-tui`:Enter 键在 projects-list 焦点时正确触发打开项目
|
|
25
|
+
- `hub-tui`:新增 ←/→ 键切换列,Tab 保留为辅助导航
|
|
26
|
+
- `installer`:`migrateRenamedSkills` 新增输入校验和一致性日志
|
|
27
|
+
|
|
28
|
+
## [0.14.2] - 2026-06-15
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- `project-release`:description 字段改为英文,符合 skill-publish F3 格式规范
|
|
32
|
+
- `project-release`:移除 `npm-release` skill,以 `.hskill/release-profile.md` 替代,消除重复
|
|
33
|
+
|
|
10
34
|
## [0.14.1] - 2026-06-14
|
|
11
35
|
|
|
12
36
|
### Fixed
|
package/bin/cli.js
CHANGED
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
resolveSkills, resolveSkillsByName, resolveTools, resolveToolsByName,
|
|
14
14
|
TOOL_BUNDLE_CHOICES,
|
|
15
15
|
} from '../lib/bundles.js'
|
|
16
|
-
import { buildTargetChoices, resolveTargets, TARGETS, USER_ONLY_TARGETS } from '../lib/targets.js'
|
|
17
|
-
import { installSkills, installTools, installHooks, installHooksForTarget, uninstallHook, uninstallTool, uninstallSkill } from '../lib/installer.js'
|
|
16
|
+
import { buildTargetChoices, resolveTargets, TARGETS, USER_ONLY_TARGETS, SKILL_TARGETS, userSkillDir } from '../lib/targets.js'
|
|
17
|
+
import { installSkills, installTools, installHooks, installHooksForTarget, uninstallHook, uninstallTool, uninstallSkill, migrateRenamedSkills } from '../lib/installer.js'
|
|
18
18
|
|
|
19
19
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
20
20
|
const require = createRequire(import.meta.url)
|
|
@@ -154,6 +154,18 @@ if (subcommand === 'update') {
|
|
|
154
154
|
console.error(chalk.red(' ✗ Update failed. Try: npm update -g harveyz-skill'))
|
|
155
155
|
process.exit(1)
|
|
156
156
|
}
|
|
157
|
+
// Run skill rename migrations
|
|
158
|
+
const { renames = [], skills: skillDefs = [] } = require('../skills-index.json')
|
|
159
|
+
if (renames.length > 0) {
|
|
160
|
+
console.log(chalk.dim(' · Migrating renamed skills…'))
|
|
161
|
+
const targets = SKILL_TARGETS.map(name => ({ name, dir: userSkillDir(name) }))
|
|
162
|
+
const skillsRoot = path.join(__dirname, '..', 'skills')
|
|
163
|
+
const migrationSummary = await migrateRenamedSkills(renames, targets, skillsRoot, skillDefs)
|
|
164
|
+
const totalMigrated = Object.values(migrationSummary).reduce((n, s) => n + s.migrated.length, 0)
|
|
165
|
+
const totalFailed = Object.values(migrationSummary).reduce((n, s) => n + s.failed.length, 0)
|
|
166
|
+
if (totalMigrated > 0) console.log(chalk.green(` ✔ Migrated ${totalMigrated} skill(s)`))
|
|
167
|
+
if (totalFailed > 0) console.log(chalk.yellow(` ⚠ ${totalFailed} migration(s) failed — check output above`))
|
|
168
|
+
}
|
|
157
169
|
const legacyDir = path.join(os.homedir(), '.local', 'share', 'hskill')
|
|
158
170
|
if (existsSync(legacyDir)) {
|
|
159
171
|
console.log('')
|
package/lib/installer.js
CHANGED
|
@@ -702,3 +702,67 @@ export async function uninstallHook(hookName, scope, projectDir) {
|
|
|
702
702
|
|
|
703
703
|
return { removed }
|
|
704
704
|
}
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* Migrate renamed skills across all user-level target platforms.
|
|
708
|
+
* Reads renames[] from skills-index.json and removes old dirs, installs new ones.
|
|
709
|
+
*
|
|
710
|
+
* @param {Array<{from: string, to: string}>} renames
|
|
711
|
+
* @param {Array<{name: string, dir: string}>} targets - from resolveTargets()
|
|
712
|
+
* @param {string} skillsRoot - absolute path to the skills/ source directory
|
|
713
|
+
* @param {Array<{path: string, bundle: string}>} skillDefs - skills[] from skills-index.json
|
|
714
|
+
* @returns {Promise<Object>} summary keyed by target name
|
|
715
|
+
*/
|
|
716
|
+
export async function migrateRenamedSkills(renames, targets, skillsRoot, skillDefs) {
|
|
717
|
+
// Fix 1: Guard against null/undefined renames
|
|
718
|
+
if (!renames?.length) return {}
|
|
719
|
+
|
|
720
|
+
const summary = {}
|
|
721
|
+
|
|
722
|
+
for (const { name: targetName, dir: targetDir } of targets) {
|
|
723
|
+
// Fix 2: Improved logging when targetDir doesn't exist
|
|
724
|
+
if (!await fs.pathExists(targetDir)) {
|
|
725
|
+
console.error(chalk.dim(` · ${targetName}: skills dir not found, skipping`))
|
|
726
|
+
continue
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
const migrated = []
|
|
730
|
+
const skipped = []
|
|
731
|
+
const failed = []
|
|
732
|
+
|
|
733
|
+
for (const { from: oldName, to: newName } of renames) {
|
|
734
|
+
const oldPath = path.join(targetDir, oldName)
|
|
735
|
+
if (!await fs.pathExists(oldPath)) {
|
|
736
|
+
// Fix 3: Consistent logging for skipped items
|
|
737
|
+
skipped.push({ from: oldName, to: newName, reason: 'not_installed' })
|
|
738
|
+
console.error(chalk.dim(` · ${targetName}: ${oldName} not installed, skipping`))
|
|
739
|
+
continue
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// Find source for new name
|
|
743
|
+
const skillDef = skillDefs.find(s => s.path.split('/').pop() === newName)
|
|
744
|
+
if (!skillDef) {
|
|
745
|
+
failed.push({ from: oldName, to: newName, reason: 'source_not_found' })
|
|
746
|
+
console.error(chalk.red(` ✗ No source found for ${newName}`))
|
|
747
|
+
continue
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
const srcPath = path.join(skillsRoot, skillDef.path)
|
|
751
|
+
const newPath = path.join(targetDir, newName)
|
|
752
|
+
|
|
753
|
+
try {
|
|
754
|
+
await fs.remove(oldPath)
|
|
755
|
+
await copyDir(srcPath, newPath, {})
|
|
756
|
+
migrated.push({ from: oldName, to: newName })
|
|
757
|
+
console.error(chalk.green(` ✓ ${targetName}: ${oldName} → ${newName}`))
|
|
758
|
+
} catch (err) {
|
|
759
|
+
failed.push({ from: oldName, to: newName, reason: err.message })
|
|
760
|
+
console.error(chalk.red(` ✗ ${targetName}: ${oldName} → ${newName}: ${err.message}`))
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
summary[targetName] = { migrated, skipped, failed }
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
return summary
|
|
768
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harveyz-skill",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Skill manager for Claude Code, Cursor, and Codex",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -16,30 +16,31 @@
|
|
|
16
16
|
"bundles.json",
|
|
17
17
|
"skills-index.json",
|
|
18
18
|
"CHANGELOG.md",
|
|
19
|
-
"skills/research/
|
|
20
|
-
"skills/research/
|
|
21
|
-
"skills/research/
|
|
22
|
-
"skills/
|
|
23
|
-
"skills/creative/
|
|
24
|
-
"skills/
|
|
25
|
-
"skills/coding/
|
|
26
|
-
"skills/coding/
|
|
27
|
-
"skills/coding/
|
|
28
|
-
"skills/
|
|
29
|
-
"skills/writing/
|
|
30
|
-
"skills/writing/
|
|
31
|
-
"skills/writing/
|
|
32
|
-
"skills/writing/
|
|
33
|
-
"skills/
|
|
34
|
-
"skills/design/
|
|
35
|
-
"skills/design/
|
|
36
|
-
"skills/
|
|
37
|
-
"skills/meta/
|
|
38
|
-
"skills/meta/
|
|
19
|
+
"skills/research/extract-url/",
|
|
20
|
+
"skills/research/extract-vision/",
|
|
21
|
+
"skills/research/learn-video/",
|
|
22
|
+
"skills/creative/capture-todo/",
|
|
23
|
+
"skills/creative/capture-insight/",
|
|
24
|
+
"skills/coding/init-workflow/",
|
|
25
|
+
"skills/coding/setup-debug/",
|
|
26
|
+
"skills/coding/dispatch-task/",
|
|
27
|
+
"skills/coding/close-task/",
|
|
28
|
+
"skills/writing/forge-doc/",
|
|
29
|
+
"skills/writing/draw-diagram/",
|
|
30
|
+
"skills/writing/manage-docs/",
|
|
31
|
+
"skills/writing/manage-dir/",
|
|
32
|
+
"skills/writing/migrate-spec/",
|
|
33
|
+
"skills/design/scout-brand/",
|
|
34
|
+
"skills/design/build-style/",
|
|
35
|
+
"skills/design/sync-design/",
|
|
36
|
+
"skills/meta/analyze-skill/",
|
|
37
|
+
"skills/meta/clean-git/",
|
|
38
|
+
"skills/meta/archive-skill/",
|
|
39
|
+
"skills/meta/dedup-skill/",
|
|
39
40
|
"skills/meta/contribute-skill/",
|
|
40
|
-
"skills/meta/skill
|
|
41
|
-
"skills/meta/
|
|
42
|
-
"skills/meta/
|
|
41
|
+
"skills/meta/publish-skill/",
|
|
42
|
+
"skills/meta/runby-opencode/",
|
|
43
|
+
"skills/meta/release-project/",
|
|
43
44
|
"tools/p-launch/",
|
|
44
45
|
"tools/todo-tool/",
|
|
45
46
|
"tools/hub/",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: task
|
|
2
|
+
name: close-task
|
|
3
3
|
version: "1.0.0"
|
|
4
4
|
description: "Task wrap-up skill. Self-triggers after an Agent has completed its assigned task — performs task acceptance, summary, document archiving, and lessons-learned recording. Triggers when an Agent has actually finished a task and needs to carry out closing work."
|
|
5
5
|
user_invocable: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: dispatch-task
|
|
3
3
|
version: "1.0.0"
|
|
4
4
|
description: "PM task dispatch skill. Triggers when a new task needs to be created and dispatched to another Agent. Workflow: understand task → clarify requirements → analyze and refine → create task document → dispatch via sessions_send → track feedback. Trigger scenarios: (1) Harvey proposes a new task, (2) asks to dispatch a task to a specific Agent, (3) asks how to dispatch a task."
|
|
5
5
|
user_invocable: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: init-workflow
|
|
3
3
|
description: "Initialize or update git branch management standards: reads workflow-config.yml, audits config, incrementally generates and deploys git hooks (pre-commit, commit-msg, pre-push, post-checkout), and generates workflow docs. Triggers: initializing a new git repo, first-time git setup, user asks to set/update branch protection or naming rules, reinstalling git hooks, or syncing after skill/template updates."
|
|
4
4
|
user_invocable: true
|
|
5
5
|
version: "4.1.0"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: setup-debug
|
|
3
3
|
version: "1.0.0"
|
|
4
4
|
description: Use when setting up a log monitoring environment before running agents or test scenarios on a multi-component application — captures frontend browser console, backend processes, workers, daemons, and other services as independent log files so agents can query each layer precisely
|
|
5
5
|
user_invocable: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: insight
|
|
2
|
+
name: capture-insight
|
|
3
3
|
version: "1.1.0"
|
|
4
4
|
user_invocable: true
|
|
5
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."
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: capture-todo
|
|
3
3
|
version: "4.5.0"
|
|
4
4
|
user_invocable: true
|
|
5
5
|
description: "Add a new requirement, task, or feature request to any project's TODO.md — from any working directory. Triggers whenever the user wants to capture a new need — even phrased casually like 'we should do X later', 'add this to the backlog', 'note this down', 'remember to build X', 'we need to do Y at some point', or 'record this for later'."
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: style
|
|
2
|
+
name: build-style
|
|
3
3
|
description: "Derive format-specific configs from a brand design knowledge doc. Trigger when the user wants to generate doc-forge JSON/CSS, HTML CSS variables, Mermaid color scheme, or PPT theme from a design system. E.g. 'derive configs for BCG', 'generate doc-forge style for rb', 'create HTML theme from custom-style'."
|
|
4
4
|
user_invocable: true
|
|
5
5
|
version: "1.4.0"
|
|
@@ -9,9 +9,9 @@ version: "1.4.0"
|
|
|
9
9
|
|
|
10
10
|
读取 `knowledge/design/<brand>-style.md`,推导各输出格式的具体配置。
|
|
11
11
|
|
|
12
|
-
**只做推导,不调查官网。** 官网调查由 `/brand
|
|
12
|
+
**只做推导,不调查官网。** 官网调查由 `/scout-brand` 负责。
|
|
13
13
|
|
|
14
|
-
**映射标准:** 格式字段 ↔ Token 的完整映射规则定义在 `skills/writing/style
|
|
14
|
+
**映射标准:** 格式字段 ↔ Token 的完整映射规则定义在 `skills/writing/build-style/references/FORMAT-MAPPING.md`,推导时以该文件为权威依据。品牌文件提供 Token 值,FORMAT-MAPPING.md 提供映射规则,两者分离。
|
|
15
15
|
|
|
16
16
|
支持输出格式:
|
|
17
17
|
- **DOCX** — `doc-forge/<brand>-style.json`
|
|
@@ -49,7 +49,7 @@ BRAND="<brand>"
|
|
|
49
49
|
KNOWLEDGE_FILE="knowledge/design/${BRAND}-style.md"
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
用 Read 工具读取 `$KNOWLEDGE_FILE` 和 `skills/writing/style
|
|
52
|
+
用 Read 工具读取 `$KNOWLEDGE_FILE` 和 `skills/writing/build-style/references/FORMAT-MAPPING.md`。
|
|
53
53
|
|
|
54
54
|
**Token 解析方式(三层引用链):**
|
|
55
55
|
|
|
@@ -148,9 +148,9 @@ H1_doc = 24
|
|
|
148
148
|
|
|
149
149
|
### Step 3 — 推导 DOCX 配置(按需)
|
|
150
150
|
|
|
151
|
-
生成 `skills/writing/doc
|
|
151
|
+
生成 `skills/writing/forge-doc/assets/<brand>-style.json`。
|
|
152
152
|
|
|
153
|
-
**映射规则参考 `skills/writing/style
|
|
153
|
+
**映射规则参考 `skills/writing/build-style/references/FORMAT-MAPPING.md`:**
|
|
154
154
|
- 颜色字段 → 第二节 2.1(DOCX JSON 路径列)
|
|
155
155
|
- 字体 → 第三节(CJK 始终为 `PingFang SC`,英文取降级栈第一项)
|
|
156
156
|
- 尺度 → 第四节 4.1/4.2(JSON 路径列)
|
|
@@ -198,9 +198,9 @@ H1_doc = 24
|
|
|
198
198
|
|
|
199
199
|
### Step 4 — 推导 PDF CSS(按需)
|
|
200
200
|
|
|
201
|
-
生成 `skills/writing/doc
|
|
201
|
+
生成 `skills/writing/forge-doc/assets/<brand>.css`。
|
|
202
202
|
|
|
203
|
-
**映射规则参考 `skills/writing/style
|
|
203
|
+
**映射规则参考 `skills/writing/build-style/references/FORMAT-MAPPING.md`:**
|
|
204
204
|
- 颜色属性 → 第二节 2.1(PDF CSS 属性列)
|
|
205
205
|
- 字体栈 → 第三节(格式:`"官方字体", FONT_STACK`)
|
|
206
206
|
- 尺度 → 第四节 4.1/4.2(CSS 属性列)
|
|
@@ -228,7 +228,7 @@ H1_doc = 24
|
|
|
228
228
|
|
|
229
229
|
### Step 5 — 推导 HTML CSS 变量(按需)
|
|
230
230
|
|
|
231
|
-
**变量名查阅 `skills/writing/style
|
|
231
|
+
**变量名查阅 `skills/writing/build-style/references/FORMAT-MAPPING.md` 第六节(HTML CSS 变量完整列表)。**
|
|
232
232
|
|
|
233
233
|
按 Step 2 提取的 Semantic Token 值填入,打印完整 `:root { }` 块输出到对话,供用户粘贴使用。
|
|
234
234
|
|
|
@@ -236,9 +236,9 @@ H1_doc = 24
|
|
|
236
236
|
|
|
237
237
|
### Step 6 — 推导 Mermaid 主题并写入配置文件(按需)
|
|
238
238
|
|
|
239
|
-
**themeVariables 键名查阅 `skills/writing/style
|
|
239
|
+
**themeVariables 键名查阅 `skills/writing/build-style/references/FORMAT-MAPPING.md` 第七节。**
|
|
240
240
|
|
|
241
|
-
写入 `skills/writing/diagram/themes/<brand>.json`,同时在对话中打印可直接嵌入的 `%%{init}%%` 块。
|
|
241
|
+
写入 `skills/writing/draw-diagram/themes/<brand>.json`,同时在对话中打印可直接嵌入的 `%%{init}%%` 块。
|
|
242
242
|
|
|
243
243
|
主题文件按图类型分区存储,不同图类型使用不同样式机制。
|
|
244
244
|
|
|
@@ -419,7 +419,7 @@ semantic 的 `text` 字段:fill 深于 `rules.dark_text_threshold` → `#FFFFF
|
|
|
419
419
|
|
|
420
420
|
### Step 7 — 推导 PPT 主题(按需)
|
|
421
421
|
|
|
422
|
-
**色槽对应查阅 `skills/writing/style
|
|
422
|
+
**色槽对应查阅 `skills/writing/build-style/references/FORMAT-MAPPING.md` 第八节(PPT 色槽完整映射)。**
|
|
423
423
|
|
|
424
424
|
以文字形式输出 PPT 主题配置(标题幻灯片 + 内容幻灯片 + 主题色板槽位)。
|
|
425
425
|
|
|
@@ -439,7 +439,7 @@ semantic 的 `text` 字段:fill 深于 `rules.dark_text_threshold` → `#FFFFF
|
|
|
439
439
|
> 3. **表格模式** — `border_mode` 是否与设计文档一致?
|
|
440
440
|
> 4. **Mermaid 深色节点** — subgraph/node 所有 fill 深于 `#4A4A4A` 的是否都有 `color:#fff`?
|
|
441
441
|
>
|
|
442
|
-
> 确认后可运行 `/doc
|
|
442
|
+
> 确认后可运行 `/forge-doc` 生成测试文档,或用 `/draw-diagram` 测试配色效果。
|
|
443
443
|
|
|
444
444
|
---
|
|
445
445
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: brand
|
|
3
|
-
description: "Survey a brand's visual design style from their official website and output a structured design knowledge document. Trigger when the user wants to analyze a company's design style — e.g. 'analyze McKinsey style', 'survey BCG design', 'extract style from URL'. Outputs to knowledge/design/<brand>-style.md only. Use /style
|
|
2
|
+
name: scout-brand
|
|
3
|
+
description: "Survey a brand's visual design style from their official website and output a structured design knowledge document. Trigger when the user wants to analyze a company's design style — e.g. 'analyze McKinsey style', 'survey BCG design', 'extract style from URL'. Outputs to knowledge/design/<brand>-style.md only. Use /build-style to generate format-specific configs from the knowledge doc."
|
|
4
4
|
user_invocable: true
|
|
5
5
|
version: "2.1.0"
|
|
6
6
|
---
|
|
@@ -9,11 +9,11 @@ version: "2.1.0"
|
|
|
9
9
|
|
|
10
10
|
给定一个公司官网 URL,调查其设计风格,输出 `knowledge/design/<brand>-style.md`。
|
|
11
11
|
|
|
12
|
-
**只做调查,不生成配置。** 配置生成由 `/style
|
|
12
|
+
**只做调查,不生成配置。** 配置生成由 `/build-style` 负责。
|
|
13
13
|
|
|
14
14
|
调查分**两个阶段**:先全面调查主页(品牌色、导航、CTA 按钮、Hero 区域),再深入报告/文章正文页(排版、表格、引用块、代码块)。两阶段数据合并后写入知识文档。
|
|
15
15
|
|
|
16
|
-
输出文档遵循 `skills/writing/brand
|
|
16
|
+
输出文档遵循 `skills/writing/scout-brand/references/TEMPLATE.md` 的完整结构,覆盖:色彩体系(三维分类)、字体体系、间距体系、组件规则、视觉层级、图像处理、数据可视化、各格式推导指南。
|
|
17
17
|
|
|
18
18
|
> **依赖:** 必须先通过 `/browse` skill 完成 browse 初始化。
|
|
19
19
|
|
|
@@ -329,7 +329,7 @@ $B screenshot /tmp/scout-quote.png --selector "blockquote,[class*=callout],[clas
|
|
|
329
329
|
|
|
330
330
|
### Step 13 — 合并两阶段数据,按三层 Token 模型写入知识文档
|
|
331
331
|
|
|
332
|
-
综合主页调查(Step 3–6)和报告页调查(Step 8–12)的结果,按 `skills/writing/brand
|
|
332
|
+
综合主页调查(Step 3–6)和报告页调查(Step 8–12)的结果,按 `skills/writing/scout-brand/references/TEMPLATE.md` 的三层 Token 结构填写,写到 `knowledge/design/<brand>-style.md`。
|
|
333
333
|
|
|
334
334
|
**数据来源优先级:**
|
|
335
335
|
|
|
@@ -373,7 +373,7 @@ $B screenshot /tmp/scout-quote.png --selector "blockquote,[class*=callout],[clas
|
|
|
373
373
|
> 3. **2.2 Text** — `[视觉近黑]` 标注是否准确?这些颜色是否确实在截图中接近黑色?
|
|
374
374
|
> 4. **2.3 Component** — 若有非默认映射(如 blockquote 颜色),是否已修改对应行?
|
|
375
375
|
>
|
|
376
|
-
> 确认后可运行 `/style
|
|
376
|
+
> 确认后可运行 `/build-style` 生成具体格式配置。
|
|
377
377
|
|
|
378
378
|
---
|
|
379
379
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: sync-design
|
|
2
|
+
name: sync-design
|
|
3
3
|
description: Use after any UI source file change — detects changed view/component files via git diff and syncs them to high-fidelity HTML design backups. Maintains a manifest as the source-of-truth mapping between source files and HTML previews. Also invocable as a post-step from /ship or /review. Trigger when user says "sync design", "update HTML preview", "design changed", or after UI code edits.
|
|
4
4
|
version: "3.0.0"
|
|
5
5
|
user_invocable: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: skill
|
|
2
|
+
name: analyze-skill
|
|
3
3
|
description: "Performs systematic analysis of the skill repository. Triggers: analyze this skill repo, do a systematic study of the skill repo, output skill repo analysis report, understand the design intent of this skill system."
|
|
4
4
|
user_invocable: true
|
|
5
5
|
version: "1.0.0"
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: archive-skill
|
|
3
|
+
description: "Archive, retire, deprecate, or sunset a skill from the active registry. Use this skill whenever someone wants to remove a skill from active use — even if they don't use the word 'archive'. Moves it to skills/archived/, removes it from skills-index.json, regenerates packaging config, and commits on a chore branch merged back to the original branch. Triggers: 'archive X skill', 'retire X', 'deprecate X', '归档 skill', '退役 skill', 'remove X from bundle', 'sunset X skill'."
|
|
4
|
+
user_invocable: true
|
|
5
|
+
version: "1.1.0"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# archive-skill
|
|
9
|
+
|
|
10
|
+
将一个已退役的 skill 从活跃注册表移入 `skills/archived/`,自动完成文件操作、index 更新、打包配置重新生成,并提交到 git。
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Step 1 — 匹配 skill
|
|
15
|
+
|
|
16
|
+
从用户指令中提取 skill 名关键字,读取 `skills-index.json` 获取所有已注册 skill:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
REPO_ROOT=$(git rev-parse --show-toplevel)
|
|
20
|
+
node -e "
|
|
21
|
+
const idx = JSON.parse(require('fs').readFileSync('${REPO_ROOT}/skills-index.json','utf8'));
|
|
22
|
+
idx.skills.forEach(s => console.log(s.path));
|
|
23
|
+
"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
在 path 末段(`<category>/<name>` 的 `<name>` 部分)中搜索关键字:
|
|
27
|
+
|
|
28
|
+
| 匹配结果 | 行为 |
|
|
29
|
+
|---------|------|
|
|
30
|
+
| 完全匹配 1 个 | 直接进 Step 2 |
|
|
31
|
+
| 部分匹配 1 个 | 展示候选并问用户:"是否归档 `<name>`?(y/n)" — 确认后进 Step 2 |
|
|
32
|
+
| 部分匹配多个 | 列出所有候选,让用户选择编号后进 Step 2 |
|
|
33
|
+
| 0 匹配 | 报错:`未找到匹配的 skill,请检查名称后重试。` 退出 |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Step 2 — 前置检查
|
|
38
|
+
|
|
39
|
+
在执行任何操作前,检查三个条件,任一不满足则中止:
|
|
40
|
+
|
|
41
|
+
**1. 不在 detached HEAD 状态**
|
|
42
|
+
```bash
|
|
43
|
+
ORIGINAL_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
44
|
+
```
|
|
45
|
+
若结果为 `HEAD`(detached),提示:
|
|
46
|
+
`当前处于 detached HEAD 状态,无法确定要 merge 回的目标分支。请先切换到一个具名分支后重试。`
|
|
47
|
+
然后退出。
|
|
48
|
+
|
|
49
|
+
**2. 无未提交变更**
|
|
50
|
+
```bash
|
|
51
|
+
git status --short
|
|
52
|
+
```
|
|
53
|
+
若有未提交修改,提示:`存在未提交的变更,请先 commit 或 stash 后重试。` 退出。
|
|
54
|
+
|
|
55
|
+
**3. 归档目标不冲突**
|
|
56
|
+
```bash
|
|
57
|
+
ls "${REPO_ROOT}/skills/archived/<name>" 2>/dev/null
|
|
58
|
+
```
|
|
59
|
+
若已存在,提示:`skills/archived/<name>/ 已存在,请手动处理后重试。` 退出。
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Step 3 — 确认摘要
|
|
64
|
+
|
|
65
|
+
展示操作预览,**等待用户明确确认后再执行**:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
即将归档 <name>(bundle: <bundle>):
|
|
69
|
+
|
|
70
|
+
移动:skills/<category>/<name>/ → skills/archived/<name>/
|
|
71
|
+
从 skills-index.json 移除该条目
|
|
72
|
+
更新 bundleMeta.<bundle>:去掉描述中的 "<name>"
|
|
73
|
+
重新生成:package.json files[] 和 .npmignore
|
|
74
|
+
Git:chore/archive-<name> → merge 回 <ORIGINAL_BRANCH>
|
|
75
|
+
|
|
76
|
+
确认继续?(y/n)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
用户输入 `n` 则中止,不做任何修改。
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Step 4 — 创建分支并移动文件
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
git checkout -b chore/archive-<name>
|
|
87
|
+
mkdir -p "${REPO_ROOT}/skills/archived"
|
|
88
|
+
git mv "skills/<category>/<name>" "skills/archived/<name>"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
> 若创建分支时看到 check-similar-branch hook 的相似分支警告,可忽略——archive 分支之间相似是正常现象。
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Step 5 — 更新 skills-index.json
|
|
96
|
+
|
|
97
|
+
读取并修改 `skills-index.json`,写回文件:
|
|
98
|
+
|
|
99
|
+
**移除 skills[] 条目:** 删除 `path` 末段为 `<name>` 的对象。
|
|
100
|
+
|
|
101
|
+
**更新 bundleMeta 描述:** 描述格式为 `"研究工具(a + b + c)"`,从中删除 `<name>`:
|
|
102
|
+
- 若在中间:删除 ` + <name>` 或 `<name> + `
|
|
103
|
+
- 若为最后一项:删除 ` + <name>`
|
|
104
|
+
- 若括号内只剩该项:将整个 `(<name>)` 删除,或保留空括号(均可)
|
|
105
|
+
- 若描述中无该 skill 名:跳过,不报错
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Step 6 — 重新生成打包配置
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
node scripts/generate-npmignore.js
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
若脚本失败,报错并中止,不执行 git 操作,保留已修改的文件供用户检查。
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Step 7 — Git commit
|
|
120
|
+
|
|
121
|
+
`git mv` 已自动 stage 了文件移动,只需 add 配置文件的修改:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
git add skills-index.json package.json .npmignore
|
|
125
|
+
git commit -m "chore: archive <name> skill"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Step 8 — 合并回原分支
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
git checkout <ORIGINAL_BRANCH>
|
|
134
|
+
git merge --no-ff chore/archive-<name>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
完成后输出摘要:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
✓ <name> 已归档
|
|
141
|
+
|
|
142
|
+
归档路径:skills/archived/<name>/
|
|
143
|
+
已从 skills-index.json 移除
|
|
144
|
+
已更新 package.json + .npmignore
|
|
145
|
+
已 merge 回 <ORIGINAL_BRANCH>
|
|
146
|
+
|
|
147
|
+
分支 chore/archive-<name> 可手动删除:
|
|
148
|
+
git branch -d chore/archive-<name>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## 边界情况汇总
|
|
154
|
+
|
|
155
|
+
| 情况 | 处理 |
|
|
156
|
+
|------|------|
|
|
157
|
+
| Detached HEAD | Step 2 中止,提示切换到具名分支 |
|
|
158
|
+
| 有未提交变更 | Step 2 中止,提示 commit 或 stash |
|
|
159
|
+
| `skills/archived/<name>/` 已存在 | Step 2 中止,提示手动处理 |
|
|
160
|
+
| `generate-npmignore.js` 失败 | Step 6 中止,不执行 git 操作 |
|
|
161
|
+
| skill 在磁盘但不在 index | 提示"仅做文件移动",跳过 Step 5 |
|
|
162
|
+
| bundleMeta 描述无该 skill 名 | 跳过描述更新,继续 |
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 不在范围内
|
|
167
|
+
|
|
168
|
+
- 批量归档多个 skill
|
|
169
|
+
- 自动删除归档分支
|
|
170
|
+
- 恢复(un-archive)操作
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: git
|
|
2
|
+
name: clean-git
|
|
3
3
|
description: "Tidy and clean up local git branches using rule matching and LLM semantic analysis, then batch-delete stale branches after grouped confirmation. Triggers: clean up branches, branch cleanup, tidy branches, delete old branches, organize branches."
|
|
4
4
|
user_invocable: true
|
|
5
5
|
version: "1.0.0"
|