Two ways to use dotbabel:
- TL;DR — just want skills & commands: Clone this repo and run
./bootstrap.sh. That wirescommands/,skills/, and this file into~/.claude/in one step. No npm required.- Want more: Install
@dotbabel/dotbabelfor the full CLI —dotbabel bootstrap,dotbabel sync,dotbabel doctor,dotbabel init,dotbabel detect-drift, and the spec-governance validators. See README.md or docs/quickstart.md.This file is for the bootstrap path. It gets symlinked into
~/.claude/CLAUDE.mdbybootstrap.shand sets the global rule floor for every Claude Code session. Consumers of@dotbabel/dotbabeldo NOT inherit it — the plugin’s behavior lives inplugins/dotbabel/and docs/. Contributors should read CONTRIBUTING.md first.
Universal behavior for every Claude Code session in every repo. Project-level CLAUDE.md files extend and may override these, but should not repeat them.
$HOME/projects/. Do not search the home directory or default locations.dotbabel and is symlinked into ~/.claude/. Edit files in the clone, not ~/.claude/ directly.Grep + Glob + Read to locate current behavior.file:line references in every analysis. Claims without citations are not grounded./ground-first skill to enforce the read-first discipline.regression_paths (see docs/repo-facts.json) or anything consumed by downstream consumers.git stash && <test-command> ; git stash pop
If the failure survives the stash, it’s pre-existing. If it disappears, your change introduced it.
Makefile with a test target → make testpackage.json → npm test (or pnpm test / yarn test based on the lockfile)go.mod → go test ./...pyproject.toml → pytest or uv run pytestStep → verify: [check]. Default to 5 bullets or fewer; exceed that only when the task is genuinely complex.gofmt -w <file> immediately after editing. Never leave Go files with formatting issues.main (or any branch) without explicit user instruction. Commit locally and wait for the user to say “push”.--auto, gh pr merge, or any merge path unless the user says “merge” for that specific PR.git reset --hard a branch that is not yours. If conflict resolution is ambiguous, stop and ask..gitignore proactively.--amend. Never pass --no-verify or --no-gpg-sign unless the user explicitly asks..claude/worktrees/<slug>/, branched from the latest origin/main (run git fetch origin main first).gh pr checkout, git checkout <other-branch>, git switch, or git stash in the main checkout as a way to swap contexts; those operations silently corrupt any concurrent session editing the same checkout.git worktree list and scan for anything that looks active (recent HEAD, branch name matching your intent). Never remove, rename, or force-overwrite a worktree you did not create in this session.git status) and not already claimed by a concurrent headless worker (check for lockfiles/PID files).$CLAUDE_PROJECT_DIR in hooks and scripts rather than relative paths./tmp or the worktree path, emit results to stdout as a fallback and flag the limitation explicitly.gh pr create --body-file <file>, not heredoc. Heredocs mangle backticks and break the required Spec ID block.## Summary — 1–3 bullets describing the change.## Test plan — bulleted markdown checklist.## Spec ID heading followed by the spec id — if the project uses spec IDs (check for specs/ or docs/specs/). Must be an H2 heading; dotbabel-check-spec-coverage extracts it via H2 regex.bash (not zsh) for monitor scripts, loops, and anything using read, $?, or $status. zsh makes status read-only and breaks scripts silently.status, path, pwd, prompt, HISTFILE. Prefer result, workdir, current_status.pwd exists (sessions die silently on deleted worktrees).git status is clean (or intentionally dirty) — no unexpected locks.gh <cmd> --body-file or --json + --jq over shell-interpolated strings./ship, not direct vercel --prod or flyctl deploy).--force without explicit user authorization for the specific run./spec only when the user explicitly asks for a spec, design doc, RFC, or says “let’s spec this out.”For recurring sweeps (Dependabot, cron, CI-triggered agents), use headless mode to skip tool-approval prompts:
claude -p "Check rebase status of all open Dependabot PRs and report CI status" \
--allowedTools "Bash(gh:*),Read,Grep"
Scope --allowedTools tightly — prefer Bash(gh:*) over Bash(*). Combine with cron or GitHub Actions for unattended runs.
This repository governs itself with @dotbabel/dotbabel. The authoritative
list of protected paths lives in docs/repo-facts.json and every entry must
be documented here — dotbabel-check-instruction-drift enforces this invariant.
CLAUDE.md — this file.README.md — top-level public README..github/workflows/** — CI pipelines..claude/** — skill manifest, settings, hooks.docs/repo-facts.json — the facts source of truth.docs/specs/**/spec.json — spec metadata governed by the spec-anchored workflow.plugins/dotbabel/src/** — the npm package’s source of truth.plugins/dotbabel/bin/** — the shipped bin entrypoints.plugins/dotbabel/templates/** — scaffolding templates consumers install.Any PR touching one of these paths must carry either Spec ID: dotbabel-core
or a ## No-spec rationale section in its body.
Claude Code now treats skills and custom commands as the same slash-invoked
family: commands/foo.md and skills/foo/SKILL.md both expose /foo.
Skills are the preferred shape for new reusable workflows because they support
supporting files, richer frontmatter, automatic model invocation, direct user
invocation, and lazy-loaded references. Existing commands/ files remain valid;
do not migrate them just for naming.
Use skills/<id>/SKILL.md when:
/id.references/, scripts, templates, examples, or other
supporting files.disable-model-invocation, user-invocable,
allowed-tools, model, effort, or context belongs in skill frontmatter.Use commands/<name>.md only for simple existing single-file prompt templates
where explicit slash invocation is the whole interface and no supporting files
or automatic routing are wanted. For side-effectful workflows implemented as
skills, set disable-model-invocation: true; do not fall back to commands
solely for safety.
handoff intentionally stays a skill: phrases like “continue in codex” and
“push handoff” should auto-route, while /handoff still works as a direct
invocation.
Loading model: skill descriptions are available for discovery, full SKILL.md
content loads only when invoked, and supporting files load only when referenced.
Do not maintain static command or skill tables in this file. When editing this
dotbabel repository, the authoritative inventory is generated from artifact
frontmatter:
node plugins/dotbabel/bin/dotbabel-index.mjs --check
node plugins/dotbabel/bin/dotbabel-list.mjs --type skill
node plugins/dotbabel/bin/dotbabel-list.mjs --type command
node plugins/dotbabel/bin/dotbabel-search.mjs <query>
node plugins/dotbabel/bin/dotbabel-show.mjs <id> --type skill