Brewdoc Overview

Brewdoc is a documentation toolkit plugin (a set of utilities for working with documents) for Claude Code. It keeps documentation in sync with the codebase, optimizes content for LLM consumption, and exports documents to ready-made formats.

Installation

claude plugin install brewdoc@claude-brewcode

Brewdoc ships as part of the claude-brewcode marketplace. If the marketplace has not been added yet:

claude plugin marketplace add https://github.com/kochetkov-ma/claude-brewcode
claude plugin install brewdoc@claude-brewcode

Skills (recipes)

Brewdoc contains 4 skills, each handling a separate documentation task.

Commands

CommandPurposeModelArguments
/brewdoc:auto-syncSynchronize documentation with codeopus[status] | [init <path>] | [global] | [path]
/brewdoc:my-claudeGenerate documentation about Claude Code installationopus[ext [context]] | [r <query>]
/brewdoc:memoryOptimize memory files in 4 stepsopus
/brewdoc:md-to-pdfConvert Markdown to PDFsonnet<file.md> [--engine name] ["prompt"] | styles | test

My-Claude (details)

The /brewdoc:my-claude skill does not have a dedicated page, so it is described here. It generates documentation about your Claude Code installation in ~/.claude/brewdoc/.

Default mode (no arguments).

Analyzes local configuration:

  • ~/.claude/CLAUDE.md — global instructions
  • ~/.claude/rules/*.md — global rules
  • ~/.claude/agents/*.md — global agents
  • Project CLAUDE.md and .claude/rules/*.md
  • Memory files MEMORY.md

Launches 3 parallel Explore agents for data collection and a reviewer for fact-checking.

/brewdoc:my-claude

ext mode — documents the hooks and context architecture of Claude Code.

Analyzes local hook files, looks for updates in official releases, gathers information from code.claude.com and GitHub.

The context sub-mode focuses on the context injection schema (additionalContext, updatedInput).

/brewdoc:my-claude ext
/brewdoc:my-claude ext context

r mode — research a specific question across multiple sources.

Splits the query into 2-5 source groups (documentation, GitHub, Reddit, forums), launches parallel general-purpose agents, aggregates results with citation tracking.

/brewdoc:my-claude r "plugin hooks PreToolUse additionalContext"

Architecture

Brewdoc has a minimal architecture compared to Brewcode:

brewdoc/
├── .claude-plugin/
│   └── plugin.json              # Plugin manifest
├── hooks/
│   ├── hooks.json               # 1 hook (Pre-Task)
│   ├── pre-task.mjs             # BD_PLUGIN_ROOT injection
│   └── lib/utils.mjs            # I/O utilities
├── skills/
│   ├── auto-sync/               # Documentation sync
│   ├── my-claude/               # Installation documentation
│   ├── memory/                  # Memory optimization
│   └── md-to-pdf/               # PDF conversion
└── agents/
    └── bd-auto-sync-processor   # File processing agent

The single hook pre-task.mjs injects the BD_PLUGIN_ROOT variable into subagent prompts so they can locate the plugin’s instruction files. Skills in the main conversation use ${CLAUDE_SKILL_DIR} to access their own files.

Brewdoc vs Brewcode

Brewdoc is a set of documentation utilities: sync, memory optimization, PDF export. Each skill is self-contained and independent of the others.

Brewcode is a task execution engine with infinite context, 8 lifecycle hooks, KNOWLEDGE.jsonl, and a session handoff mechanism.

Both plugins install from the same claude-brewcode marketplace but operate independently.