source-command-worktree-req

source-command-worktree-req is a skill for Claude Code, Codex from Joe-rq/harness-lab. It costs 49 tokens per session (1,317 once invoked), scanned A, original, MIT.

A workflow for starting a second, separate REQ in a Git worktree. A worktree is another working folder connected to the same Git repository, so work can proceed on a separate branch.

In plain words
What is it for?
Use it to start a feature, bug fix, or refactor in parallel with existing work, using Claude Code's worktree option or manual Git commands.
Why use it?
It lets you work on parallel tasks when another REQ is already active. It also checks the project setup and warns that separate folders do not prevent people from editing the same files.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/joe-rq/harness-lab/source-command-worktree-req
Any agent
npx skills add Joe-rq/harness-lab --skill source-command-worktree-req
Clone the repo
git clone --depth 1 https://github.com/Joe-rq/harness-lab

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for source-command-worktree-req

README.md
[![agentmods](https://agentmods.dev/badge/skills/joe-rq/harness-lab/source-command-worktree-req.svg)](https://agentmods.dev/skills/joe-rq/harness-lab/source-command-worktree-req)
Your own site
<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>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,317 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 3d ago against content hash b8334c42abec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

.agents/skills/source-command-worktree-req/SKILL.md · 132 lines

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

前置检查

  1. 确认当前目录在 Git 仓库内:git rev-parse --show-toplevel
  2. 确认 requirements/ 目录存在;不存在 → 提示先运行 /harness-setup
  3. 确认 package.json 中有 req:create / req:status 脚本;不存在 → 提示先运行 /harness-setup
  4. 如首次在该仓库使用 Claude Code,先在仓库根目录运行一次 claude 并完成 workspace trust,再使用 --worktree
  5. 运行 npm run req:status -- --all 查看全局活跃 REQ,提醒用户 worktree 并行只隔离 active 状态,不解决多人并发写同一文件的问题
  6. 如新 worktree 需要 .env.env.local 等 gitignored 文件,建议在仓库根目录维护 .worktreeinclude

执行步骤

Step 1: 收集并行 REQ 信息

询问用户:

  1. REQ 主题(必填):一句话说明要做什么
  2. REQ 类型(必填):feature / bugfix / refactor
  3. 创建方式(默认 Claude Code 原生):claude --worktree / 手动 git worktree
  4. worktree 名称(可选):默认用 {slug}
  5. 分支名(手动模式可选):默认用 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

Read the full file on GitHub · 132 lines

Changes

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.

  1. 3d ago First seen · 132 lines · 49 tokens per session scan A b8334c42abec

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

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.

obra/superpowers · 37 tokens

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.

microsoft/vscode · 62 tokens

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.

microsoft/vscode · 51 tokens

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.

microsoft/vscode · 53 tokens

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…

microsoft/vscode · 71 tokens