目录 · 级别:参考

内置脚本

所有 skills/<name>/scripts/ 的完整目录 — 共 57 个文件(按 MD5 计 49 个独立文件)。SKILL.md 或 references/*.md 中出现的每一个 $SKILL_DIR/scripts/ 引用都对应一个真实存在的文件。

字节级重复是有意为之

当两个技能需要同一个脚本时,每个技能都会内嵌自己的副本。这样每个技能都是一个自包含的单元。23 份副本最终归结为 7 个独立文件。这种重复是"禁止跨技能引用"规则所要求的。

字节级重复族

脚本副本数所属技能
packs-resolve.py7ce-brainstorm, ce-code-review, ce-compound, ce-doc-review, ce-dogfood, ce-plan, ce-setup
peer-job-runner.py6ce-brainstorm, ce-code-review, ce-doc-review, ce-plan, ce-pov, ce-work
validate-doc-claims.py2ce-compound, ce-compound-refresh
validate-frontmatter.py2ce-compound, ce-compound-refresh
light-webserver.js2ce-brainstorm, ce-prototype
analyze_riffrec_zip.py2ce-riffrec-feedback-analysis, ce-sweep
elevation-dispatch.sh2ce-brainstorm, ce-plan

同名但实现不同的脚本

resolve-port.sh 存在两种不同实现:

技能行数范围
ce-polish307完整功能:8 步探测顺序(显式端口 → 框架配置 → Rails → Procfile → Docker → package.json → .env* → 默认)
ce-test-browser41极简:显式端口 → package.json 中的 --port → .env* 中的 PORT= → 3000

各技能的独立脚本

脚本技能语言行数关键 API
ce-babysit-pr
pr-snapshotce-babysit-prPython3,560gh api graphql, fcntl/msvcrt lock, POSIX pidfd
ce-brainstorm
elevation-dispatch.shce-brainstorm / ce-planBash288claude CLI(只读)
light-webserver.jsce-brainstorm / ce-prototypeNode1,251Node HTTP, SSE overlay pipeline
packs-resolve.pyce-brainstorm 等 6 个Python737git clone/fetch/ls-remote
peer-job-runner.pyce-brainstorm 等 5 个Python2,465os.setsid, fcntl, POSIX double-fork;Windows detach
ce-code-review
cross-model-adversarial-review.shce-code-reviewBash1,297codex, claude, cursor-agent CLI
findings-mechanics.pyce-code-reviewPython274none(纯标准库)
review-scope.pyce-code-reviewPython390git (rev-parse, merge-base, diff --numstat)
run-log.pyce-code-reviewPython271仅环境变量宿主检测
ce-compound
validate-doc-claims.pyce-compound / ce-compound-refreshPython497git (rev-parse, ls-files, cat-file -e)
validate-frontmatter.pyce-compound / ce-compound-refreshPython137none(正则)
session-history/discover-sessions.shce-compoundBash264find, awk, sed, env CLAUDE_CONFIG_DIR 等
session-history/extract-metadata.pyce-compoundPython540none(仅文件系统)
session-history/extract-errors.pyce-compoundPython267none
session-history/extract-skeleton.pyce-compoundPython590none
ce-doc-review
cross-model-doc-review.shce-doc-reviewBash1,276codex, claude, cursor-agent CLI
ce-optimize
decide.mjsce-optimizeNode530none(纯算术)
experiment-worktree.shce-optimizeBash293git worktree, git branch
measure.shce-optimizeBash140timeout/gtimeout, python3 fallback
parallel-probe.shce-optimizeBash134find, grep
ce-polish
detect-project-type.shce-polishBash277git rev-parse, find, basename
read-launch-json.shce-polishBash87jq
resolve-package-manager.shce-polishBash95git rev-parse
resolve-port.shce-polishBash307git rev-parse, grep, sed
ce-pov
cross-model-pov.shce-povBash978codex, claude, cursor-agent CLI
ce-resolve-pr-feedback
get-pr-commentsce-resolve-pr-feedbackBash176gh api graphql --paginate, jq
get-thread-for-commentce-resolve-pr-feedbackBash84gh api graphql, jq
reply-to-pr-threadce-resolve-pr-feedbackBash57gh api --method POST
resolve-pr-threadce-resolve-pr-feedbackBash23gh api graphql
ce-riffrec-feedback-analysis
analyze_riffrec_zip.pyce-riffrec-feedback-analysis / ce-sweepPython1,306OpenAI API, ffmpeg, zipfile
ce-setup
check-healthce-setupBash732gh, jq, ast-grep, ffmpeg, agent-browser, python3
ce-sweep
sweep-state.pyce-sweepPython793fcntl advisory lock
ce-test-browser
resolve-port.shce-test-browserBash41grep, lsof
ce-work
cross-model-work.shce-workBash988codex, claude, cursor-agent, opencode CLI
unit-workspace.pyce-workPython215仅库导入
unit_workspace_state.pyce-workPython1,050git rev-parse, git hash-object
unit_workspace_jobs.pyce-workPython1,160git hash-object, git rev-parse, git write-tree
unit_workspace_integration.pyce-workPython677git diff --quiet, git rev-parse, git ls-remote
unit_workspace_lifecycle.pyce-workPython981git worktree, git branch -D
unit_workspace_transaction.pyce-workPython612git commit, git merge --ff-only, git apply
unit_workspace_ignored.pyce-workPython93git ls-files --others --ignored --exclude-standard

仓库根级脚本

脚本语言行数用途
scripts/run-tests.tsTS113测试运行器:一次并行执行 + 仅对 TimeoutError 文件串行重跑
scripts/codex-dev.tsTS8薄封装 → src/dev/codex-dev
scripts/release/preview.tsTS92发布预览(意图与组件)
scripts/release/sync-metadata.tsTS24同步插件元数据(--write 标志)
scripts/release/validate.tsTS78校验 release-please 配置
scripts/zh/build.tsTS375compound-engineering-zh 商店构建 zh 注入树
scripts/zh/netrc-onboard.shBash107设置 dist-zh git 通道(GitLab PAT → ~/.netrc
scripts/zh/pairing-manifest.tsTS556zh 镜像配对闸门(check/accept/rename/prune)
scripts/zh/pairing-state.jsonJSON195配对状态数据(已提交,可人工审计)
scripts/zh/push-dist.tsTS227将 zh 注入树推送到 dist-zh(append-only,识别 freeze-tag)

最大的脚本(Top 10)

#脚本技能行数
1pr-snapshotce-babysit-pr3,560
2peer-job-runner.pyce-brainstorm(+ 5 副本)2,465
3light-webserver.jsce-brainstorm / ce-prototype1,251
4unit_workspace_jobs.pyce-work1,160
5unit_workspace_state.pyce-work1,050
6unit_workspace_lifecycle.pyce-work981
7cross-model-work.shce-work988
8cross-model-pov.shce-pov978
9check-healthce-setup732
10packs-resolve.pyce-brainstorm(+ 6 副本)737