ワンクリックで
source-command-worktree-req
为 Claude Code 用户通过 claude --worktree 或手动 git worktree 启动并行 REQ。适用于已有活跃 REQ 时需要另开一条独立工作线。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
为 Claude Code 用户通过 claude --worktree 或手动 git worktree 启动并行 REQ。适用于已有活跃 REQ 时需要另开一条独立工作线。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
一键将 harness-lab 治理框架接入到当前项目。支持模块选择、冲突检测、PreToolUse hook 配置和 CLI 安装回退。适用于已有项目快速接入治理框架。
创建 bugfix 型 REQ,通过 req:create --type bugfix 自动填充特化内容。
创建 feature 型 REQ,通过 req:create --type feature 自动填充特化内容。
创建 refactor 型 REQ,通过 req:create --type refactor 自动填充特化内容。
交互式首个 REQ 向导,引导新用户在 5 分钟内创建第一个 REQ。自动识别项目类型,推荐模板字段。
| name | source-command-worktree-req |
| description | 为 Claude Code 用户通过 claude --worktree 或手动 git worktree 启动并行 REQ。适用于已有活跃 REQ 时需要另开一条独立工作线。 |
Use this skill when the user wants to run a second or parallel REQ using Claude Code worktrees.
引导 Claude Code 用户按“一个 worktree 一个 active REQ”的方式创建并启动并行 REQ。优先使用 Claude Code 官方 claude --worktree / -w 入口;需要自定义目录、分支或复用已有分支时再使用手动 git worktree。
参考:Claude Code worktree 文档 https://code.claude.com/docs/en/worktrees
git rev-parse --show-toplevelrequirements/ 目录存在;不存在 → 提示先运行 /harness-setuppackage.json 中有 req:create / req:status 脚本;不存在 → 提示先运行 /harness-setupclaude 并完成 workspace trust,再使用 --worktreenpm run req:status -- --all 查看全局活跃 REQ,提醒用户 worktree 并行只隔离 active 状态,不解决多人并发写同一文件的问题.env、.env.local 等 gitignored 文件,建议在仓库根目录维护 .worktreeinclude询问用户:
feature / bugfix / refactorclaude --worktree / 手动 git worktree{slug}codex/{slug}优先使用 Claude Code 原生入口:
claude --worktree {slug}
也可以使用短参数:
claude -w {slug}
Claude Code 默认会在仓库根目录下创建 .claude/worktrees/{slug}/,并使用独立分支启动会话。未指定名称时,Claude Code 会自动生成一个名称。
如果需要自定义目录、分支名、复用已有分支,使用 Git 手动创建:
git worktree add ../{repo-name}-{slug} -b codex/{slug}
如需从已有分支创建:
git worktree add ../{repo-name}-{slug} {branch-name}
然后进入该目录并启动 Claude Code:
cd ../{repo-name}-{slug}
claude
npm run req:status
npm run req:status -- --all
npm run req:status 应显示当前 worktree 无活跃 REQ。--all 用于确认全局已有并行 REQ。
按用户选择的类型创建:
npm run req:create -- --title "feat: {REQ 主题}" --type feature
npm run req:create -- --title "fix: {REQ 主题}" --type bugfix
npm run req:create -- --title "refactor: {REQ 主题}" --type refactor
然后补齐 REQ 的真实背景、目标、验收标准和必要设计稿,再运行:
npm run req:start -- --id REQ-YYYY-NNN --phase implementation
完成后:
git worktree remove ../{repo-name}-{slug}
req:create 可能产生 REQ 编号撞号;并行前尽量从最新主线创建 worktree,或先在主线预留 REQ--worktree 默认从远端默认分支创建;如需从本地当前 HEAD 创建,在 Claude Code settings 中配置 worktree.baseRef: "head".worktreeinclude 可复制被 gitignore 的本地配置文件到 Claude Code 创建的 worktree,例如 .env 和 .env.localgit worktree remove 清理progress.txt 和 .req-exempt;Git/Claude Code worktree 隔离的是文件编辑目录req:statusreq:status -- --all 摘要req:start