/repo-harness:repo-syncfrom repo-harness
当仓库新增模块、服务、共享契约或需要升级多 Agent 护栏脚手架时使用。通过确定性 CLI 对账真实目录结构、CODEOWNERS、架构依赖棘轮、CI 路由与远端 GitHub Ruleset。
Ships in repo-harness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
用于在仓库演进后同步多 Agent 工程护栏,始终遵循**“先确定性扫描预览,再结合语义确认,最后 --apply 落地并 verify”**,不手写重复配置。
优先使用 PATH 中的 repo-harness;若未加入 PATH,通过 node <plugin-root>/bin/repo-harness(相对本 Skill 为 ../../bin/repo-harness)调用。
repo-harness sync <target-dir> --dry-run [--check-github]
# 需要机读细节时加 --json
仔细核对报告中的 6 项输出:
go.mod、pyproject.toml、package.json 是否需要纳入 CI 路由与 ownership.json;openapi.*、*.proto、contracts/**、orval.config.* / check:api 是否应锁为只读契约并建立跨模块 CI 联动边;contracts/;staleDomainPaths)与 CODEOWNERS 的具体负责人 @handle 是否需要调整;cycles)时先报告并建议解耦,不要静默忽略;--ratchet-baseline 冻结当前存量(之后禁止新增违规,存量修复后自动收缩);--upgrade 安全升级;conflict(本地改过受管文件)时,展示差异由用户确认,未经确认不加 --force;--fix-github 修复。repo-harness sync <target-dir> --apply [--upgrade] [--ratchet-baseline] [--fix-github]
repo-harness verify <target-dir>
可将以下检查加入仓库自定义流程,确保新增模块或契约漂移时立即提醒:
repo-harness sync . --check
What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
Other plugins' skills for the same job
npx claudepluginhub dengnaichen/repo-harness --plugin repo-harness