# Documentation Generator Skill

> Writes missing docs, tutorials and how-tos for your code.

- **What it does:** Writes documentation from scratch for a feature, a part of your code, or a whole project. You end up with readable docs like how-tos, tutorials and explanations.
- **Agents:** Claude Code and Codex (through orbit-connect), Claude and ChatGPT (through the Orbit connector)
- **Install:** `npx -y --loglevel=error orbit-connect@0.3.33 install skl_03a54a8e72774c9e2d057636`
- **Creator:** Mariah Brunner (@itsmariahbrunner) on Instagram
- **Reach:** Creators' posts about it have 47,652 views
- **Safety:** Checked by Orbit: use with care. Runs local shell scripts; telemetry and script-emitted agent directives
- **Installs:** 1
- **Last updated:** 2026-11-25
- **Page:** https://orbitinbox.app/s/document-generation-from-scratch

## Skill

---
name: document-generate
description: Use when documenting code: generates missing Diataxis docs (tutorial, how-to, reference, explanation) for a feature, module, or project.
---

# Document Generate: Diataxis Documentation Writer

## What this does
Researches the code thoroughly, then writes structured documentation from scratch using the Diataxis framework: Tutorial (learning-oriented), How-to (task-oriented), Reference (information-oriented), Explanation (understanding-oriented). Philosophy: research the whole, then write the parts.

## When to use
- "write docs for this", "generate documentation", "document this feature", "create a tutorial", "write a how-to", "explain this module", "docs for this project"
- A coverage check found undocumented features and you need to fill the gaps.

## How to run it

1. **Scope and intent.** Decide the target: a specific feature/module/file, the whole project, or listed gaps. Ask the user where docs should go: (A) inline in existing files (README, ARCHITECTURE), (B) standalone files such as `docs/`, or (C) both. Recommend C: inline summaries for discoverability plus deep docs in standalone files. Follow existing conventions: if `docs/` exists or a doc framework is used (Nextra, Docusaurus, MkDocs, VitePress), match it; otherwise plain Markdown in `docs/`.

2. **Codebase archaeology (most important step).**
   - Map the structure, excluding `.git`, `node_modules`, `dist`, `build`, `.next`.
   - Read entry points: README, ARCHITECTURE, CONTRIBUTING, CLAUDE.md/AGENTS.md, package manifest (package.json, Cargo.toml, pyproject.toml, go.mod), main entry files, config examples.
   - For each target, read implementation end-to-end, the tests (they reveal intended behavior and edge cases), related modules, and comments like NOTE/DESIGN/WHY.
   - Build an internal concept map: Target, Purpose (one sentence), Key concepts (3-5), Public surface, Dependencies, Dependents, Edge cases, Design decisions.
   - Report: "Researched N files, identified K public surface items, M concepts, J design decisions."

3. **Partition by quadrant.** Not every entity needs all four:
   - New user-facing feature: tutorial, how-to, reference, maybe explanation
   - CLI command/flag: how-to, reference
   - Internal module/architecture: reference, explanation
   - Config option: how-to, reference
   - Design pattern/philosophy: explanation only
   - API endpoint: how-to, reference, maybe tutorial
   - Multi-step workflow: tutorial, how-to, maybe explanation
   Show the plan as a table. If more than 5 documents, confirm with the user first.

4. **Write reference docs first** (they establish vocabulary), then how-tos and tutorials, then explanations. Accuracy over elegance: every claim must trace to code. Include types, defaults, and constraints (e.g. "string, max 256 chars, matches `^[a-z-]+$`", not "accepts a string"). Use real, runnable examples.

## Reference doc template

markdown
# {Entity Name}

{One paragraph: what it is, what it does, when you'd use it.}

## API / Interface
{Complete public surface: functions, commands, config options, parameters, with types, defaults, constraints.}

## Options / Configuration
{Every option with type, default, and effect, if applicable.}

## Examples
{2-3 concrete examples with real command output or code that would run.}

## Related
{Links to other reference docs, how-tos, or explanations.}


## Output
New documentation files (and inline summaries if chosen) in the agreed location, plus a short list of what was written per quadrant and any gaps you could not verify from the code.

Credit: Based on public content by garrytan, packaged by Orbit.

Shared by Mariah Brunner, credited on Orbit.