-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I see this project uses beads but also recommends using the claude skill here. I wanted to find out if there would be an openess to contribute a linear prime command similar to the way bd prime works. They make their argument here; I dropped it in a drawer below for reference. It would personally useful for me to have this linear cli prompt in a claude lifecycle hook based on my workflows. I don't think it would contradict the current claude skill and we could back port it to all source from a linear prime to avoid a maintenance burden.
Reference: Beads Claude Code Integration Design
Claude Code Integration Design
This document explains design decisions for Claude Code integration in beads.
Integration Approach
Recommended: CLI + Hooks - Beads uses a simple, universal approach to Claude Code integration:
bd primecommand for context injection (~1-2k tokens)- Hooks (SessionStart/PreCompact) for automatic context refresh
- Direct CLI commands with
--jsonflags - Optional: Plugin for slash commands and enhanced UX
Alternative: MCP Server - For MCP-only environments (Claude Desktop, no shell):
- Higher context overhead (MCP tool schemas)
- Use only when CLI is unavailable
Why CLI + Hooks Over MCP?
Context efficiency matters, even with large context windows:
- Compute cost scales with tokens - Every token in your context consumes compute on every inference, regardless of whether it's used
- Latency increases with context - Larger prompts take longer to process
- Energy consumption - Each token has environmental impact; lean prompts are more sustainable
- Attention quality - Models attend better to smaller, focused contexts
The math:
- MCP tool schemas can add 10-50k tokens to context (depending on number of tools)
bd primeadds ~1-2k tokens of workflow context- That's 10-50x less context overhead
When context size doesn't matter:
- MCP-only environments where CLI isn't available (Claude Desktop)
- Very short conversations where context overhead is negligible
When to prefer CLI + hooks:
- Any environment with shell access (Claude Code, Cursor, Windsurf, etc.)
- Long conversations or coding sessions
- Multi-editor workflows (CLI is universal)
Why Not Claude Skills?
Decision: Beads does NOT use or require Claude Skills (.claude/skills/)
Reasons
-
Redundant with bd prime
bd primealready provides workflow context (~1-2k tokens)- Skills would duplicate this information
- More systems = more complexity
-
Simplicity is core to beads
- Workflow fits in simple command set: ready → create → update → close → sync
- Already well-documented in ~1-2k tokens
- Complex workflow orchestration not needed
-
Editor agnostic
- Skills are Claude-specific
- Breaks beads' editor-agnostic philosophy
- Cursor, Windsurf, Zed, etc. wouldn't benefit
-
Maintenance burden
- Another system to document and test
- Another thing that can drift out of sync
- Another migration path when things change
If Skills were needed...
They should be:
- Provided by the beads plugin (not bd core tool)
- Complementary (not replacing) bd prime
- Optional power-user workflows only
- Opt-in, never required
Current approach is better
- ✅
bd prime- Universal context injection - ✅ Hooks - Automatic context refresh
- ✅ Plugin - Optional Claude-specific enhancements
- ✅ MCP - Optional native tool access (legacy)
- ❌ Skills - Unnecessary complexity
Users who want custom Skills can create their own, but beads doesn't ship with or require them.
Installation
# 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 --removeWhat it installs:
- SessionStart hook: Runs
bd primewhen Claude Code starts a session - PreCompact hook: Runs
bd primebefore context compaction to preserve workflow instructions
...truncated
I'm happy to take a similar approach to the way bd prime works (command here).
Would you be open to a discussion or pull request to create a linear prime command?
If so, a little bit of direction would be useful to me:
- Would you also want a setup function to add to claude hooks?
- Do you have a preference on implementation? I would assume to put a new command in the main.ts and turn
config.tsinto a folderconfigand split acrosscli-config.tsandsetup.tsperhaps? - Would you want to share the skill content here? It would be nice to have a single source but could use some refinement.