bmad-story-pipeline-worktree

bmad-story-pipeline-worktree is a skill for Claude Code from terryso/claude-bmad-skills. It costs 23 tokens per session (2,339 once invoked), scanned A, original, MIT.

A configurable software-delivery workflow that develops a story in an isolated Git worktree and merges it only after tests pass. A worktree is a separate working copy of a Git repository.

In plain words
What is it for?
Use it to implement a BMAD story, run the required workflow, test the result, and merge the completed changes.
Why use it?
It keeps unfinished changes away from the main branch and adds a test-based merge condition.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the bmad-skills plugin — 3 skills shipped together

Good fit Use it to implement a BMAD story, run the required workflow, test the result, and merge the completed changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/terryso/claude-bmad-skills/bmad-story-pipeline-worktree
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.

Any agent
npx skills add terryso/claude-bmad-skills --skill bmad-story-pipeline-worktree
Clone the repo
git clone --depth 1 https://github.com/terryso/claude-bmad-skills

Made for: Claude Code.

Or install bmad-skills, the plugin that ships this one along with the rest of its 3 skills.

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 bmad-story-pipeline-worktree

README.md
[![agentmods](https://agentmods.dev/badge/skills/terryso/claude-bmad-skills/bmad-story-pipeline-worktree/github.svg)](https://agentmods.dev/skills/terryso/claude-bmad-skills/bmad-story-pipeline-worktree)
Your own site
<a href="https://agentmods.dev/skills/terryso/claude-bmad-skills/bmad-story-pipeline-worktree"><img src="https://agentmods.dev/badge/skills/terryso/claude-bmad-skills/bmad-story-pipeline-worktree/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.

agentmods 80×15 button for bmad-story-pipeline-worktree

Your own site · 80×15
<a href="https://agentmods.dev/skills/terryso/claude-bmad-skills/bmad-story-pipeline-worktree"><img src="https://agentmods.dev/badge/skills/terryso/claude-bmad-skills/bmad-story-pipeline-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,339 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00023 $0.02339
Opus 5 $0.00012 $0.01170
Sonnet 5 $0.00005 $0.00468
Haiku 4.5 $0.00002 $0.00234

Measured 11d ago against content hash 6f32b61a3e82, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

bmad-story-pipeline-worktree 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 11d 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.

skills/bmad-story-pipeline-worktree/SKILL.md · 335 lines

How it starts

The opening of the file, as written. The whole thing — 335 lines — stays where its author put it; the contents beside it link to each section on GitHub.

BMAD Story Pipeline (Worktree Edition)

Complete the delivery pipeline for story {ARGUMENT} using configurable workflow in an isolated git worktree, merge to main branch only after all tests pass.

Pre-step: Determine Story Number

If {ARGUMENT} is empty or not provided:

  1. Read _bmad-output/implementation-artifacts/sprint-status.yaml (or docs/sprint/sprint-status.yaml) to find stories
  2. Find the first story with status "todo" or "in-progress"
  3. Use that story number as {STORY_ID}
  4. If no story found, ask user to specify story number

The story number format is typically X-Y (e.g., 1-1, 2-3).

Set STORY_ID = {ARGUMENT} for all subsequent steps.


Difference from bmad-story-pipeline

Feature bmad-story-pipeline bmad-story-pipeline-worktree
Working method Develop on current branch Develop in isolated worktree
Code isolation None Complete isolation
Merge condition None enforced Tests pass + fixes complete
Workflow config workflow-steps.md workflow-steps.md
Safety level Medium High

Phase 1: Create Worktree

Do this yourself (not via Task agent):

1. Get current project name, path and branch:
   ORIGINAL_REPO_PATH=$(pwd)
   PROJECT_NAME=$(basename $(pwd))
   CURRENT_BRANCH=$(git branch --show-current)

2. Create new branch name: feature/story-${STORY_ID}

3. Create worktree directory (in sibling directory):
   WORKTREE_PATH="../${PROJECT_NAME}-story-${STORY_ID}"

4. Execute git worktree command:
   git worktree add -b feature/story-${STORY_ID} "$WORKTREE_PATH" $CURRENT_BRANCH

   If branch already exists, use:
   git worktree add "$WORKTREE_PATH" feature/story-${STORY_ID}

5. Verify worktree created:
   git worktree list

Variables saved for later phases:

  • ORIGINAL_REPO_PATH - Original repository path (for merge step)
  • WORKTREE_PATH - Worktree path
  • STORY_ID - Story number

Progress output:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Create Worktree
   🌿 Branch: feature/story-${STORY_ID}
   📁 Path: ${WORKTREE_PATH}
   📦 Original: ${ORIGINAL_REPO_PATH}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Read the full file on GitHub · 335 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 335 lines · 23 tokens per session scan A 6f32b61a3e82

Subscribe to this mod's changes

bmad-story-pipeline-worktree is a skill published in the GitHub repository terryso/claude-bmad-skills (41 stars, last pushed 5mo ago), licensed MIT. It adds 23 tokens to every session and 2,339 once invoked, about $0.0001 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-09-01.

Related

Other skills, from other repositories

changelog-generator

Produce consistent, auditable release notes from Conventional Commits. Separates commit parsing, semantic-bump logic, and changelog rendering for automated releases with editorial control. Use when cutting a release, generating CHANGELOG.md from git history, computing the next semantic version from commits, automating…

bestagentkits/agency-skills · 107 tokens

finishing-a-development-branch

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work.

obra/superpowers · 27 tokens

datalad

Retrieve, version, and publish scientific datasets with DataLad and git-annex, and capture computational provenance with datalad run, rerun, and containers-run. Use when cloning or fetching data from OpenNeuro, DANDI, datasets.datalad.org, or any DataLad dataset; when a file in a dataset reads as a broken symlink or a…

K-Dense-AI/scientific-agent-skills · 146 tokens

baby-sit

Monitor a GitHub pull request until CI is green, diagnose failures, and rerun only evidence-backed flaky GitHub Actions jobs.

langchain-ai/open-swe · 30 tokens

chinese-git-workflow

A reference for configuring Git with Chinese code-hosting services such as Gitee, Coding.net, GitLab China, and CNB, including SSH, HTTPS, credentials, CI, and repository mirroring.

jnMetaCode/superpowers-zh · 69 tokens

comet-github-issue-fix

A workflow for fixing a confirmed Comet-related GitHub issue or review blocker within an isolated scope. It covers matching the work to the relevant workflow, testing the change, checking runtime results, and preparing a careful handoff.

rpamis/comet · 71 tokens