dotbabel

CLAUDE.md — Global Claude Code Rules

Two ways to use dotbabel:

This file is for the bootstrap path. It gets symlinked into ~/.claude/CLAUDE.md by bootstrap.sh and sets the global rule floor for every Claude Code session. Consumers of @dotbabel/dotbabel do NOT inherit it — the plugin’s behavior lives in plugins/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.

Local filesystem conventions

Code Changes

Root Cause Before Fix

Testing

TDD and verification

Test Plan Verification

Version control discipline

Worktree discipline (for any non-trivial change)

Worktree & Sandbox Conventions

PR Conventions

Shell & Scripting

Deploy discipline

Implementation vs Spec

Headless Mode

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.

Communication

Protected paths (dogfood)

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.

Any PR touching one of these paths must carry either Spec ID: dotbabel-core or a ## No-spec rationale section in its body.

Skills, Commands, and Discovery

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:

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