Skip to main content
The Claude Code integration provides three powerful components:
  • Slash Commands - Quick commands for creating specs and breaking down work
  • BrainGrid CLI Skill - Comprehensive workflow guidance and command reference
  • Status Line - Real-time display of your project, requirement, and task progress

Installation

1

Install BrainGrid CLI

Install the CLI globally:
npm install -g @braingrid/cli
2

Authenticate

Log in to your BrainGrid account:
braingrid login
3

Initialize Your Project

Link your project to BrainGrid:
braingrid init
4

Install Claude Code Integration

Set up slash commands, skill, and status line:
braingrid setup claude-code

What Gets Installed

The setup command installs four key components:

Slash Commands

Located in .claude/commands/, these slash commands provide quick access to BrainGrid features:
CommandDescriptionExample
/specifyCreate AI-refined requirement from vague idea/specify Add user auth with OAuth2
/save-requirementSave a Claude Code plan as a requirement/save-requirement
/breakdownBreak requirement into perfectly-prompted tasks/breakdown REQ-123
/buildGet complete implementation plan with all task prompts in markdown format/build REQ-123

BrainGrid CLI Skill

Located in .claude/skills/braingrid-cli/, this skill provides:
  • Complete command reference with examples
  • Workflow guidance and best practices
  • Auto-detection features documentation
  • Context about your project structure

Status Line

Located in .claude/statusline.sh, this displays real-time context at the top of Claude Code: Example: BrainGrid: PROJ-3 > REQ-128 [2/5]
  • Project: Current BrainGrid project
  • Requirement: Current requirement (auto-detected from git branch)
  • Progress: Task completion (2 of 5 tasks completed)
The status line updates automatically as you switch branches or complete tasks.

CLAUDE.md Content

Injects BrainGrid workflow documentation into your project’s CLAUDE.md file, providing Claude Code with context about:
  • Quick command reference
  • Auto-detection features
  • Status flows and workflows

Typical Workflow

Here’s how to use BrainGrid with Claude Code:
1

Create Specification

Start with a vague idea and let AI refine it:
Claude Code
/specify Add dark mode toggle in settings with theme persistence
This creates a structured requirement with clear scope and acceptance criteria.
2

Break Down into Tasks

Convert the requirement into AI-ready tasks:
Claude Code
/breakdown REQ-1
This generates 5-10 focused tasks with clear prompts optimized for Claude Code.
3

Create Feature Branch

Create a git branch to enable auto-detection:
Claude Code
git checkout -b feature/REQ-1-dark-mode
BrainGrid automatically detects REQ-1 from your branch name.
4

Get Build Plan

Get the complete implementation plan and build it:
Claude Code
/build REQ-1
This provides all task details in markdown format, perfect for Claude Code.As Claude Code is building the requirement, the status line updates automatically to reflect your progress.

MCP Server Installation

Alternatively, you can install BrainGrid as an MCP server:
claude mcp add --transport http braingrid https://mcp.braingrid.ai/mcp

MCP vs CLI

Prefer the CLI when:

  • Don’t want to bloat your context with more MCP servers.
  • Speed matters, the CLI calls end up being faster than the MCP calls.
  • You need to script custom workflows.

Prefer the MCP when:

  • When you are in an environment that does not support the CLI.
  • You are more comfortable with the MCPs than CLIs
Choose one or the other, not both - MCP and CLI are alternative approaches to integrating BrainGrid with Claude Code. Select the approach that best fits your workflow.

Tips for Effective Use

Writing Good Prompts for /specify

Include these elements for best results:
  • Problem - What are you trying to solve?
  • Context - Why is this needed? What’s the background?
  • Constraints - Any technical or business limitations?
  • Users - Who will use this feature?
  • Success Criteria - How will you know it’s done?
Example:
Claude Code
/specify Add user authentication for our web app. We need OAuth2 support
for Google and GitHub. Must work with our existing Express backend and
React frontend. Users should stay logged in for 30 days. Success means
users can sign up and log in without creating passwords.

Using Additional Instructions with /build

Provide specific guidance for task implementation:
Claude Code
/build REQ-123 Use TypeScript for all new code.
Follow the existing repository pattern in src/repositories/.
Include unit tests for all business logic.

Git Branch Workflow

Name your branches with the requirement ID for automatic detection:
# Good - auto-detects REQ-42
git checkout -b feature/REQ-42-stripe-integration

# Also works
git checkout -b fix/REQ-42-payment-bug
git checkout -b REQ-42-any-description

# Won't auto-detect
git checkout -b add-stripe-payments

Learn More