Files
beads/website/docs/integrations/claude-code.md
Steve Yegge 584608a14e feat: add llms.txt standard support for AI agent discoverability (#784)
Cherry-picked website/, scripts/generate-llms-full.sh, and deploy-docs.yml
from joyshmitz's PR. Fixed workflow to trigger on main branch instead of
docs/docusaurus-site.

Features:
- Docusaurus documentation site with llms.txt support
- Environment-variable driven config (defaults to steveyegge org)
- Automated llms-full.txt generation from docs
- GitHub Pages deployment workflow

Co-authored-by: joyshmitz <joyshmitz@users.noreply.github.com>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Executed-By: beads/crew/dave
Rig: beads
Role: crew
2025-12-30 18:27:50 -08:00

3.0 KiB

id, title, sidebar_position
id title sidebar_position
claude-code Claude Code 1

Claude Code Integration

How to use beads with Claude Code.

Setup

Quick Setup

bd setup claude

This installs:

  • SessionStart hook - Runs bd prime on session start
  • PreCompact hook - Runs bd sync before context compaction

Manual Setup

Add to your Claude Code hooks configuration:

{
  "hooks": {
    "SessionStart": ["bd prime"],
    "PreCompact": ["bd sync"]
  }
}

Verify Setup

bd setup claude --check

How It Works

  1. Session startsbd prime injects ~1-2k tokens of context
  2. You work → Use bd CLI commands directly
  3. Session compactsbd sync saves work to git
  4. Session ends → Changes synced via git

Essential Commands for Agents

Creating Issues

# Always include description for context
bd create "Fix authentication bug" \
  --description="Login fails with special characters in password" \
  -t bug -p 1 --json

# Link discovered issues
bd create "Found SQL injection" \
  --description="User input not sanitized in query builder" \
  --deps discovered-from:bd-42 --json

Working on Issues

# Find ready work
bd ready --json

# Start work
bd update bd-42 --status in_progress --json

# Complete work
bd close bd-42 --reason "Fixed in commit abc123" --json

Querying

# List open issues
bd list --status open --json

# Show issue details
bd show bd-42 --json

# Check blocked issues
bd blocked --json

Syncing

# ALWAYS run at session end
bd sync

Best Practices

Always Use --json

bd list --json          # Parse programmatically
bd create "Task" --json # Get issue ID from output
bd show bd-42 --json    # Structured data

Always Include Descriptions

# Good
bd create "Fix auth bug" \
  --description="Login fails when password contains quotes" \
  -t bug -p 1 --json

# Bad - no context for future work
bd create "Fix auth bug" -t bug -p 1 --json
# When you discover issues during work
bd create "Found related bug" \
  --deps discovered-from:bd-current --json

Sync Before Session End

# ALWAYS run before ending
bd sync

Plugin (Optional)

For enhanced UX with slash commands:

# In Claude Code
/plugin marketplace add steveyegge/beads
/plugin install beads
# Restart Claude Code

Adds slash commands:

  • /bd-ready - Show ready work
  • /bd-create - Create issue
  • /bd-show - Show issue
  • /bd-update - Update issue
  • /bd-close - Close issue

Troubleshooting

Context not injected

# Check hook setup
bd setup claude --check

# Manually prime
bd prime

Changes not syncing

# Force sync
bd sync

# Check daemon
bd info
bd daemons health

Database not found

# Initialize beads
bd init --quiet

See Also