enitrat/skill-issue

sdk-documentation

Rules and patterns for writing comprehensive, high-quality SDK documentation for public libraries.

Ver código fuente

Cómo usar

  1. Copia el comando y revisa el paquete antes de instalarlo en tu entorno de agente.
  2. Consulta las herramientas, credenciales y entornos necesarios en el documento original.
  3. Describe las entradas y el resultado deseado; contrasta la salida con las fuentes.
npx skills add https://github.com/enitrat/skill-issue --skill sdk-documentation

Antes de empezar

  • La instalación no incluye suscripción al modelo, cuota API ni permisos sobre tus archivos.
  • Las estrellas e instalaciones reflejan actividad, no una prueba independiente de calidad o seguridad.
Documento original del Skill

Contenido del repositorio de origen con títulos, ejemplos, código, tablas, enlaces e imágenes preservados.

SDK Documentation Best Practices

Rules for writing clear, scannable, code-forward documentation for public SDKs. 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.

Documentation Type Router

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.

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

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
Code examplesComplete runnable files with focus annotationsPartial 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
WarningsUse a warning admonition for critical info (see your framework's syntax)Inline bold warnings in prose

Detailed Guidance by Topic

  • Documentation structure: See references/structure.md for site architecture, page templates, navigation, 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, cross-referencing
  • VitePress setup: See references/vitepress.md for project init, config, markdown extensions, twoslash, code groups, shared includes
  • GitBook setup: See references/gitbook.md for Git Sync, content blocks, steppers, OpenAPI integration, reusable content
del mismo repositorio

Más Skills

Todos los Skills