## 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`:

```ts title="zfb.config.ts"
export default defineConfig(
  zudoDoc({
    claudeResources: {
      claudeDir: ".claude",
    },
  }),
);
```

Set to `false` to disable:

```ts
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/*/SKILL.md` | `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/zudo-doc/plugins/claude-resources`), wired in automatically by `zudoDoc()` whenever `claudeResources` is set. Its `preBuild` hook:

1. Scans the configured `.claude/` directory
2. Discovers CLAUDE.md files, commands, skills (with references), and agents
3. Generates MDX files in `src/content/docs/claude-*/` directories
4. 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"`.

[Dynamic content unavailable in text export]

Generated files are written to `src/content/docs/` 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](https://zudo-doc.takazudomodular.com/docs/guides/i18n#generated-pages-and-default-locale-bodies) for the storage rationale, `llms.txt` and search behavior, and the `defaultLocaleOnlyPrefixes` opt-out.

If you take that opt-out, restrict the whole section: the overview prefix `/docs/claude/` has to be listed alongside `/docs/claude-md/`, `/docs/claude-skills/`, `/docs/claude-agents/`, and `/docs/claude-commands/`. With the overview prefix missing, the locale-owned overview index is still generated into every configured locale, and an authored locale `claude/index.mdx` without `generated: true` fails the build with `resource-docs: refusing to overwrite authored locale index`. See [A resource section includes its overview prefix](https://zudo-doc.takazudomodular.com/docs/guides/i18n#default-locale-only-prefixes-a-resource-section-includes-its-overview-prefix).

## 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.

[Dynamic content unavailable in text export]

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](https://zudo-doc.takazudomodular.com/docs/getting-started/writing-docs).