Setup
Quick Setup
- SessionStart hook - Runs
bd prime --hook-jsonwhen a session starts. SessionStart also fires after context compaction, so the same hook refreshes context automatically. - CLAUDE.md pointer - A minimal beads section in your project’s
CLAUDE.md(skipped ifCLAUDE.mdis a symlink).
.claude/settings.json. Variants:
bd setup claude skips writing hooks - the plugin provides its own, and duplicates would run bd prime twice per session.
Manual Setup
Add to.claude/settings.json (project) or ~/.claude/settings.json (global):
--hook-json flag wraps the output in the hook JSON envelope Claude Code expects. No PreCompact hook is needed - SessionStart fires again after compaction.
Verify Setup
How It Works
- Session starts →
bd primeinjects ~1-2k tokens of context - You work → Use
bdCLI commands directly - Session compacts → SessionStart fires again and
bd primerefreshes workflow context - Session ends →
bd dolt pushsyncs changes
Why CLI + hooks instead of MCP?
Context efficiency. MCP tool schemas can add 10-50k tokens to every request;bd prime adds ~1-2k tokens of workflow context - 10-50x less overhead, which means lower cost, lower latency, and better model attention. Prefer CLI + hooks in any environment with shell access; use the MCP server only where the CLI is unavailable, such as Claude Desktop.
Why not Claude Skills?
Beads doesn’t ship or require Claude Skills (.claude/skills/). bd prime already delivers the workflow context, and the workflow fits a simple command set (ready → create → update → close → sync). Skills are also Claude-specific, which would break beads’ editor-agnostic approach - the same CLI works in Cursor, Windsurf, and every other shell-capable editor. You can create your own Skills on top of beads, but none are needed.
Essential Commands for Agents
Creating Issues
Working on Issues
Querying
Syncing
Best Practices
Always Use --json
Always Include Descriptions
Link Related Work
Push Before Session End
Plugin (Optional)
For slash commands and enhanced UX, install the beads plugin:/beads:ready- Show ready work/beads:create- Create issue/beads:show- Show issue/beads:update- Update issue/beads:close- Close issue
Troubleshooting
Context not injected
Changes not syncing
Database not found
See Also
- Beads Claude Code Plugin - Packaged plugin with slash commands
- MCP Server - For MCP-only environments
- IDE Setup - Other editors