document-generate

Use when a feature, module, or whole project needs missing documentation created from scratch - read the codebase, map the public surface with Diataxis (tutorial/how-to/reference/explanation), and generate the missing docs with cross-links.

8 stars

Best use case

document-generate is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when a feature, module, or whole project needs missing documentation created from scratch - read the codebase, map the public surface with Diataxis (tutorial/how-to/reference/explanation), and generate the missing docs with cross-links.

Teams using document-generate should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/document-generate/SKILL.md --create-dirs "https://raw.githubusercontent.com/drvoss/everything-copilot-cli/main/skills/documentation/document-generate/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/document-generate/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How document-generate Compares

Feature / Agentdocument-generateStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when a feature, module, or whole project needs missing documentation created from scratch - read the codebase, map the public surface with Diataxis (tutorial/how-to/reference/explanation), and generate the missing docs with cross-links.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Document Generate

Document Generate creates missing documentation for a codebase from the implementation
up. It is for greenfield documentation coverage, not small doc touch-ups.

The organizing frame is Diataxis:

- **Tutorial** - get to a first successful result
- **How-to** - complete a specific task
- **Reference** - factual interface details
- **Explanation** - why the design works this way

## When to Use

- A shipped feature has little or no documentation
- A module or subsystem needs first-pass docs from the source code
- A project needs documentation coverage beyond one README paragraph
- You need to decide which entities deserve tutorial, how-to, reference, and explanation docs

## When NOT to Use

| Instead of document-generate | Use |
|------------------------------|-----|
| Updating docs after a code change | `doc-update` |
| Generating only deep API or interface reference docs, with no tutorial/how-to/explanation coverage | `api-documentation` |
| Creating VS Code CodeTour onboarding files | `code-tour` |

## Workflow

### 1. Define the scope and output mode

Choose one:

- one feature
- one module
- one subsystem
- the whole project

Then choose where the docs should land:

- inline updates to existing docs
- standalone docs in `docs/`
- both

If the scope is large, recommend starting with one feature or module first.

### 2. Do codebase archaeology before writing

Read enough source to understand reality:

- entry points and exported surface
- implementation files
- tests
- README, architecture docs, and contribution docs
- comments that explain design intent

The point is to document the code that exists, not the code you assume exists.

### 3. Partition the surface with Diataxis

Not every entity needs all four document types.

Use this rule of thumb:

| Entity type | Tutorial | How-to | Reference | Explanation |
|------------|----------|--------|-----------|-------------|
| End-user feature | Maybe | Yes | Maybe | Yes |
| CLI flag or config option | No | Yes | Yes | No |
| Public API or interface | No | Maybe | Yes | Maybe |
| Internal design concept | No | No | Maybe | Yes |

Write down the coverage plan before generating files.

### 4. Write reference first

Reference documentation sets the vocabulary for the rest:

- names
- signatures
- defaults
- allowed values
- examples

Keep it factual. If you want to explain why something exists, that belongs in the
explanation doc.

### 5. Write explanation second

Capture:

- the problem being solved
- the chosen design
- tradeoffs
- rejected alternatives
- operational or maintenance implications

Explanation tells future readers why the current shape is reasonable.

### 6. Write how-to guides for concrete tasks

A how-to guide should include:

- prerequisites
- exact steps
- expected result
- verification
- troubleshooting

It should help an experienced user accomplish one specific job.

### 7. Write tutorials for the first successful outcome

Tutorials are for first success, not exhaustive coverage.

Good tutorial rules:

- target one happy-path outcome
- keep the step count low
- end with "what you built" or equivalent payoff
- link out to reference docs for deeper detail

### 8. Cross-link for discoverability

Make the docs navigable:

- tutorial -> how-to/reference
- how-to -> reference
- explanation -> reference and related concepts
- README or index -> newly created docs

### 9. Run a quality review before stopping

Check:

- no broken links
- no duplicate docs saying the same thing
- the docs reflect current behavior
- each document has one clear job

## Output Template

```markdown
## Documentation Plan

| Entity | Tutorial | How-to | Reference | Explanation |
|--------|----------|--------|-----------|-------------|
| ... | ... | ... | ... | ... |

## Generated Files

- path - quadrant - purpose

## Coverage Gaps

- ...
```

## Common Rationalizations

| Rationalization | Reality |
|----------------|---------|
| "README is enough." | A README cannot carry tutorial, task guide, reference, and design rationale all at once. |
| "I'll just write the API docs." | Users also need onboarding and task-level guidance. |
| "Docs can be added later." | The source context is clearest while the feature is still fresh. |

## Red Flags

- Writing docs from filenames without reading implementation
- Repeating the same content in tutorial, how-to, and explanation
- Treating reference docs like narrative essays
- Ending without updating discoverability links

## Verification

- [ ] The source code and tests were read before drafting
- [ ] Each generated doc has a clear Diataxis role
- [ ] `document-generate` is not being used for a small incremental doc sync
- [ ] `document-generate` is not being used for API-only reference work that belongs in `api-documentation`
- [ ] Cross-links and index or README discoverability were updated

## See Also

- [`doc-update`](../doc-update/SKILL.md) - sync existing docs after code changes
- [`api-documentation`](../api-documentation/SKILL.md) - write API and interface reference docs from source
- [`architecture-decisions`](../architecture-decisions/SKILL.md) - capture hard-to-reverse design choices as ADRs

Related Skills

api-documentation

8
from drvoss/everything-copilot-cli

Use when source code has changed and API docs are stale, or a new endpoint lacks documentation — generates accurate docs from implementation, not guesswork.

verification-before-completion

8
from drvoss/everything-copilot-cli

Use before claiming any task is done — run the exact command that proves the fix works, read the output, and only then report success.

using-git-worktrees

8
from drvoss/everything-copilot-cli

Use when you need multiple branches checked out at once — create isolated working directories for parallel development without cloning the repository repeatedly

triage

8
from drvoss/everything-copilot-cli

Use when a single issue needs structured triage — classify it, reproduce if needed, request missing information, and leave a durable brief or close-out note in the tracker.

to-issues

8
from drvoss/everything-copilot-cli

Use when a plan, spec, or PRD must become an actionable backlog — break it into thin dependency-aware issues that each deliver a verifiable vertical slice

sprint-workflow

8
from drvoss/everything-copilot-cli

Use when starting a new feature, refactor, or multi-step dev task — runs the full sprint cycle (Think → Plan → Build → Review → Test → Ship → Monitor) using Copilot CLI's plan/autopilot modes.

sprint-retro

8
from drvoss/everything-copilot-cli

Use at the end of a sprint to run a data-driven retrospective — analyzes session history and git metrics to surface what shipped, what slowed you down, and concrete improvements.

security-audit

8
from drvoss/everything-copilot-cli

Use when a codebase needs a formal security audit beyond a quick scan — applies OWASP Top 10 and STRIDE threat modeling from a CSO perspective to surface systemic vulnerabilities.

release

8
from drvoss/everything-copilot-cli

Use when a sprint or feature is complete and ready to ship — tags the version, generates GitHub Release notes, runs rollout or smoke verification, and publishes to npm/PyPI/Docker registries.

prompt-optimizer

8
from drvoss/everything-copilot-cli

Use when a rough prompt, vague idea, or task description needs to become a finished copy-pasteable prompt for a chat-based LLM - rewrite it into one ready-to-send prompt with no blanks, no placeholders, and a clear output shape.

outside-voice

8
from drvoss/everything-copilot-cli

Use when you need an independent second opinion before, during, or after implementation — run challenge, consult, or review mode in a direct builder-to-builder voice

llm-wiki

8
from drvoss/everything-copilot-cli

Use when research or domain knowledge keeps getting rediscovered across sessions — build a supplementary markdown wiki that compounds synthesized knowledge without replacing GitHub or committed project guidance