Skip to content
docs-generate-repo logo

Generate Repository Documentation

docs-generate-repo

Generate Level 2 (repository docs) from design docs. Use when

SKILL.md

Full skill instructions

Generate Repository Documentation

Generates Level 2 repository documentation from design docs with topic-based organization.

Overview

This skill transforms design documentation into comprehensive repository documentation by:

  1. Analyzing design docs for the module
  2. Creating topic-based documentation structure
  3. Generating architecture guides
  4. Creating integration guides
  5. Adding troubleshooting sections
  6. Following the Level 2 template structure

Quick Start

Generate all repository docs for a module:

/​docs-generate-repo effect-type-registry

Generate specific topic only:

/​docs-generate-repo effect-type-registry --topic=caching

Preview without writing:

/​docs-generate-repo rspress-plugin-api-extractor --dry-run

How It Works

1. Parse Parameters

  • module: Module name to generate docs for [REQUIRED]
  • --topic: Generate specific topic only (default: all topics)
  • --structure: Output directory structure (default: docs/)
  • --dry-run: Preview file structure without writing

2. Load Configuration and Design Docs

Read .claude/​design/​design.config.json for:

  • Module configuration and paths
  • Repository docs settings (Level 2)
  • Quality standards

Read design docs:

  • Find all design docs for module
  • Parse frontmatter and content
  • Identify major topics and sections
  • Map design content to user-facing topics

3. Identify Topics from Design Docs

Extract major topics from design documentation:

  • Architecture topics - System design, components, data flow
  • Feature topics - Specific capabilities and how they work
  • Integration topics - Using with other tools and frameworks
  • Performance topics - Optimization and benchmarks
  • Testing topics - How to test code using the package

4. Generate Topic Documentation

For each topic:

Extract Content:

  • Overview from design doc introduction
  • Key concepts explained simply
  • Usage patterns and examples
  • API reference for topic
  • Common issues and solutions

Apply Transformations:

  • Simplify technical language
  • Add practical examples
  • Include troubleshooting
  • Cross-link related topics

5. Create Documentation Structure

Organize generated docs into directories:

docs/
├── README.md               # Index of all documentation
├── architecture/
│   ├── overview.md        # High-level architecture
│   └── components.md      # Component breakdown
├── guides/
│   ├── getting-started.md # Detailed getting started
│   └── {topic}.md         # Topic-specific guides
└── troubleshooting.md     # Common issues

6. Write Documentation Files

Write each generated document:

  • Apply repo-doc template
  • Fill in topic-specific content
  • Add table of contents for longer docs
  • Validate against Level 2 standards

7. Validate Output

Check generated docs:

  • Length: 500-2000 words per document
  • Code examples present
  • Cross-references valid
  • Markdown linting passes

Supporting Documentation

Load these files for detailed guidance:

  • instructions.md - Step-by-step implementation
  • examples.md - Example repository documentation
  • topic-mapping.md - Design doc to user doc topic mapping

Success Criteria

Generated repository documentation is successful when:

  • ✅ Comprehensive coverage of module features
  • ✅ Topic-based organization (not implementation-based)
  • ✅ 500-2000 words per document
  • ✅ Practical code examples in each guide
  • ✅ Cross-references between related topics
  • ✅ Table of contents for documents >800 words
  • ✅ Troubleshooting section with common issues
  • ✅ Valid markdown and working examples

Integration Points

  • Uses .claude/​design/​design.config.json for configuration
  • Uses .claude/​skills/​docs-generate-repo/​templates/​repo-doc.template.md for structure
  • Reads design docs from module's designDocsPath
  • Writes to module's userDocs.repoDocs path
  • Validates against quality.userDocs.level2 standards

Related Skills

  • /​docs-generate-readme - Generate Level 1 package README
  • /​docs-generate-site - Generate Level 3 site documentation
  • /​docs-sync - Sync docs with design doc changes
  • /​design-review - Review source design docs

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View