Skip to main content

Documentation Creator Skill

Creates documentation by understanding context first, then writing in the correct voice for the target audience.

Trigger

  • /docs <topic> [--site engineering|product|public|support]
  • "Document the X feature"
  • "Add docs for Y API"
  • "Create documentation about Z"

Execution Flow

1. Capture Intent

Extract from user input:

  • Topic — what to document
  • Site hint — explicit --site flag or inferred from context

2. Investigate Existing Docs

Search docs/ repository for:

  • Duplicates — same/similar topic already documented
  • Related docs — should be referenced or extended
  • Gaps — what's missing in current coverage
  • Location patterns — where similar content lives

Search across engineering/, product/, public/, support/.

3. Clarify with User

Use AskUserQuestion to gather what's not yet clear:

  • Audience → determines site (if not specified via --site)
  • Doc type → Reference, Guide, Overview, Troubleshooting
  • Relationship to existing docs found in step 2
  • Domain/Project if not obvious from context

Questions should be informed by step 2 findings.

4. Read the Site's CLAUDE.md

This step is mandatory. Before writing anything, read the target site's writing rules:

SiteCLAUDE.md Path
Engineeringdocs/engineering/CLAUDE.md
Productdocs/product/CLAUDE.md
Publicdocs/public/CLAUDE.md
Support(no CLAUDE.md — use plain, helpful language for end users)

Each CLAUDE.md defines audience, voice, structure, terminology, and examples specific to that site. Follow them exactly.

Quick Voice Reference

SitePersonVoiceFocus
Engineering3rd personTechnical, preciseHow it works, architecture, debugging
Product1st plural ("we", "our system")Business-aware, clearUser value, features, workflows
Public2nd person ("you", "your")Developer-friendly, step-by-stepIntegration, API usage, examples
Support2nd person ("you")Simple, helpfulHow-to for end users

5. Determine Location

Use docs-nav skill reference for:

  • Site selection by audience
  • Domain folder mapping
  • Directory structure
Content TypeSitePath
API internals, architectureEngineeringengineering/docs/
Project-specific tech docsEngineeringengineering/projects/{Project}/
Database queriesEngineeringengineering/docs/Query Library/
Feature specs, user flowsProductproduct/docs/
Customer use casesProductproduct/docs/Tenants/
Public API endpointsPublicpublic/docs/Rest_API/
Integration guidesPublicpublic/docs/Integrations/
Customer helpSupportsupport/docs/

6. Create Document

Generate file with:

  • Frontmatter — id, slug, title, sidebar_label, sidebar_position, author, tags
  • Structure matching doc type (see below)
  • Links to related docs found in step 2
  • Tags — minimum 3 from site's docs/tags.yml
  • Writing style — per site's CLAUDE.md rules read in step 4

Frontmatter Template

---
id: filename_in_snake_case
slug: filename_in_snake_case
title: Document Title
sidebar_label: Docs Creator
sidebar_position: 1
author: Team Name
tags: [category, subcategory, type]
---

Doc Type Structures

TypeStructure
ReferenceOverview → Sections → Related docs
GuidePrerequisites → Steps → Next steps
OverviewIntroduction → How it works → Key concepts
TroubleshootingProblem → Cause → Solution
  • Same docs plugin: [text](./folder/file.md)
  • Cross-plugin: [text](../projects/farfalla/overview) (no .md)

7. Validate & Report

cd docs && npm run validate

Report:

## Documentation Created

**File:** {path/to/doc.md}
**Site:** {site}
**Type:** {doc_type}

### Related Docs Found
- {existing related docs}

### Next Steps
1. Review and edit content
2. Preview: `npm run start:{site}`
3. Commit when ready