beads
Expert knowledge for the bd (beads) CLI issue tracker. Use when working with beads issues, bd commands, .beads/ config files, or dependency management workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Expert knowledge for the bd (beads) CLI issue tracker. Use when working with beads issues, bd commands, .beads/ config files, or dependency management workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | beads |
| description | Expert knowledge for the bd (beads) CLI issue tracker. Use when working with beads issues, bd commands, .beads/ config files, or dependency management workflows. |
Beads is a lightweight, dependency-aware issue tracker with first-class
support for agent workflows, Git integration, and Dolt-powered storage.
The CLI is bd. This skill provides comprehensive reference for all
commands, flags, and workflows.
Invoke this skill when:
bd commands (create, update, close, show, list, etc.).beads/ configuration or Dolt server issuesIssues flow through these statuses:
bd readybd blocked to see these)No done or complete status exists — only closed.
Dependencies express "X needs Y", not "X comes before Y":
bd dep add <dependent> <prerequisite>
WRONG mental model (temporal): "phase-1 blocks phase-2"
# WRONG:
bd dep add phase1 phase2 # This means phase1 needs phase2
CORRECT mental model (requirement): "phase-2 needs phase-1"
# CORRECT:
bd dep add phase2 phase1 # phase2 depends on phase1
Also: bd dep <blocker> --blocks <blocked> is a shorthand that reads
naturally: "blocker blocks blocked".
IDs are prefixed per-project (e.g., bd-42, be-218, gt-7, hq-abc).
The prefix identifies which rig/database owns the issue.
bd commands auto-route to the correct database by prefix.
Created by bd init. Contains:
*.db — SQLite or Dolt database redirect fileconfig.yaml — Project-level configuration# Show unblocked, open issues (not in_progress/hooked/deferred)
bd ready
# Find ready work in a specific molecule
bd ready --mol bd-abc
# Show all open issues (flat list)
bd list --status open
# Show blocked issues (dependency-blocked)
bd blocked
# List all issues (including closed)
bd list --all
# Filter by type, assignee, label, priority
bd list -t bug -a alice -l security -p 0
bd list --label-any "P0,P1" --type feature
# Search by text
bd search "authentication"
# Show full details
bd show bd-42
# Short one-line view
bd show bd-42 --short
# Show with all fields (agent, gate, extended metadata)
bd show bd-42 --long
# Show children of an issue
bd show bd-42 --children
# Show reverse references (what references this issue)
bd show bd-42 --refs
# Watch for changes (auto-refresh)
bd show bd-42 --watch
# Show as of a specific Dolt commit
bd show bd-42 --as-of <commit-hash>
# Basic creation
bd create "Issue title"
# Full creation with metadata
bd create "Fix auth bug" \
-t bug \
-p 1 \
-d "Description of the problem" \
-a alice \
-l security,authentication \
--due +2d
# Create with dependencies
bd create "Phase 2 work" \
--deps "discovered-from:bd-10,bd-11"
# Quick capture (outputs ID only, for scripting)
bd q "Quick note"
# Create in a different rig
bd create "Bug in gastown" --rig gastown
bd create "Bug" --prefix gt-
# Dry run (preview without creating)
bd create "Test" --dry-run
# Create multiple from markdown file
bd create -f issues.md
# Create ephemeral (short-lived) issue
bd create "Temporary note" --ephemeral
Issue Types: bug, feature, task, epic, chore, decision
enhancement/feat → feature, dec/adr → decisionPriority: 0 (critical) through 4 (backlog), default 2
# Update fields
bd update bd-42 --title "New title"
bd update bd-42 --status in_progress
bd update bd-42 -p 1 -a bob
bd update bd-42 --notes "Progress update"
bd update bd-42 --append-notes "Additional note"
# Atomically claim (sets assignee=you, status=in_progress; fails if taken)
bd update bd-42 --claim
# Add/remove labels
bd update bd-42 --add-label security
bd update bd-42 --remove-label wontfix
bd update bd-42 --set-labels "security,high-priority"
# Defer until future date
bd update bd-42 --defer "2025-06-01"
bd update bd-42 --defer "+3d"
bd update bd-42 --defer "" # Clear defer
# Set due date
bd update bd-42 --due "+1w"
bd update bd-42 --due "next monday"
bd update bd-42 --due "" # Clear
# Update last-touched issue (no ID needed)
bd update --notes "Progress"
Date formats: +6h, +1d, +2w, tomorrow, next monday,
2025-01-15, RFC3339
# Close with reason
bd close bd-42 --reason "Completed implementation"
# Close without changes needed
bd close bd-42 --reason "no-changes: already fixed in bd-10"
# Close and suggest next unblocked issues
bd close bd-42 --suggest-next
# Close molecule step and auto-advance
bd close bd-42 --continue
# Force close pinned issues
bd close bd-42 --force
# Alias: bd done bd-42
bd done bd-42 --reason "Done"
# Add dependency: bd-42 needs bd-10
bd dep add bd-42 bd-10
# Shorthand: bd-10 blocks bd-42
bd dep bd-10 --blocks bd-42
# Remove dependency
bd dep remove bd-42 bd-10
# List dependencies of an issue
bd dep list bd-42
# Detect cycles
bd dep cycles
# Visualize dependency tree
bd dep tree bd-42
# Create bidirectional relates_to link
bd dep relate bd-42 bd-55
# Add label to issue
bd label add bd-42 security
# Remove label
bd label remove bd-42 security
# List labels on an issue
bd label list bd-42
# List all labels in database
bd label list-all
# Propagate parent label to children
bd label propagate bd-42 security
# Create epic
bd create "Large feature" -t epic
# Create child issue
bd create "Subtask" --parent bd-epic
# List epic with children
bd epic list
bd show bd-epic --children
Molecules are structured sequences of steps (wisps) with a formula template. Used by Gas Town agents for multi-phase work.
# Check current molecule step
bd mol current
# List all molecules
bd mol list
# Show molecule status
bd mol status
# Promote a wisp to permanent bead
bd promote bd-wisp-xyz
# Swarm management for structured epics with parallel workers
bd swarm --help
| Variable | Default | Purpose |
|---|---|---|
BEADS_DOLT_PORT | 3307 | Dolt server port |
BEADS_DOLT_PASSWORD | (empty) | MySQL password for Dolt |
BD_ACTOR | git user.name or $USER | Actor name for audit trail |
BD_DEBUG_ROUTING | (unset) | Set to 1 to debug rig routing |
Development isolation: Use port 3308 for dev/test Dolt servers
to avoid touching the production server on 3307.
Available on all commands:
| Flag | Description |
|---|---|
--json | Output in JSON format (essential for scripting) |
--actor STRING | Override actor name for audit trail |
--db PATH | Override database path (default: auto-discover .beads/*.db) |
--dolt-auto-commit on|off|batch | Dolt commit policy |
--quiet / -q | Errors only |
--verbose / -v | Debug output |
--readonly | Block write operations |
--sandbox | Disable auto-sync |
--rig STRING | Query different rig (e.g., --rig gastown, --rig gt-) |
# Show all config
bd config list
# Set a value
bd config set jira.url "https://company.atlassian.net"
bd config set status.custom "awaiting_review,awaiting_testing"
bd config set doctor.suppress.pending-migrations true
# Get a value
bd config get jira.url
# Remove a value
bd config unset jira.url
Common namespaces: jira.*, linear.*, github.*, custom.*,
status.*, doctor.suppress.*
Beads uses Dolt (a version-controlled MySQL-compatible database) as its storage backend.
# Server lifecycle
bd dolt start
bd dolt stop
bd dolt status
# Version control
bd dolt commit
bd dolt push
bd dolt pull
# Configuration
bd dolt set port 3308
bd dolt set database myproject
bd dolt set host 127.0.0.1
bd dolt set data-dir /path/to/dolt-data
# Diagnostics
bd dolt show
bd dolt test
# Cleanup
bd dolt clean-databases # Remove stale test databases
bd dolt killall # Kill orphan Dolt processes
NEVER use rm -rf on Dolt data directories. Use bd dolt cleanup
or bd dolt clean-databases instead.
# Create worktree with beads redirect (shares parent .beads/)
bd worktree create feature-auth
bd worktree create bugfix --branch fix-1
# List worktrees
bd worktree list
# Remove worktree (with safety checks)
bd worktree remove feature-auth
# Show current worktree info
bd worktree info
Worktrees automatically share the same .beads/ database via redirect
files, ensuring consistent issue state across all worktrees.
# Initialize in current directory
bd init
bd init -p myprefix # Custom prefix
bd init --stealth # Personal use, invisible to collaborators
# Set up AI editor integration
bd setup claude # Claude Code integration
bd setup cursor
bd setup aider
# Health check
bd doctor
# Show AI workflow context
bd prime
# Non-destructive setup (for fresh clones)
bd bootstrap
# Push/pull Dolt data
bd dolt push
bd dolt pull
# Version history for an issue
bd history bd-42
# Show diff between commits
bd diff bd-42
# Branch management
bd branch list
bd branch create feature-work
# Database overview and statistics
bd status
# Find stale issues
bd stale
# Count issues matching filters
bd count --type bug --status open
# Compact Dolt history
bd compact
# Garbage collection
bd gc
# Export to JSONL
bd export > issues.jsonl
# Import from JSONL
bd init --from-jsonl
# Check PR readiness
bd preflight
bd ready # Find unblocked work
bd update bd-42 --claim # Atomically claim
# ... do the work ...
bd close bd-42 --reason "Done" # Complete
bd create "Found bug in auth" \
-t bug -p 1 \
-d "Detailed description" \
--deps "discovered-from:bd-parent"
# File in a different rig
bd create "Bug in CLI tool" --rig beads
bd create "Gas Town issue" --rig gastown
# Cross-rig show (auto-routes by prefix)
bd show hq-abc # Routes to HQ rig
bd show gt-7 # Routes to gastown rig
Rule: "X needs Y" not "X comes before Y"
# Phase 2 needs Phase 1 to complete first
bd dep add phase2-id phase1-id
# Verify: phase2 should appear in blocked list
bd blocked
Use --json for all programmatic access. Key fields in issue JSON:
{
"id": "bd-42",
"title": "Fix the bug",
"status": "open",
"type": "bug",
"priority": 1,
"assignee": "alice",
"labels": ["security"],
"description": "...",
"notes": "...",
"design": "...",
"acceptance": "...",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-02T00:00:00Z",
"due_at": null,
"defer_until": null,
"parent": null,
"deps": [{"type": "needs", "id": "bd-10"}]
}
bd ready vs bd list --ready: NOT equivalent. bd ready uses
blocker-aware semantics; bd list --ready only filters by stored status.
Dependency direction: bd dep add A B means "A needs B" (B must
complete before A can start). Think requirements, not time order.
--claim is atomic: Fails if already claimed by another agent.
This is intentional for agent coordination.
No done/complete status: Valid statuses are open,
in_progress, blocked, deferred, hooked, closed.
Dolt port conflicts: Dev/test MUST use port 3308, never 3307
(production). Set with bd dolt set port 3308.
Auto-routing by prefix: bd show be-42 routes to the beads_el
rig, bd show gt-7 routes to gastown. Set BD_DEBUG_ROUTING=1 to
debug.
--rig vs --prefix: --rig takes a rig name (e.g., gastown);
--prefix takes the issue prefix (e.g., gt- or gt).
Expert guide for Forge (magit-forge) architecture, database, topic/pullreq/issue types, notification system, and API patterns. Use when implementing or debugging forge database queries, GitHub/GitLab integration, pull request UI, or forge topic/issue commands.
Expert guide for Magit architecture, section API, buffer management, process handling, and mode patterns. Use when implementing or debugging magit-section, magit-mode, magit-insert-section, magit-process, or git porcelain UI.
Expert guide for building Emacs UIs with vui.el (React-like declarative components). Use when implementing vui-defcomponent, vui-mount, vui-use-async, or any vui primitive (vui-text, vui-button, vui-table, vui-hstack, vui-vstack).
Expert guide for building Emacs transient menus (keyboard-driven UI like Magit). Use when implementing or debugging transient-define-prefix, transient-define-suffix, or transient-define-infix commands.