docs/CLAUDE_INTEGRATION.md
This document explains design decisions for Claude Code integration in beads.
Recommended: CLI + Hooks - Beads uses a simple, universal approach to Claude Code integration:
bd prime command for context injection (~1-2k tokens)--json flagsAlternative: MCP Server - For MCP-only environments (Claude Desktop, no shell):
Context efficiency matters, even with large context windows:
The math:
bd prime adds ~1-2k tokens of workflow contextWhen context size doesn't matter:
When to prefer CLI + hooks:
Decision: Beads does NOT use or require Claude Skills (.claude/skills/)
Redundant with bd prime
bd prime already provides workflow context (~1-2k tokens)Simplicity is core to beads
Editor agnostic
Maintenance burden
They should be:
bd prime - Universal context injectionUsers who want custom Skills can create their own, but beads doesn't ship with or require them.
# Install Claude Code hooks globally
bd setup claude
# Install for this project only
bd setup claude --project
# Use stealth mode (flush only, no git operations)
bd setup claude --stealth
# Check installation status
bd setup claude --check
# Remove hooks
bd setup claude --remove
What it installs:
bd prime when Claude Code starts a sessionbd prime before context compaction to preserve workflow instructionscmd/bd/prime.go - Context generationcmd/bd/setup/claude.go - Hook installationcmd/bd/doctor/claude.go - Integration verificationdocs/CLAUDE.md - General project guidance for Claude