A Claude Code skill that installs a complete spec-driven development methodology into any project. One command sets up task tracking, requirements management, guard hooks, quality gates, and a structured implementation workflow.
When you work with Claude Code on a real project, you quickly discover that:
- Claude loses track of what it was working on between sessions
- It will manually edit spec files when it should use tooling
- It will merge PRs without code review if you don't stop it
- It has no sense of "what should I work on next?"
- Implementation drifts from requirements with no way to catch it
This skill installs a methodology layer that solves all of these problems. It was battle-tested on a production AI coaching product (2,345+ tests, 25 capability specs, 200+ implemented requirements) and then extracted into this portable package.
Running /bootstrap-beads in any repo installs:
Beads is an AI-native issue tracker. Unlike GitHub Issues or Linear, it's designed to be used by the AI agent during development — not just about the AI's work.
What it provides:
bd ready— shows the next actionable tasks (no blockers)bd create— create tasks with descriptions and dependenciesbd update <id> --claim— claim a task (assign + set in_progress atomically)bd close/bd note— close tasks and record what was donebd dep— set task dependencies sobd readyonly shows unblocked work
How it's used:
- A session-start hook runs
bd ready --limit 10at the beginning of every Claude session, so the agent always knows what to work on - When the agent discovers new work during implementation, it creates Beads tasks instead of forgetting or silently changing scope
- When work is done, it closes the task with a note explaining what was accomplished
OpenSpec is a spec-driven development system. Requirements live in versioned spec files, and all changes go through a structured workflow.
The four-step workflow:
| Command | Purpose |
|---|---|
/opsx:explore |
Think through ideas, investigate problems, clarify requirements. No code writing — pure thinking. |
/opsx:propose |
Create a change proposal with: proposal.md (what & why), design.md (how), tasks.md (implementation steps). Automatically creates a Beads task. |
/opsx:apply |
Implement tasks from a change, one by one, with TDD. Pauses on ambiguity. |
/opsx:archive |
Move completed change to archive, optionally sync delta specs back to main specs. Automatically closes the Beads task. |
Spec format:
## Purposesection describing the capability### Requirement:headers with SHALL/MUST language#### Scenario:blocks required, using WHEN/THEN/AND to describe expected behavior- No test-prescriptive scenario content (SQL, selectors, assertions, implementation details)
The OpenSpec ↔ Beads bridge:
/opsx:proposecreates a Beads task with summary and definition of done/opsx:archivecloses the corresponding Beads task- Both degrade gracefully if
bdis not installed
Three PreToolUse hooks prevent common agent mistakes:
| Hook | Trigger | What It Does |
|---|---|---|
| OpenSpec guard | Writing/editing files under openspec/ |
Warns the agent to use CLI tooling instead of manual edits |
| Push guard | Running git push |
Reminds the agent to request @copilot review + spawn /codex:review |
| Merge guard | Running gh pr merge |
Blocks merge until both Copilot and Codex reviews are confirmed |
These hooks are implemented as shell commands in .claude/settings.json and require jq for JSON parsing. They degrade gracefully — if jq is missing, they do nothing rather than block.
Four gates that every OpenSpec change passes through:
| Gate | When | What |
|---|---|---|
| Architecture Review | Before writing code | Spawn a Plan agent to review the design against existing architecture. Check data flows, isolation, dead code, integration points. |
| Implementation with Tests | During coding | TDD or test-with. Every module, every endpoint. Run tests after each phase. |
| Code Review | After implementation | Check for data leaks, dead code, silent failures, SQL injection, missing encryption. |
| Spec Reconciliation | After archiving | Update spec checkboxes, note new requirements, add "Last reconciled" timestamp. |
A structured workflow for implementing changes:
Before Starting:
bd ready → bd update <id> --claim → git checkout -b feat/<name> → Gate 1
Per Phase:
1. Plan (assess complexity, spawn worktree agents for complex tasks)
2. Implement (TDD: failing test → implement → verify)
3. CI Gate (build + format + test)
4. Commit & Push (open or update PR)
5. Reviews (MANDATORY: @copilot + /codex:review after every push)
6. Check & Fix Reviews (before starting next phase)
After All Phases:
Final reviews → fix all findings → full CI → STOP (user merges) →
after merge: archive OpenSpec change → reconcile specs → bd close
Persistent instructions appended to the project's CLAUDE.md that survive across sessions. Covers:
- Verification Rule (never claim something works without verifying)
- Quality Gates (the four gates described above)
- OpenSpec Workflow (the four-step workflow)
- Spec Governance (format rules, process rules, anti-patterns)
- Worktree and Branch Rules (named branches, cleanup)
- Beads Coordination (daily workflow commands)
- Implementation Workflow (the full per-phase checklist)
| Tool | Required | Install |
|---|---|---|
bd (Beads CLI) |
Yes | brew install qwibitai/tap/beads |
openspec CLI |
Yes | npm install -g openspec |
jq |
Yes | brew install jq / apt-get install jq |
gh (GitHub CLI) |
Yes | brew install gh |
| Codex CLI | Optional | For /codex:review background reviews |
| Playwright | Optional | For headless UI verification |
Copy or symlink this directory to your global Claude Code skills:
# Copy
cp -r bootstrap-beads-skill ~/.claude/skills/bootstrap-beads
# Or symlink
ln -s /path/to/bootstrap-beads-skill ~/.claude/skills/bootstrap-beadsThen in any project:
/bootstrap-beads
Copy this directory into a project's .claude/skills/:
cp -r bootstrap-beads-skill my-project/.claude/skills/bootstrap-beadsIf you don't want the interactive skill, you can install each piece manually:
bd init --quiet— initialize Beadsopenspec init— initialize OpenSpec- Copy
templates/session-start.sh→.claude/hooks/session-start.sh(make executable) - Merge hooks from SKILL.md Step 5 into
.claude/settings.json - Copy
templates/commands/opsx/*.md→.claude/commands/opsx/ - Append
templates/methodology.mdto yourCLAUDE.md
bootstrap-beads-skill/
├── SKILL.md # Main orchestration — the interactive installer
├── README.md # This file
└── templates/
├── session-start.sh # Beads session-start hook script
├── methodology.md # CLAUDE.md sections to append
└── commands/
└── opsx/
├── propose.md # /opsx:propose slash command
├── apply.md # /opsx:apply slash command
├── archive.md # /opsx:archive slash command
└── explore.md # /opsx:explore slash command
| File | Installed to | Purpose |
|---|---|---|
SKILL.md |
.claude/skills/bootstrap-beads/ or ~/.claude/skills/bootstrap-beads/ |
Interactive installer that orchestrates all steps |
templates/session-start.sh |
.claude/hooks/session-start.sh |
Runs bd ready --limit 10 at session start |
templates/methodology.md |
Appended to CLAUDE.md |
Quality gates, workflow, governance rules |
templates/commands/opsx/propose.md |
.claude/commands/opsx/propose.md |
Creates change proposals with artifacts + Beads task |
templates/commands/opsx/apply.md |
.claude/commands/opsx/apply.md |
Implements tasks from a change (TDD loop) |
templates/commands/opsx/archive.md |
.claude/commands/opsx/archive.md |
Archives completed changes + closes Beads task |
templates/commands/opsx/explore.md |
.claude/commands/opsx/explore.md |
Free-form thinking and investigation mode |
This section explains the why behind each piece, for teams evaluating whether to adopt it.
Two systems, one bridge:
┌─────────────────────────────────────────────────────────────────┐
│ │
│ OpenSpec Beads │
│ ───────── ───── │
│ "What should this "What should I │
│ change do?" work on next?" │
│ │
│ • Specs (requirements) • Tasks (actionable work) │
│ • Proposals (what & why) • Dependencies (ordering) │
│ • Designs (how) • Assignments (who) │
│ • Tasks (implementation steps) • Notes (progress) │
│ • Archive (history) • Ready queue (priorities) │
│ │
│ ┌──────────────────────┐ │
│ │ Bridge │ │
│ │ │ │
│ │ propose → bd create │ │
│ │ archive → bd close │ │
│ └──────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
OpenSpec tracks intent: what the system should do, why a change is being made, how it should be designed. It's the source of truth for requirements.
Beads tracks execution: what needs to happen next, what's blocked, what's done. It's the source of truth for work state.
The bridge connects them: proposing a change creates a task; archiving a change closes the task. Both degrade gracefully if the other system isn't installed.
Without guards, Claude Code agents will:
-
Manually edit spec files — breaking the format, introducing test-prescriptive content (SQL queries, implementation details) in scenario blocks, and causing cascading quality problems. The OpenSpec guard catches this.
-
Merge PRs without review — Claude is eager to complete work. Without the merge guard, it will merge the moment CI passes, skipping code review entirely. The merge guard forces confirmation that both automated reviews ran.
-
Push without requesting reviews — The push guard is a reminder, not a blocker. It ensures the agent remembers to spawn reviews after every push, so review feedback arrives while the next phase is in progress.
These hooks were born from real incidents:
- The spec corruption incident (2026-04-08): An agent manually rewrote 25 specs with test-prescriptive WHEN/THEN/AND content, causing another agent to write 37 brute-force tests (none worked on the first try). The OpenSpec guard prevents manual spec editing.
- Silent merges: Multiple PRs were merged without any code review, letting bugs reach main. The merge guard prevents this.
Gates catch problems at the cheapest point to fix them:
- Gate 1 (Architecture) catches design flaws before any code is written. A 5-minute review saves hours of rework.
- Gate 2 (Tests) catches implementation bugs immediately, not after the full change is integrated.
- Gate 3 (Code Review) catches security issues, dead code, and integration gaps that tests miss.
- Gate 4 (Spec Reconciliation) keeps specs and code in sync, preventing drift that compounds over time.
The implementation workflow is structured around phases (not tasks) because:
- Reviews run in background — spawning reviews after each phase means feedback arrives while you're working on the next phase. Zero time cost.
- CI catches regressions early — running CI after each phase means you never accumulate a large pile of broken changes.
- Worktree isolation for complex work — spawning worktree agents for complex tasks keeps the main branch clean and allows parallel work.
- Named branches prevent orphaned work — requiring named branches (not anonymous
worktree-agent-*branches) means work can always be found and continued.
Claude Code sessions start with a blank context. The session-start hook solves this by:
- Running
bd ready --limit 10to show what needs work - Giving the agent immediate context about priorities
- Preventing the "what should I do?" problem that wastes the first few minutes of every session
After installation, you can customize any piece:
The methodology template references a generic CI gate. Edit the "CI Gate" section in CLAUDE.md to match your project:
#### 3. CI Gate
After each task, run the full local CI chain:
npm run build && npm run lint && npm testAdd your rules above the methodology sections in CLAUDE.md:
## Development Rules
1. TypeScript only
2. Do NOT modify core framework files — add extensions instead
3. camelCase for API responses
## Verification Rule
...Edit .claude/settings.json to remove hooks you don't need. For example, to remove the Codex review requirement from the push guard, edit the command to only mention @copilot.
The interactive seeding step (Step 8 in SKILL.md) can pull from any source. If you use Linear instead of GitHub Issues, modify the detection commands.
This methodology was developed and refined on CoachClaw, an AI coaching agent with:
- 2,345+ tests
- 25 OpenSpec capability specs
- 200+ implemented requirements
- Full data architecture with PII handling, encryption at rest, per-client isolation
- Production deployment on Fly.io
The methodology emerged from real incidents:
- A spec corruption event where an agent manually edited all 25 specs, introducing test syntax that caused cascading failures
- 47 stale worktrees left behind by agents that didn't follow branch naming conventions
- Silent PR merges that bypassed code review entirely
- Integration gaps where unit tests passed but real code paths were broken
Each piece of the methodology exists because its absence caused a real problem. Nothing is theoretical.
Beads isn't installed. Install it:
brew install qwibitai/tap/beadsOr on Linux without Homebrew, see the Beads releases.
OpenSpec isn't installed. Install it:
npm install -g openspecCheck that:
jqis installed (which jq).claude/settings.jsonexists and has valid JSON- The hooks are under
hooks.PreToolUse(not a different key)
Check that:
.claude/hooks/session-start.shexists and is executable (chmod +x)bdis in PATH (the hook tries Linuxbrew as a fallback)
The installer appends methodology sections — it doesn't overwrite. It checks for ## Quality Gates as a sentinel to avoid duplicating. If you want to re-install, remove the methodology sections first.
MIT