Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/marcusgoll/Spec-Flownpx agentmods add skills/marcusgoll/spec-flow/worktree-contextWrote 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/marcusgoll/spec-flow/worktree-context)<a href="https://agentmods.dev/skills/marcusgoll/spec-flow/worktree-context"><img src="https://agentmods.dev/badge/skills/marcusgoll/spec-flow/worktree-context/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/skills/marcusgoll/spec-flow/worktree-context"><img src="https://agentmods.dev/badge/skills/marcusgoll/spec-flow/worktree-context.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.00000 | $0.01490 |
| Opus 5.5 | $0.00000 | $0.00596 |
| Sonnet 5.5 | $0.00000 | $0.00298 |
| Haiku 4.5 | $0.00000 | $0.00149 |
Grade A, and why
worktree-context 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.
How it starts
The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Worktree Context Skill
Provides centralized worktree handling for workflow commands, eliminating ~50 lines of inline code per command.
Purpose
Git worktrees enable parallel development by allowing multiple branches to be checked out simultaneously. This skill provides a single source of truth for worktree detection, creation, and context generation.
Quick Reference
# Check if in worktree
bash .spec-flow/scripts/bash/worktree-context.sh in-worktree && echo "yes" || echo "no"
# Get worktree info (JSON)
bash .spec-flow/scripts/bash/worktree-context.sh info
# Create worktree for feature
bash .spec-flow/scripts/bash/worktree-context.sh create "feature" "001-auth" "feature/001-auth"
# Generate Task() agent context block
bash .spec-flow/scripts/bash/worktree-context.sh context "/path/to/worktree"
Output Format
Info Command
Returns JSON with worktree details:
{
"is_worktree": true,
"worktree_path": "/path/to/worktrees/feature/001-auth",
"root_path": "/path/to/main/repo",
"branch": "feature/001-auth",
"worktree_type": "feature",
"worktree_slug": "001-auth"
}
Fields
| Field | Values | Description |
|---|---|---|
is_worktree |
boolean | Whether currently in a worktree |
worktree_path |
string | Absolute path to worktree |
root_path |
string | Absolute path to main repository |
branch |
string | Current git branch |
worktree_type |
feature, epic |
Type of worktree |
worktree_slug |
string | Feature/epic slug |
Compact Pattern (v11.2)
In Command Process Section
Replace 50+ lines of inline worktree detection with this compact reference:
### Step N: Worktree Context (Optional)
**Check worktree using centralized skill** (see `.claude/skills/worktree-context/SKILL.md`):
1. Check preference: `bash .spec-flow/scripts/utils/load-preferences.sh --key "worktrees.auto_create" --default "true"`
2. Check if already in worktree: `bash .spec-flow/scripts/bash/worktree-context.sh in-worktree`
3. If NOT in worktree AND auto_create is true:
- Create: `bash .spec-flow/scripts/bash/worktree-context.sh create "feature" "$SLUG" "$BRANCH"`
- Store path in state.yaml: `yq eval ".git.worktree_path = \"$PATH\"" -i state.yaml`
4. For Task() agents, generate context: `bash .spec-flow/scripts/bash/worktree-context.sh context "$PATH"`
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 · 198 lines · 0 tokens per session scan A 596d490d18e8
worktree-context is a skill published in the GitHub repository marcusgoll/Spec-Flow (96 stars, last pushed 23d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,490 tokens. 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-09-03.
Other skills, from other repositories
changelog
Auto-generate a changelog from git commits and sprint data. Internal and player-facing versions.
antigravity-maintainer-batch-release
Run protected AAS maintainer sweeps, PR merge batches, canonical sync, Core preview checks, and scripted releases. Use for repository maintenance, main alignment, CLI/MCP/Workbench changes, or release work; not ordinary contribution tasks.
resolve-conflicts
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling…
team-release
Orchestrate the release team — release-manager, qa-lead, devops-engineer, producer — to execute a release from candidate to deployment.
write-release-notes
Generate engaging, high-energy release notes for a given version tag. Fetches the release from GitHub, retrieves every linked PR's title and description, then synthesizes all changes into a polished, user-facing release note with an enthusiastic tone. Use when the user asks to write, generate, or create release notes…
create-github-issue
Create GitHub issues using GitHub CLI with support for templates, labels, assignees, milestones, and draft issues. Use when the user asks to create a GitHub issue, file a bug report, submit a feature request, or open an issue in a GitHub repository.