Claude Code Templates is a command-line tool and catalogue for configuring Anthropic’s Claude Code with agents, commands, settings, hooks, integrations, skills, and project templates. Developers use it to browse and install reusable components for their coding workflows. The catalogue includes many of these Claude Code components.
Borrowing it
Nothing to install: this file belongs to davila7/claude-code-templates. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/davila7/claude-code-templates/main/.claude/commands/worktree-check.mdgit clone --depth 1 https://github.com/davila7/claude-code-templatesWrote 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/commands/davila7/claude-code-templates/worktree-check)<a href="https://agentmods.dev/commands/davila7/claude-code-templates/worktree-check"><img src="https://agentmods.dev/badge/commands/davila7/claude-code-templates/worktree-check/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/davila7/claude-code-templates/worktree-check"><img src="https://agentmods.dev/badge/commands/davila7/claude-code-templates/worktree-check.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00011 | $0.00504 |
| Opus 5.5 | $0.00004 | $0.00202 |
| Sonnet 5.5 | $0.00002 | $0.00101 |
| Haiku 4.5 | $0.00001 | $0.00050 |
Grade A, and why
worktree-check 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 1mo 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.
What it actually says
Worktree Status Check
Verify the current worktree environment and show task details.
Instructions
You are inside a worktree (or the main repo). Gather and display the current status clearly.
Step 1: Detect Worktree
- Get the current directory:
pwd - List all worktrees:
git worktree list - Determine if the current directory is a worktree (not the main working tree). The main working tree is listed first in
git worktree listoutput — if the current path matches the first entry, this is the main repo, not a worktree.
If this is not a worktree, inform the user:
You're in the main repository, not a worktree. Use
/worktree-initto create worktrees.
Then list any existing worktrees and exit.
Step 2: Show Branch Info
- Get current branch:
git branch --show-current - Verify it follows the
claude/*,claude-daniel/*, orreview/*naming convention - Show how many commits ahead of origin/main:
git rev-list --count origin/main..HEAD
Step 3: Read Task
- Check if
.worktree-task.mdexists in the worktree root - If it exists, read and display its contents
- If it doesn't exist, note that no task file was found (may have been created manually)
Step 4: Show Working Status
Run and display:
git status --short— show modified, staged, and untracked filesgit diff --stat— show a summary of unstaged changes
Step 5: Display Summary
Present a clean summary:
Worktree Status
──────────────────────────────────
Branch: claude/<name>
Task: <task description from .worktree-task.md>
Commits: <N> ahead of main
Modified: <N> files
Staged: <N> files
Untracked: <N> files
──────────────────────────────────
If there are changes ready to deliver, suggest: "Run /worktree-deliver when you're ready to commit, push, and create a PR."
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.
- 1mo ago First seen · 60 lines · 11 tokens per session scan A 95dfad3d0a50
worktree-check is a command published in the GitHub repository davila7/claude-code-templates (32,814 stars, last pushed today), licensed MIT. It adds 11 tokens to every session and 504 once invoked, about $0.0000 per session on Opus 5.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 commands, from other repositories
ccc-fork
Fork the current work into isolated git worktrees to try several approaches side by side, compare them on measured results, and merge the winner. Use when choosing between implementations, attempting a risky refactor, or testing competing bug theories.
ccc-multi-repo
Coordinate one change across several repositories in a single session with --add-dir: shared branch names, linked PRs, dependency-ordered merges and per-repo verification. Use for API contract changes, shared library updates and cross-service refactors.
ccc-parallel
Run several Claude Code agents at once, each in its own git worktree and branch, then merge the results through one coordinator. Use when you have independent tasks to develop concurrently.
ccc-ao
Spawn, monitor, stop and merge parallel agents in isolated git worktrees through the Composio ao CLI. Use when you want several agents working on one project at once.
ccc-pr
Open a pull request for the current branch: commit pending work, run tests, push, and create the PR with gh. Use when a branch is ready for review.
ccc-verify
Verify the current codebase in a fixed order (build, types, lint, tests with coverage, secrets, debug logs, git status) and return a PASS/FAIL report with a ready-for-PR verdict. Use before committing, before opening a PR, or when asked to check that everything still works.