From airbender
Use when bootstrapping a MagicDocs system in a repository, setting up auto-maintained architectural documentation, or when the user asks to install magicdocs
How this skill is triggered — by the user, by Claude, or both
Slash command
/airbender:setup-magicdocsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Bootstrap a MagicDocs system in the current repository. Run once per repo.
Bootstrap a MagicDocs system in the current repository. Run once per repo.
MagicDocs are terse, auto-maintained architectural docs that capture non-obvious patterns, gotchas, design rationale, and entry points. They complement CLAUDE.md (behavioral constraints) by holding architectural knowledge that would otherwise go stale.
digraph setup {
"Explore repo structure" [shape=box];
"Propose 2-3 segmentation strategies" [shape=box];
"User picks one" [shape=diamond];
"Create docs/magic/ + skeleton docs" [shape=box];
"Update CLAUDE.md (with confirmation)" [shape=box];
"Configure hooks in settings.json (with confirmation)" [shape=box];
"Done" [shape=doublecircle];
"Explore repo structure" -> "Propose 2-3 segmentation strategies";
"Propose 2-3 segmentation strategies" -> "User picks one";
"User picks one" -> "Create docs/magic/ + skeleton docs";
"Create docs/magic/ + skeleton docs" -> "Update CLAUDE.md (with confirmation)";
"Update CLAUDE.md (with confirmation)" -> "Configure hooks in settings.json (with confirmation)";
"Configure hooks in settings.json (with confirmation)" -> "Done";
}
Read the repo structure. Identify major subsystems, entry points, and boundaries. Don't read every file — focus on top-level directories, key config files, and entry points.
Present 2-3 segmentation strategies to the user with trade-offs. Common approaches:
Do NOT pick one yourself. The user chooses.
Create docs/magic/ and one doc per segment. Every doc MUST use this exact format:
# MAGIC DOC: <Title>
*<one-line description>*
## Overview
<2-3 sentences>
## Key Entry Points
<where to start reading>
## Non-Obvious Patterns
<gotchas, conventions, surprises>
Rules:
# MAGIC DOC: <Title> — this exact format. The regex ^# MAGIC DOC: is how the system discovers docs.## Dependencies section only if the subsystem has non-obvious external dependencies.docs/magic/ — discovery is handled by the # MAGIC DOC: header convention.Ask the user for confirmation, then append these two items to CLAUDE.md (create it if it doesn't exist):
Architectural documentation is maintained in docs/magic/ and may also be
co-located with code (grep for `# MAGIC DOC:` headers). Read the relevant
Magic Doc before making changes to a subsystem you're unfamiliar with.
Files with `# MAGIC DOC:` headers are auto-maintained by the magicdocs
system. Changes to these files may appear in unstaged diffs — this is
expected.
Ask the user for confirmation, then add to .claude/settings.json:
Stop hook — pruning pass at session exit:
{
"hooks": {
"Stop": [{
"hooks": [{
"type": "command",
"command": "if git diff --stat HEAD 2>/dev/null | grep -q '.'; then claude -p 'Check the git diff against existing magic docs (grep for files with # MAGIC DOC: headers). If any doc references files, paths, or structures that changed in the diff, update those references in-place. Do NOT add new architectural insights — only fix inconsistencies between docs and current code state. Be terse. If nothing is inconsistent, make no edits.' --model sonnet --allowedTools 'Glob,Read,Edit,Grep' 2>/dev/null & fi"
}]
}]
}
}
Merge with existing hooks if any are already configured.
The airbender plugin must be installed as a Claude Code skills plugin. This provides /create-magicdoc and /classify-info — the companion skills that create individual docs and route insights to the update subagent.
/classify-info in the main agent's normal workflownpx claudepluginhub translunar/airbender --plugin airbenderAudits existing docs and generates full project documentation in docs/ including architecture.md, getting-started.md, development.md, API refs, and ADRs. For onboarding and context sharing.
Bootstraps or repairs the llmdoc documentation skeleton in a repository. Automates directory creation, investigation, and initial doc generation.
Scaffolds AGENTS.md, ARCHITECTURE.md, and docs/ structure to make codebases legible to AI agents. Analyzes structure with bash recon, generates progressive disclosure docs, audits existing artifacts for coherence.