目录 · 级别:参考
内置脚本
所有 skills/<name>/scripts/ 的完整目录 — 共 57 个文件(按 MD5 计 49 个独立文件)。SKILL.md 或 references/*.md 中出现的每一个 $SKILL_DIR/scripts/ 引用都对应一个真实存在的文件。
字节级重复是有意为之
当两个技能需要同一个脚本时,每个技能都会内嵌自己的副本。这样每个技能都是一个自包含的单元。23 份副本最终归结为 7 个独立文件。这种重复是"禁止跨技能引用"规则所要求的。
字节级重复族
| 脚本 | 副本数 | 所属技能 |
|---|---|---|
packs-resolve.py | 7 | ce-brainstorm, ce-code-review, ce-compound, ce-doc-review, ce-dogfood, ce-plan, ce-setup |
peer-job-runner.py | 6 | ce-brainstorm, ce-code-review, ce-doc-review, ce-plan, ce-pov, ce-work |
validate-doc-claims.py | 2 | ce-compound, ce-compound-refresh |
validate-frontmatter.py | 2 | ce-compound, ce-compound-refresh |
light-webserver.js | 2 | ce-brainstorm, ce-prototype |
analyze_riffrec_zip.py | 2 | ce-riffrec-feedback-analysis, ce-sweep |
elevation-dispatch.sh | 2 | ce-brainstorm, ce-plan |
同名但实现不同的脚本
resolve-port.sh 存在两种不同实现:
| 技能 | 行数 | 范围 |
|---|---|---|
| ce-polish | 307 | 完整功能:8 步探测顺序(显式端口 → 框架配置 → Rails → Procfile → Docker → package.json → .env* → 默认) |
| ce-test-browser | 41 | 极简:显式端口 → package.json 中的 --port → .env* 中的 PORT= → 3000 |
各技能的独立脚本
| 脚本 | 技能 | 语言 | 行数 | 关键 API |
|---|---|---|---|---|
| ce-babysit-pr | ||||
pr-snapshot | ce-babysit-pr | Python | 3,560 | gh api graphql, fcntl/msvcrt lock, POSIX pidfd |
| ce-brainstorm | ||||
elevation-dispatch.sh | ce-brainstorm / ce-plan | Bash | 288 | claude CLI(只读) |
light-webserver.js | ce-brainstorm / ce-prototype | Node | 1,251 | Node HTTP, SSE overlay pipeline |
packs-resolve.py | ce-brainstorm 等 6 个 | Python | 737 | git clone/fetch/ls-remote |
peer-job-runner.py | ce-brainstorm 等 5 个 | Python | 2,465 | os.setsid, fcntl, POSIX double-fork;Windows detach |
| ce-code-review | ||||
cross-model-adversarial-review.sh | ce-code-review | Bash | 1,297 | codex, claude, cursor-agent CLI |
findings-mechanics.py | ce-code-review | Python | 274 | none(纯标准库) |
review-scope.py | ce-code-review | Python | 390 | git (rev-parse, merge-base, diff --numstat) |
run-log.py | ce-code-review | Python | 271 | 仅环境变量宿主检测 |
| ce-compound | ||||
validate-doc-claims.py | ce-compound / ce-compound-refresh | Python | 497 | git (rev-parse, ls-files, cat-file -e) |
validate-frontmatter.py | ce-compound / ce-compound-refresh | Python | 137 | none(正则) |
session-history/discover-sessions.sh | ce-compound | Bash | 264 | find, awk, sed, env CLAUDE_CONFIG_DIR 等 |
session-history/extract-metadata.py | ce-compound | Python | 540 | none(仅文件系统) |
session-history/extract-errors.py | ce-compound | Python | 267 | none |
session-history/extract-skeleton.py | ce-compound | Python | 590 | none |
| ce-doc-review | ||||
cross-model-doc-review.sh | ce-doc-review | Bash | 1,276 | codex, claude, cursor-agent CLI |
| ce-optimize | ||||
decide.mjs | ce-optimize | Node | 530 | none(纯算术) |
experiment-worktree.sh | ce-optimize | Bash | 293 | git worktree, git branch |
measure.sh | ce-optimize | Bash | 140 | timeout/gtimeout, python3 fallback |
parallel-probe.sh | ce-optimize | Bash | 134 | find, grep |
| ce-polish | ||||
detect-project-type.sh | ce-polish | Bash | 277 | git rev-parse, find, basename |
read-launch-json.sh | ce-polish | Bash | 87 | jq |
resolve-package-manager.sh | ce-polish | Bash | 95 | git rev-parse |
resolve-port.sh | ce-polish | Bash | 307 | git rev-parse, grep, sed |
| ce-pov | ||||
cross-model-pov.sh | ce-pov | Bash | 978 | codex, claude, cursor-agent CLI |
| ce-resolve-pr-feedback | ||||
get-pr-comments | ce-resolve-pr-feedback | Bash | 176 | gh api graphql --paginate, jq |
get-thread-for-comment | ce-resolve-pr-feedback | Bash | 84 | gh api graphql, jq |
reply-to-pr-thread | ce-resolve-pr-feedback | Bash | 57 | gh api --method POST |
resolve-pr-thread | ce-resolve-pr-feedback | Bash | 23 | gh api graphql |
| ce-riffrec-feedback-analysis | ||||
analyze_riffrec_zip.py | ce-riffrec-feedback-analysis / ce-sweep | Python | 1,306 | OpenAI API, ffmpeg, zipfile |
| ce-setup | ||||
check-health | ce-setup | Bash | 732 | gh, jq, ast-grep, ffmpeg, agent-browser, python3 |
| ce-sweep | ||||
sweep-state.py | ce-sweep | Python | 793 | fcntl advisory lock |
| ce-test-browser | ||||
resolve-port.sh | ce-test-browser | Bash | 41 | grep, lsof |
| ce-work | ||||
cross-model-work.sh | ce-work | Bash | 988 | codex, claude, cursor-agent, opencode CLI |
unit-workspace.py | ce-work | Python | 215 | 仅库导入 |
unit_workspace_state.py | ce-work | Python | 1,050 | git rev-parse, git hash-object |
unit_workspace_jobs.py | ce-work | Python | 1,160 | git hash-object, git rev-parse, git write-tree |
unit_workspace_integration.py | ce-work | Python | 677 | git diff --quiet, git rev-parse, git ls-remote |
unit_workspace_lifecycle.py | ce-work | Python | 981 | git worktree, git branch -D |
unit_workspace_transaction.py | ce-work | Python | 612 | git commit, git merge --ff-only, git apply |
unit_workspace_ignored.py | ce-work | Python | 93 | git ls-files --others --ignored --exclude-standard |
仓库根级脚本
| 脚本 | 语言 | 行数 | 用途 |
|---|---|---|---|
scripts/run-tests.ts | TS | 113 | 测试运行器:一次并行执行 + 仅对 TimeoutError 文件串行重跑 |
scripts/codex-dev.ts | TS | 8 | 薄封装 → src/dev/codex-dev |
scripts/release/preview.ts | TS | 92 | 发布预览(意图与组件) |
scripts/release/sync-metadata.ts | TS | 24 | 同步插件元数据(--write 标志) |
scripts/release/validate.ts | TS | 78 | 校验 release-please 配置 |
scripts/zh/build.ts | TS | 375 | 为 compound-engineering-zh 商店构建 zh 注入树 |
scripts/zh/netrc-onboard.sh | Bash | 107 | 设置 dist-zh git 通道(GitLab PAT → ~/.netrc) |
scripts/zh/pairing-manifest.ts | TS | 556 | zh 镜像配对闸门(check/accept/rename/prune) |
scripts/zh/pairing-state.json | JSON | 195 | 配对状态数据(已提交,可人工审计) |
scripts/zh/push-dist.ts | TS | 227 | 将 zh 注入树推送到 dist-zh(append-only,识别 freeze-tag) |
最大的脚本(Top 10)
| # | 脚本 | 技能 | 行数 |
|---|---|---|---|
| 1 | pr-snapshot | ce-babysit-pr | 3,560 |
| 2 | peer-job-runner.py | ce-brainstorm(+ 5 副本) | 2,465 |
| 3 | light-webserver.js | ce-brainstorm / ce-prototype | 1,251 |
| 4 | unit_workspace_jobs.py | ce-work | 1,160 |
| 5 | unit_workspace_state.py | ce-work | 1,050 |
| 6 | unit_workspace_lifecycle.py | ce-work | 981 |
| 7 | cross-model-work.sh | ce-work | 988 |
| 8 | cross-model-pov.sh | ce-pov | 978 |
| 9 | check-health | ce-setup | 732 |
| 10 | packs-resolve.py | ce-brainstorm(+ 6 副本) | 737 |