| name | beads |
| description | Work with Beads issue tracker for AI agent memory. Use when managing tasks, tracking dependencies, filing issues, or maintaining context across coding sessions. Handles bd commands, issue graphs, and persistent agent memory. |
| license | MIT |
| compatibility | Requires beads CLI (bd) v0.21.5+ in PATH. Git repository required for issue storage. |
| metadata | {"version":"0.21.5","author":"Mark Ferree","repository":"https://github.com/mrf/beads-skill","skill-author":"Mark Ferree"} |
Beads: Memory System for Coding Agents
Beads is a lightweight, git-backed issue tracking system that provides persistent memory for AI coding agents across sessions.
CRITICAL: Initialization Check
BEFORE doing ANY beads operations, you MUST:
-
Check if beads is initialized in the current project using the Glob tool:
Glob pattern=".beads"
If the .beads directory is found in the results, beads is initialized.
-
If .beads is not found, you MUST immediately run:
/beads:init
This will:
- Initialize the beads database in the project
- Set up proper permissions in
.claude/settings.local.json
- Enable all beads commands to run without permission prompts
-
Only after beads is confirmed initialized should you proceed with any bd commands.
DO NOT skip this check. Running bd commands without initialization will fail.
Core Capabilities
Issue Management
- Create, update, and close issues with rich metadata
- Hash-based IDs (bd-a1b2, bd-f14c) eliminate merge conflicts and ID collisions
- Hierarchical child IDs (bd-a3f8e9.1, bd-a3f8e9.3.1) support nested work breakdown
- Track dependencies between issues (blocks, discovered-from, etc.)
- Automatically identify "ready" work (issues with no open blockers)
- Filter by status, priority, assignee, labels, and type
Agent Memory Integration
- Persist discovered work across conversation sessions
- Build dependency graphs for complex nested tasks
- File issues automatically during exploration
- Resume long-horizon tasks with full context
Git-Based Sync
- Issues stored as JSONL files in
.beads/ directory
- Committed to git like any other code artifact
- Local SQLite cache for fast queries
- Optional daemon for background sync
- No external servers required
Setup
Slash Commands Installation
The beads skill provides slash commands like /beads:ready, /beads:create-issue, etc. If these commands are not available:
- Create a symlink from the skill's commands to Claude Code's commands directory:
ln -s ~/.claude/skills/beads/commands/beads ~/.claude/commands/beads
- Restart your Claude Code session to pick up the new commands
Permissions Configuration
When first using Beads commands, configure project permissions to allow all bd commands without prompting:
- Check if settings.json exists and has permissions configured
- If not, add the following to the project's
.claude/settings.json:
{
"permissions": {
"allow": [
"Bash(bd:*)"
]
}
}
This ensures smooth operation of all Beads commands without repeated permission prompts.
Common Workflows
Understanding Issue IDs
Beads uses hash-based IDs to eliminate merge conflicts:
- Format:
bd- followed by 4-6 hex characters (e.g., bd-a1b2, bd-f14c)
- Hierarchical IDs for nested work:
bd-a3f8e9.1, bd-a3f8e9.2, bd-a3f8e9.3.1
- Auto-generated on creation - collision-resistant even with multiple agents
- Migration from old sequential IDs: use
bd migrate
Starting a Session
- Check for ready work:
bd ready --json
- Review issue details:
bd show bd-a1b2
- Assign to yourself:
bd update bd-a1b2 -a @me
- Mark in progress:
bd update bd-a1b2 -s in_progress
During Development
- Discover new issues:
bd create "Title" -d "Details" -t bug -p 1
- Link dependencies:
bd dep add bd-f3a1 bd-a1b2 (bd-f3a1 depends on bd-a1b2)
- Update status:
bd update bd-a1b2 -s blocked
- Add labels:
bd label add bd-a1b2 security
Completing Work
- Mark done:
bd close bd-a1b2
- Commit changes (includes Beads metadata in .beads/ directory)
- Check for newly unblocked work:
bd ready --json
Complex Task Planning
- Create parent epic:
bd create "Epic: Feature Name" -t epic -p 0
- Create child tasks with hierarchical IDs:
bd create "Subtask 1" -t task --parent bd-a3f8 (creates bd-a3f8.1)
- Add blockers:
bd dep add bd-f3a1 bd-a1b2 (bd-f3a1 depends on bd-a1b2)
- Visualize:
bd dep tree bd-a3f8
Best Practices for Agents
When to File Issues
- Discovered technical debt during exploration
- Found bugs or edge cases while implementing features
- Identified related work that's out of current scope
- Need to remember context for future sessions
Dependency Modeling
When using bd dep add [dependent] [dependency]:
- The first issue depends on the second
- The second issue must be done before the first
- Example:
bd dep add bd-f3a1 bd-a1b2 means "bd-f3a1 depends on bd-a1b2"
Use --deps flag during creation:
bd create "Task" --deps "discovered-from:bd-a3f8,blocks:bd-b2c4"
- Or simple format:
--deps "bd-a3f8,bd-b2c4"
Use --parent flag for hierarchical tasks:
bd create "Subtask" --parent bd-a3f8 creates bd-a3f8.1
- Supports up to 3 nesting levels (epic > feature > task)
Working with Ready Issues
bd ready --json --limit 20
bd ready --priority 0
bd ready --assignee alice
bd list --status open --json
Maintaining Clean State
- Close completed issues:
bd close bd-1 bd-2 bd-3
- Remove invalid blockers:
bd dep remove bd-2 bd-1
- Reopen if needed:
bd reopen bd-1
- Use labels for categorization:
bd label add bd-1 refactor security
CLI Reference
Core Commands
Initialization & Maintenance
bd init
bd onboard
bd quickstart
bd migrate
bd migrate --inspect
bd migrate --dry-run
bd doctor
bd doctor --fix
Creating Issues
bd create "Title"
bd create "Title" -d "Description"
bd create "Title" -t bug -p 1
bd create "Title" -a alice -l backend,urgent
bd create "Title" --deps "bd-a3f8,bd-b2c4"
bd create "Title" --parent bd-a3f8
bd create -f plan.md
bd create "Title" --json
Types: bug, feature, task, epic, chore
Priorities: 0=critical, 1=high, 2=medium (default), 3=low, 4=backlog
Note: Hash-based IDs are auto-generated; explicit IDs are no longer supported
Viewing Issues
bd show bd-a1b2
bd show bd-a1b2 bd-f3a1 bd-c5d6
bd list
bd list --status open
bd list --priority 1
bd list --assignee alice
bd list --label backend,urgent
bd list --label-any frontend,backend
bd list --type bug
bd list --title "auth"
bd list --limit 50
bd list --json
Statuses: open, in_progress, blocked, closed
Updating Issues
bd update bd-a1b2 -s in_progress
bd update bd-a1b2 -p 0
bd update bd-a1b2 -a bob
bd update bd-a1b2 --title "New Title"
bd update bd-a1b2 -d "New description"
bd update bd-a1b2 bd-f3a1 bd-c5d6 -s closed
bd update bd-a1b2 --json
Closing Issues
bd close bd-a1b2
bd close bd-a1b2 bd-f3a1 bd-c5d6
bd close bd-a1b2 --reason "Completed"
bd reopen bd-a1b2
Dependencies
bd dep add bd-f3a1 bd-a1b2
bd dep add bd-f3a1 bd-a1b2 --type blocks
bd dep remove bd-f3a1 bd-a1b2
bd dep tree bd-a1b2
bd dep cycles
Note: In bd dep add [A] [B], issue A depends on issue B (B must finish first)
Finding Work
bd ready
bd ready --limit 20
bd ready --priority 1
bd ready --assignee alice
bd ready --json
bd blocked
bd stats
Labels
bd label add bd-a1b2 security
bd label add bd-a1b2 bug urgent
bd label remove bd-a1b2 urgent
bd label list bd-a1b2
bd label list-all
Daemon Management
bd daemons
bd daemons health
bd daemons stop <pid>
bd daemons logs <pid>
bd daemons killall
bd daemon &
Deletion
bd delete bd-a1b2
bd delete bd-a1b2 --force
bd delete bd-a1b2 bd-f3a1 bd-c5d6 --force
bd delete bd-a1b2 --cascade --force
Comments
bd comments bd-a1b2
bd comments bd-a1b2 "Add comment"
Configuration
bd config set jira.url "https://..."
bd config get jira.url
bd config list --json
bd config unset jira.url
Export/Import
bd export -o issues.jsonl
bd import -i issues.jsonl
bd compact --days 90
bd sync
Global Flags
Available on all commands:
--json
--actor "name"
--db "/path/to/db"
--no-daemon
--no-auto-flush
--no-auto-import
--sandbox
JSON Output Format
All commands support --json flag:
{
"id": "bd-a1b2",
"title": "Implement OAuth login",
"description": "Add OAuth 2.0 support",
"status": "in_progress",
"priority": 1,
"type": "feature",
"assignee": "alice",
"labels": ["auth", "security"],
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T14:22:00Z",
"closed_at": null,
"dependencies": ["bd-c5d6"],
"dependents": ["bd-f3a1", "bd-d7e8"],
"external_ref": "gh-123"
}
Note: IDs use hash-based format (bd-a1b2) instead of sequential numbers
Agent Integration Patterns
Session Initialization
When starting a session, check if Beads is initialized using the Glob tool:
Glob pattern=".beads"
If the .beads directory is found:
- Beads memory is available
- Run
bd ready --json --limit 10 to see available work
If not found:
- No Beads database exists
- Run
/beads:init to initialize
Auto-Filing Discovered Work
bd create "Fix null pointer in auth handler" \
-d "Found in auth.go:142 during login feature work" \
-t bug \
-p 1 \
-l "bug,backend" \
--deps "discovered-from:bd-a3f8" \
--json
Task Planning Template
EPIC_ID=$(bd create "Epic: User Dashboard" -t epic -p 1 --json | jq -r '.id')
bd create "Design dashboard layout" -t task --parent "$EPIC_ID"
bd create "Implement data fetching" -t task --parent "$EPIC_ID"
bd create "Add filtering controls" -t task --parent "$EPIC_ID"
bd create "Write integration tests" -t task --parent "$EPIC_ID"
LAYOUT_ID=$(bd list --title "Design dashboard" --json | jq -r '.[0].id')
DATA_ID=$(bd list --title "Implement data" --json | jq -r '.[0].id')
bd dep add "$DATA_ID" "$LAYOUT_ID"
Querying Ready Work
READY=$(bd ready --priority 0 --json --limit 5)
echo "$READY" | jq -r '.[] | "\(.id): \(.title)"'
bd list --assignee "@agent" --status in_progress --json
Installation
curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
Or install from source (requires Go):
git clone https://github.com/steveyegge/beads.git
cd beads
go install
Verify installation:
bd version
bd quickstart
Troubleshooting
Migration from Sequential IDs
If you have an old database with sequential IDs (bd-1, bd-2):
bd migrate --inspect
bd migrate --dry-run
bd migrate
Health Checks
Run diagnostic checks for common issues:
bd doctor
bd doctor --fix
Daemon Management
bd daemons
bd daemons health
bd daemons killall
Sync Conflicts
If git conflicts occur in .beads/ directory:
bd list
Missing Dependencies
go version
which bd
bd version
Performance Issues
bd daemon &
bd config get db.path
bd compact --days 90 --dry-run
Common Errors
"Issue not found": Check ID format (should be hash-based like bd-a1b2, bd-f14c)
"Dependency cycle detected": Use bd dep cycles to find circular dependencies
"Database not found": Run bd init in project root
"Old ID format detected": Run bd migrate to upgrade to hash-based IDs
References