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

FieldValue
Command/brewdoc:my-claude
Arguments[ext [context]] | [r <query>] — no args = internal mode
Modelopus
Contextmain conversation
ToolsRead, 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 &#126;/.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 mapyesyes
Web research (forums, GitHub, marketplaces)noRESEARCH mode
Official architecture docs (hooks, context schema)noEXTERNAL mode
Per-fact source citationsnoyes
Reviewer agent validation passnoyes
Persistent INDEX with versioningnoyes

Modes

ArgumentModeWhat it does
(none)INTERNALAnalyzes &#126;/.claude + project .claude — rules, agents, skills, memories
ext or externalEXTERNAL (default)Official docs + local hook analysis + recent releases
ext contextEXTERNAL (context-schema)Focuses on context injection schema: additionalContext, updatedInput
r <query> or research <query>RESEARCHCustom query across GitHub, Reddit, forums, marketplaces

Flow

  1. Detect mode

    Reads $ARGUMENTS and selects INTERNAL, EXTERNAL, or RESEARCH. Loads the corresponding reference file from references/.

  2. Parallel discovery

    INTERNAL: spawns 3 parallel Explore agents — (1) global ~/.claude config, (2) project .claude config, (3) memory files. EXTERNAL/RESEARCH: spawns general-purpose agents per source group (official docs, GitHub, forums).

  3. Aggregate findings

    Merges agent outputs into a structured Markdown document. RESEARCH mode tracks source URL per fact for the citations table.

  4. Reviewer pass

    Spawns an independent reviewer agent to validate facts — file paths exist, content accurate, no hallucinated versions. Applies fixes before writing the final doc.

  5. Write output

    Writes to .claude/brewdoc/my-claude/YYYYMMDD_my-claude-{mode}.md (project-relative — ~/.claude/* is protected and blocked in headless claude -p sessions, even under bypassPermissions). Creates the directory if needed with mkdir -p.

  6. INDEX entry

    Appends a record to .claude/brewdoc/INDEX.jsonl with timestamp, mode, path, title, and version. If an entry for this mode already exists, asks via AskUserQuestion whether 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). &#126;/.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:

  • &#126;/.claude/CLAUDE.md — global instructions
  • &#126;/.claude/rules/*.md — global rules
  • &#126;/.claude/agents/*.md — global agents
  • &#126;/.claude/skills/ — global skills
  • Project CLAUDE.md and .claude/rules/*.md
  • &#126;/.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 &#126;/.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 &#126;/.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 Verdict

EXTERNAL 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

Use /brewtools:plugin-update to check and update the brewcode plugin suite in one command. See the FAQ for details.