enitrat/skill-issue

vocs-documentation

Rules and patterns for writing comprehensive, high-quality SDK documentation for public libraries on Vocs (vocs.dev).

Zobacz źródło

Jak używać

  1. Skopiuj polecenie instalacji i sprawdź źródła przed instalacją we własnym środowisku agenta.
  2. W oryginale sprawdź wymagane narzędzia, dane dostępowe i obsługiwane środowiska.
  3. Opisz dane wejściowe i oczekiwany rezultat; porównaj wynik ze źródłami.
npx skills add https://github.com/enitrat/skill-issue --skill vocs-documentation

Przed rozpoczęciem

  • Instalacja nie obejmuje subskrypcji modelu, limitu API ani uprawnień do plików.
  • Gwiazdki i instalacje pokazują aktywność, a nie niezależny test jakości lub bezpieczeństwa.
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

SDK Documentation Best Practices (Vocs)

Rules for writing clear, scannable, code-forward documentation for public SDKs, targeting Vocs as the documentation framework. Derived from analysis of best-in-class SDK documentation (wagmi, viem, TanStack). Rules are domain-agnostic; examples use generic SDK patterns with occasional web3 illustrations.

Two Audiences, One Source

Vocs ships every page twice: rendered HTML for humans, raw Markdown for agents (.md routes, llms.txt, llms-full.txt, MCP). You do not write two versions — you write Markdown that is good enough to survive both surfaces. Everything below serves that goal, and it changes three habits:

  • Structure is machine-readable. Task-based headings, one topic per page, and a real

description are what a retriever matches on. A page called "Overview" with three unrelated sections is worse in llms.txt than three focused pages.

  • Prose density is a token cost. Padding that a human skims past is context an agent spends

budget on. Terse fragments beat full sentences in reference material.

  • Interactive components must degrade. Any custom MDX component in a page needs a toMarkdown

hook, or it reaches agents as an opaque JSX tag. Run vocs markdown-audit to catch these.

See references/agent-readable-docs.md for the mechanics.

Documentation Type Router

The four types come from Diátaxis: a craft has exactly two dimensions — action vs cognition, and acquisition (study) vs application (work) — so there are exactly four kinds of documentation, one per quadrant. When a page resists classification, use the compass: ask does this inform action or cognition? and does it serve the user's study or their work?

Informs…Serves…Type
actionstudyTutorial
actionworkHow-to Guide
cognitionworkReference
cognitionstudyExplanation

Before writing, identify which type of page you're creating. Each type has different rules.

Question you're answeringDoc typeTemplateKey rule
"Help me learn this SDK"Tutorial (Getting Started)guides.md → TutorialsLearning-oriented: guide the reader, eliminate choices, show destination early
"Help me accomplish X"How-to Guide (Task Guide)guides.md → How-to GuidesTask-oriented: assume competence, action-only, address real-world complexity
"What does X do / accept / return?"API Referenceapi-reference.mdInformation-oriented: describe only, zero explanation, mirror product structure
"Why does X work this way?"Explanation (Concept/Why page)tone.md → Explanation PagesUnderstanding-oriented: provide context, make connections, admit tradeoffs

The cardinal sin is mixing types. A tutorial that stops to explain architecture loses the learner. A reference page that teaches loses the practitioner looking up a parameter. An explanation page that includes step-by-step instructions belongs in a how-to guide. Blur happens between map neighbors — the most common conflation in software docs is tutorial ↔ how-to guide; the subtlest is reference examples growing into explanation. The axis separating tutorial from how-to is study vs work, never basic vs advanced. See references/diataxis.md for the boundary tests, per-type ground truths, and workflow guidance (guide, not plan — never scaffold four empty sections; improve one small thing at a time and let structure emerge).

Core Philosophy

PrincipleMeaning
Code is the starProse exists to introduce, contextualize, and connect code examples
Scannable over narrativeReaders skim for answers; structure for rapid lookup
Show, don't tellDiff annotations and working examples beat explanations
One concept per stepNever introduce multiple ideas simultaneously
Full files, not snippetsEvery code block should be runnable in isolation
Template rigidlyPredictable structure is a feature, not a limitation
Retrievable by defaultA page an agent can't find or parse is a page that doesn't exist

Quick Reference: Critical Rules

CategoryDODON'T
Voice"you" for concepts, "we" for tutorialsPassive voice
ToneProfessional-casual, confidentHumorous, condescending, or stiff
Sentences10-25 words, active voice35+ word run-on sentences
Headings# Title [Subtext] on every page; task-based ##Vague headings like "Overview", "Notes"
Frontmattertitle + description (feeds llms.txt)Tags, categories, sidebar metadata
Code examplesComplete runnable files with // [!code focus]Partial snippets missing context
ParametersOne ### heading per param with full exampleTables or lists of parameters
Optional paramsIndicate via `\undefined` in type"Optional" badges or markers
JargonSDK-specific terms explained; ecosystem terms assumedOver-explaining industry basics
SectionsRigid ordering: Import → Usage → Parameters → Return TypeFreeform section ordering
Cross-refsLink to related APIs inline and in dedicated sections"See also" dump at bottom
Warnings:::warning callout directiveInline bold warnings in prose
NavigationUpdate vocs.config.ts sidebar in the same change as the pageOrphan pages reachable only by URL
Verificationvocs build after every docs changeShipping unbuilt MDX

Detailed Guidance by Topic

  • Diátaxis ground truths: See references/diataxis.md for the compass, type-boundary tests (tutorial vs how-to, reference vs explanation), per-type principles sourced from diataxis.fr, iterative workflow, and structure at scale
  • Documentation structure: See references/structure.md for site architecture, page templates, navigation config, shared content systems
  • Narrative tone & explanation pages: See references/tone.md for voice, style, sentence patterns, jargon handling, and explanation/concept page guidance
  • Tutorials & how-to guides: See references/guides.md for tutorial rules (learning-oriented), how-to guide rules (task-oriented), progressive disclosure, framework variants
  • API references: See references/api-reference.md for parameter docs, return types, TypeScript presentation, OpenAPI, cross-referencing
  • Vocs setup & syntax: See references/vocs.md for project init, config, markdown extensions, code annotations, twoslash, snippets, layouts
  • Agent-readable docs: See references/agent-readable-docs.md for llms.txt, Markdown routes, MCP server, toMarkdown, markdown-audit, search priority
z tego samego repozytorium

Więcej Skills

Wszystkie Skills