my-claude — document your setup
Caution
Claude Code’s /team-onboarding covers the basics — nothing more. It reads your local config and generates a ramp-up guide. It has no web access, no architecture research, and no citation tracking. As your setup grows — plugins, hooks, custom agents, alternative providers, project rules — the built-in command produces a flat snapshot that goes stale within days. There is no INDEX, no versioning, no reviewer pass.
Tip
/brewdoc:my-claude goes further. Internal mode maps everything in ~/.claude and your project’s .claude, then runs a reviewer agent to validate every file path and count before writing. External mode synthesizes hook/context/agent architecture from official Anthropic docs, GitHub releases, and community forums. Research mode launches parallel agents across multiple live sources for any Claude Code query — with per-fact source citations and a reliability table.
Quick reference
| Field | Value |
|---|---|
| Command | /brewdoc:my-claude |
| Arguments | [ext [context]] | [r <query>] — no args = internal mode |
| Model | opus |
| Context | main conversation |
| Tools | Read, Write, Edit, Glob, Grep, Bash, Task, WebFetch, WebSearch, Skill, AskUserQuestion |
When to use
- New team member onboarding — generate a complete map of your Claude Code setup as a shareable doc
- Plugin audit before a release — snapshot your current skills, agents, hooks, and rules
- Architecture research — pull official Anthropic docs on hooks, context injection, agent schema into one place
- Custom investigation — research any Claude Code topic across multiple live sources with citations
- Version tracking — INDEX entries persist across runs; compare docs over time
Examples
# Internal mode — maps your full ~/.claude + project .claude
/brewdoc:my-claude
# External mode — official architecture docs (hooks, context, agents)
/brewdoc:my-claude ext
# External mode, context-schema sub-mode — focuses on additionalContext / updatedInput
/brewdoc:my-claude ext context
# Research mode — any Claude Code query, multi-source with citations
/brewdoc:my-claude r plugin hooks additionalContext regression
vs /team-onboarding
Claude Code 2.1.101 shipped a built-in /team-onboarding slash command. It generates a teammate ramp-up guide from your local config. Use it when you need a quick, one-shot handoff doc.
Use /brewdoc:my-claude when you need any of the following that /team-onboarding does not provide:
| Capability | /team-onboarding | /brewdoc:my-claude |
|---|---|---|
| Local config map | yes | yes |
| Web research (forums, GitHub, marketplaces) | no | RESEARCH mode |
| Official architecture docs (hooks, context schema) | no | EXTERNAL mode |
| Per-fact source citations | no | yes |
| Reviewer agent validation pass | no | yes |
| Persistent INDEX with versioning | no | yes |
Modes
| Argument | Mode | What it does |
|---|---|---|
| (none) | INTERNAL | Analyzes ~/.claude + project .claude — rules, agents, skills, memories |
ext or external | EXTERNAL (default) | Official docs + local hook analysis + recent releases |
ext context | EXTERNAL (context-schema) | Focuses on context injection schema: additionalContext, updatedInput |
r <query> or research <query> | RESEARCH | Custom query across GitHub, Reddit, forums, marketplaces |
Flow
- Detect mode
Reads
$ARGUMENTSand selects INTERNAL, EXTERNAL, or RESEARCH. Loads the corresponding reference file fromreferences/. - Parallel discovery
INTERNAL: spawns 3 parallel
Exploreagents — (1) global~/.claudeconfig, (2) project.claudeconfig, (3) memory files. EXTERNAL/RESEARCH: spawnsgeneral-purposeagents per source group (official docs, GitHub, forums). - Aggregate findings
Merges agent outputs into a structured Markdown document. RESEARCH mode tracks source URL per fact for the citations table.
- Reviewer pass
Spawns an independent
revieweragent to validate facts — file paths exist, content accurate, no hallucinated versions. Applies fixes before writing the final doc. - Write output
Writes to
.claude/brewdoc/my-claude/YYYYMMDD_my-claude-{mode}.md(project-relative —~/.claude/*is protected and blocked in headlessclaude -psessions, even underbypassPermissions). Creates the directory if needed withmkdir -p. - INDEX entry
Appends a record to
.claude/brewdoc/INDEX.jsonlwith timestamp, mode, path, title, and version. If an entry for this mode already exists, asks viaAskUserQuestionwhether to update (bump version) or create a new entry alongside the existing one.
Internals — output paths, INDEX schema, document structures
Output directory: .claude/brewdoc/my-claude/ (project-relative). ~/.claude/* is blocked by Claude Code’s protected-path policy in headless sessions, even under bypassPermissions. The plugin data path ${BD_PLUGIN_DATA}/my-claude/ works in interactive sessions only — not recommended for scripts or CI.
INTERNAL sources analyzed:
~/.claude/CLAUDE.md— global instructions~/.claude/rules/*.md— global rules~/.claude/agents/*.md— global agents~/.claude/skills/— global skills- Project
CLAUDE.mdand.claude/rules/*.md ~/.claude/projects/**/memory/MEMORY.md— memory files
INDEX format:
{"ts":"2026-02-28T10:00:00","mode":"internal","path":".claude/brewdoc/my-claude/20260228_my-claude-internal.md","title":"Internal Claude Setup Overview","version":"1.0"}Legacy migration: if ~/.claude/brewdoc/INDEX.jsonl exists and the project INDEX is empty, entries are merged once (read-only). The legacy file is never written to. A notice is printed: ℹ️ Migrated {N} entries from legacy ~/.claude/brewdoc/INDEX.jsonl.
INTERNAL output structure:
# Claude Code Internal Setup — {date}
## Global Configuration
### Instructions (CLAUDE.md) | Rules ({N}) | Agents ({N}) | Skills ({N})
## Project Configuration
### Project Instructions | Project Rules
## Memory
### Active Memories ({N} entries)
## Summary
| Component | Count | Location |RESEARCH output structure:
# Research: {query} — {date}
## Findings
### {Source Group 1} ...
## Sources
| Fact | Source | Reliability |
## Review VerdictEXTERNAL context-schema sub-mode writes to .claude/brewdoc/my-claude/external/YYYYMMDD_context-schema.md instead of the default path.
RESEARCH agent count: 2–5 general-purpose agents spawned in parallel, one per source group (official docs, GitHub issues, Reddit/forums, marketplaces, community Discord).
auto-sync
Universal doc sync — keeps Markdown, MDX, and knowledge files current automatically.
memory
Optimize memory files interactively — compress, deduplicate, restructure MEMORY.md.
GitHub source
Source code, reference files, and mode instructions.
brewdoc overview
All brewdoc skills — auto-sync, my-claude, memory, md-to-pdf, guide, publish.
Updating plugins
/brewtools:plugin-update to check and update the brewcode plugin suite in one command.
See the FAQ for details.