bootstrap

A setup and upgrade command for configuring Claude Code in a repository while preserving existing configuration.

In plain words
What is it for?
Use it for a fresh Claude Code setup or a smart upgrade that follows the repository's bootstrap process.
Why use it?
It checks whether the repository's bootstrap instructions are present and explains how to reinstall them if they are missing.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/brain-bootstrap/claude-code-brain-bootstrap/bootstrap
Clone the repo
git clone --depth 1 https://github.com/brain-bootstrap/claude-code-brain-bootstrap

Made for: Claude Code.

Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,047 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.01047
Opus 5 $0.00011 $0.00524
Sonnet 5 $0.00004 $0.00209
Haiku 4.5 $0.00002 $0.00105

Measured 2d ago against content hash a9d0a865ea7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

bootstrap scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- If **MISSING**: the scaffolding was cleaned up after a previous bootstrap. Tell the user to re-install: `git clone https://github.com/brain-bootstrap/claude-code-brain-bootstrap.git /tmp/brain && bash /tmp/brain/instal
.claude/commands/bootstrap.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auto-configure Claude Code for this repository: $ARGUMENTS

ultrathink — use extended reasoning for thorough repository analysis and safe merging.

⚠️ AUTONOMOUS EXECUTION: Run all phases A to Z without stopping. NO "shall I proceed?", NO confirmation prompts, NO pauses between phases. If user asks a question mid-bootstrap, answer briefly then continue. ONLY stop for genuine blockers (missing file, script failure).

Instructions

Step 0 — Verify scaffolding exists (MUST do first): Run this bash command to check if the bootstrap scaffolding is present:

test -f claude/bootstrap/PROMPT.md && echo "FOUND" || echo "MISSING"
  • If FOUND: read claude/bootstrap/PROMPT.md using the read_file tool (use the exact path claude/bootstrap/PROMPT.md), then execute the bootstrap process autonomously.
  • If MISSING: the scaffolding was cleaned up after a previous bootstrap. Tell the user to re-install: git clone https://github.com/brain-bootstrap/claude-code-brain-bootstrap.git /tmp/brain && bash /tmp/brain/install.sh . && rm -rf /tmp/brain — then run /bootstrap again.

⚠️ Do NOT use file search to find PROMPT.md — newly installed files may not be in the git index yet. Use test -f or read_file with the exact path.

Quick summary of phases:

  1. Discovery — Run bash claude/scripts/discover.sh (single script, ~2s) → detects stack + plugins + FRESH/UPGRADE mode
  2. Smart Merge (UPGRADE only) — Normalize directory structure, enhance CLAUDE.md, deep-merge settings.json, add missing commands/hooks/agents without touching existing ones
  3. Population Step 1 — Run bash claude/scripts/populate-templates.sh (batch replacement, ~3s) → fills ~70 mechanical placeholders
  4. Population Step 2 — YOU fill architecture.md, CLAUDE.md sections, domain docs (creative work)
  5. Plugins — Install claude-mem (skip if already installed), disable by default (quota protection), verify present
  6. Validate + Report — Run bash claude/scripts/post-bootstrap-validate.sh (unified check, ~10s) → generate bootstrap-report.md

Read the full file on GitHub · 55 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 55 lines · 22 tokens per session scan C a9d0a865ea7f

Subscribe to this mod's changes

bootstrap is a command published in the GitHub repository brain-bootstrap/claude-code-brain-bootstrap (11 stars, last pushed 4mo ago), licensed MIT. It adds 22 tokens to every session and 1,047 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.