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.
git clone --depth 1 https://github.com/rhuss/cc-spexWrote 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/rhuss/cc-spex/speckit.spex-worktrees.manage)<a href="https://agentmods.dev/commands/rhuss/cc-spex/speckit.spex-worktrees.manage"><img src="https://agentmods.dev/badge/commands/rhuss/cc-spex/speckit.spex-worktrees.manage/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/rhuss/cc-spex/speckit.spex-worktrees.manage"><img src="https://agentmods.dev/badge/commands/rhuss/cc-spex/speckit.spex-worktrees.manage.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.00031 | $0.05591 |
| Opus 5 | $0.00015 | $0.02795 |
| Sonnet 5 | $0.00006 | $0.01118 |
| Haiku 4.5 | $0.00003 | $0.00559 |
Grade B, and why
speckit.spex-worktrees.worktree scanned grade B with 1 finding 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 9d 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.
Asks the agent to reveal its instructionsmediumSystem prompt leakage
Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.
Then print instructions for the user. For inside-project worktrees, show the relative path (e.g., `.claude/worktrees/032-feature`). For external worktrees, show the absolute path. How it starts
The opening of the file, as written. The whole thing — 611 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Worktree Management for spex
Overview
This command manages git worktrees to isolate feature development. It supports four actions:
- create: Called by the
after_specifyhook afterspeckit-specifycompletes. Creates a worktree, restoresmain, and prints switch instructions. - ensure: Called by the
before_implementhook. Verifies worktree isolation exists. If already in a worktree, proceeds silently. If not, creates one (same ascreate). - list: Shows all active feature worktrees with path, branch, and feature name.
- finish: Merges the current worktree's branch into the default branch and removes the worktree. Use when implementation is complete.
- cleanup: Detects worktrees whose branches are merged and offers removal.
Action Routing
Determine the action from the argument:
- If invoked with argument
create(from theafter_specifyhook): the action is create. Execute immediately, no confirmation needed. - If invoked with argument
ensure(from thebefore_implementhook): the action is ensure. See Action: Ensure below. - If invoked with argument
finish: the action is finish. - If invoked with argument
cleanup: the action is cleanup. - Otherwise (no args,
list, or invoked directly): the action is list.
Prerequisites
The project must be a git repository.
git rev-parse --git-dir >/dev/null 2>&1 || { echo "ERROR: Not a git repository"; exit 1; }
Action: Create
This action runs after speckit-specify has created a feature branch and spec files.
Step 1: Read Configuration
Read base_path from the worktrees extension config (or default to .claude/worktrees):
WORKTREE_CONFIG=".specify/extensions/spex-worktrees/worktree-config.yml"
BASE_PATH=$(yq -r '.worktrees.base_path // ".claude/worktrees"' "$WORKTREE_CONFIG" 2>/dev/null || echo ".claude/worktrees")
Default: .claude/worktrees (inside the project directory, keeps CWD stable in Claude Code).
Step 2: Get Current Branch
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.
- 9d ago First seen · 611 lines · 31 tokens per session scan B 296770248e06
speckit.spex-worktrees.worktree is a command published in the GitHub repository rhuss/cc-spex (116 stars, last pushed 20d ago), licensed Apache-2.0. It adds 31 tokens to every session and 5,591 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
commit
A command that examines staged Git changes and proposes a commit message using the Conventional Commits format, such as feat, fix, or docs. Git is a tool for tracking changes to code.
merge-conflict-analysis
You are analyzing merge conflicts for PR #${{ pr-number }}.
release-notes
Generate consistent, well-structured release notes from git history. Triggered on release tags following semver patterns (v..) to produce categorized changelog with breaking changes, features, fixes, and contributor attribution.
doctor
Diagnosticar y reparar problemas del framework Don Cheli, git y entorno. Usa cuando el usuario dice "doctor", "problemas del framework", "don cheli no funciona", "repair Don Cheli", "debug setup", "setup broken", "framework broken", "reparar entorno". Detecta y repara issues de configuración, git y dependencias…
repo-audit
Audit a codebase (local or remote GitHub/GitLab) against architecture principles and requirements, surfacing drift, risk, and missing decisions.
handoff
Export a Waybill Bundle by default, or import one when requested.