Claude Code Resources
Auto-generate documentation from your Claude Code resources.
Overview
zudo-doc can automatically generate documentation pages from your project's Claude Code resources — CLAUDE.md files, custom commands, skills, and agents. When enabled, these appear under the Claude header navigation section.
Enabling Claude Resources
Set claudeResources in zfb.config.ts:
export default defineConfig(
zudoDoc({
claudeResources: {
claudeDir: ".claude",
},
}),
);Set to false to disable:
claudeResources: false,What Gets Generated
The integration scans your .claude/ directory and generates MDX documentation pages for:
| Resource | Source | Output |
|---|---|---|
| CLAUDE.md files | Project root and subdirectories | claude-md/ |
| Commands | .claude/commands/*.md | claude-commands/ |
| Skills | . | claude-skills/ |
| Agents | .claude/agents/*.md | claude-agents/ |
Each resource type gets its own index page with a list of all items, plus individual detail pages.
How It Works
The integration runs at build time as a zfb plugin (@takazudo/), wired in automatically by zudoDoc() whenever claudeResources is set. Its preBuild hook:
Scans the configured
.claude/directoryDiscovers CLAUDE.md files, commands, skills (with references), and agents
Generates MDX files in
src/directoriescontent/ docs/ claude- */ These files are picked up by zfb's content collections and rendered as documentation pages
The generated pages appear under the Claude header navigation tab, configured via headerNav with categoryMatch: "claude".
Note
Generated files are written to src/ and are recreated on every build. Do not edit them manually — your changes will be overwritten.
Locale Behavior
The overview and category-index pages are generated in every configured locale, using resource.* UI strings for their title, description, and labels. The default content directory holds the canonical source dump for each individual resource body; its language follows the source files and is not necessarily English. Locale-prefixed routes display that body inside localized navigation and chrome without an untranslated-page banner. The language switcher keeps links to every configured locale.
English and Japanese resource.* strings ship with the package. Other supported locale codes follow the normal requested locale → configured default → English → literal fallback chain. You can override the labels through ZudoDocConfig.translations. See Internationalization for the storage rationale, llms.txt and search behavior, and the defaultLocaleOnlyPrefixes opt-out.
Configuration Options
| Option | Type | Description |
|---|---|---|
claudeDir | string | Path to the .claude/ directory (relative to project root) |
projectRoot | string | Optional project root override for resolving CLAUDE.md file paths |
scanRoot | string | Optional repository-wide discovery root for the CLAUDE.md walk; defaults to projectRoot |
The projectRoot option is useful in monorepo setups where the .claude/ directory is not at the project root.
Tip
Skills with a references/ subdirectory will have their reference documents included as separate linked pages, making it easy to browse bundled knowledge bases.
Repository-Relative Links in Mirrors
In mirrored resource bodies, Markdown links and images targeting repository-relative paths become inline code, since those paths do not identify documentation URLs. The link label or image alt text is displayed. This applies to Claude CLAUDE.md, commands, and agents; Codex AGENTS.md; and both integrations' skill bodies and sub-pages.
In the main skill body, links into references/, scripts/, and assets/ remain links only when the corresponding sub-page is actually generated. Missing targets and files that do not produce pages, such as .sh scripts, become inline code. Repository-relative links inside sub-page bodies are downgraded too; the generated-target exception applies to the main skill body.
External URLs, root-relative URLs, and page fragments are retained. Link examples inside inline code or fenced code are unchanged. Ordinary authored MDX continues to follow the documentation linking rules.