Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/joe-rq/harness-lab/source-command-worktree-reqnpx skills add Joe-rq/harness-lab --skill source-command-worktree-reqgit clone --depth 1 https://github.com/Joe-rq/harness-labWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/joe-rq/harness-lab/source-command-worktree-req)<a href="https://agentmods.dev/skills/joe-rq/harness-lab/source-command-worktree-req"><img src="https://agentmods.dev/badge/skills/joe-rq/harness-lab/source-command-worktree-req.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00049 | $0.01317 |
| Opus 5 | $0.00024 | $0.00659 |
| Sonnet 5 | $0.00010 | $0.00263 |
| Haiku 4.5 | $0.00005 | $0.00132 |
Grade A, and why
source-command-worktree-req scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
source-command-worktree-req
Use this skill when the user wants to run a second or parallel REQ using Claude Code worktrees.
Command Template
/worktree-req
目标
引导 Claude Code 用户按“一个 worktree 一个 active REQ”的方式创建并启动并行 REQ。优先使用 Claude Code 官方 claude --worktree / -w 入口;需要自定义目录、分支或复用已有分支时再使用手动 git worktree。
参考:Claude Code worktree 文档 https://code.claude.com/docs/en/worktrees
前置检查
- 确认当前目录在 Git 仓库内:
git rev-parse --show-toplevel - 确认
requirements/目录存在;不存在 → 提示先运行/harness-setup - 确认
package.json中有req:create/req:status脚本;不存在 → 提示先运行/harness-setup - 如首次在该仓库使用 Claude Code,先在仓库根目录运行一次
claude并完成 workspace trust,再使用--worktree - 运行
npm run req:status -- --all查看全局活跃 REQ,提醒用户 worktree 并行只隔离 active 状态,不解决多人并发写同一文件的问题 - 如新 worktree 需要
.env、.env.local等 gitignored 文件,建议在仓库根目录维护.worktreeinclude
执行步骤
Step 1: 收集并行 REQ 信息
询问用户:
- REQ 主题(必填):一句话说明要做什么
- REQ 类型(必填):
feature/bugfix/refactor - 创建方式(默认 Claude Code 原生):
claude --worktree/ 手动git worktree - worktree 名称(可选):默认用
{slug} - 分支名(手动模式可选):默认用
codex/{slug}
Step 2: 创建 worktree(推荐)
优先使用 Claude Code 原生入口:
claude --worktree {slug}
也可以使用短参数:
claude -w {slug}
Claude Code 默认会在仓库根目录下创建 .claude/worktrees/{slug}/,并使用独立分支启动会话。未指定名称时,Claude Code 会自动生成一个名称。
Step 2b: 手动创建 worktree(高级)
如果需要自定义目录、分支名、复用已有分支,使用 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
Step 3: 在新 worktree 中检查状态
npm run req:status
npm run req:status -- --all
npm run req:status 应显示当前 worktree 无活跃 REQ。--all 用于确认全局已有并行 REQ。
Step 4: 创建并启动 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
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 132 lines · 49 tokens per session scan A b8334c42abec
source-command-worktree-req is a skill published in the GitHub repository Joe-rq/harness-lab (20 stars, last pushed 21d ago), licensed MIT. It adds 49 tokens to every session and 1,317 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…