/repo-harness:repo-initfrom repo-harness
为空仓库或新建 GitHub 仓库一键配置多 Agent 并发工程护栏(Worktree 运行时隔离、共享契约只读保护、CODEOWNERS 写路径硬门禁、架构分层检查与 GitHub Merge Queue CI),支持 Python / TypeScript / Go 单栈与 Monorepo。
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.
使用本插件内置的确定性 CLI(repo-harness)为空仓库或新建 GitHub 仓库初始化整套多 Agent 并发护栏,不要手写重复模板文件。
优先直接使用 PATH 中的 repo-harness;若当前宿主未把插件 bin/ 加入 PATH,按本 Skill 文件位置定位同仓库的 ../../bin/repo-harness(通过 node <plugin-root>/bin/repo-harness ... 调用)。
--stacks):python、ts、go 中选一个或多个(逗号分隔,如 go,ts、python,ts)。多栈默认采用 monorepo 布局(可用 --dirs go=backend,ts=frontend 覆盖目录名)。--runtime):
none:只做 .worktrees/ 文件与分支隔离;ports(默认):派生 worktree-id、独占槽位 1..999、API_PORT / WEB_PORT 与 .harness-data/;docker:在 ports 基础上增加独立 COMPOSE_PROJECT_NAME、POSTGRES_PORT / POSTGRES_DB / POSTGRES_VOLUME、Docker owner labels 与 worktree-runtime.mjs gc。init + verify;github(建议先 --dry-run 展示变更)。# 1. 初始化脚手架(幂等;已托管文件会更新,用户自建文件默认跳过)
repo-harness init <target-dir> \
--stacks <python|ts|go|go,ts|python,ts> \
--runtime <none|ports|docker> \
[--dirs go=backend,ts=frontend] \
[--owner @<github-user>] \
[--git-init]
# 2. 激活本地共享 Git hooks
git -C <target-dir> config core.hooksPath .githooks
# 3. 运行全套本地自检
repo-harness verify <target-dir>
仅在仓库已有 GitHub origin(或显式传 --repo owner/name)且用户确认后执行:
# 先预览 API 载荷
repo-harness github <target-dir> --dry-run
# 应用 Ruleset(禁直推 main、PR + CI Result 必过、Merge Queue)与标准 Labels
repo-harness github <target-dir> [--approvals 0] [--require-codeowners]
repo-harness: main Ruleset(含 merge_queue)并将 .agents/harness.json 的 github.mode 设为 native。local-guard,由 .githooks/pre-push 与 finish-branch --merge-serialized <pr> 兜底。汇报以下四项:
stacks / layout / runtime 配置;repo-harness verify 的实际输出;native / 降级 local-guard / 未执行);new-worktree 与 AGENT_SCOPE=<domain> 启动 worker。What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub dengnaichen/repo-harness --plugin repo-harness2 skills in this plugin