enitrat/skill-issue

sdk-documentation

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

Ver código-fonte

Como usar

  1. Copie o comando e verifique o pacote antes de instalar no seu ambiente de agente.
  2. Consulte no original as ferramentas, credenciais e ambientes necessários.
  3. Descreva os dados de entrada e a entrega esperada; confira a saída com as fontes.
npx skills add https://github.com/enitrat/skill-issue --skill sdk-documentation

Antes de começar

  • A instalação não inclui assinatura de modelo, franquia API ou acesso aos seus arquivos.
  • Estrelas e instalações indicam atividade, não um teste independente de qualidade ou segurança.
Documento original do Skill

Renderizado do repositório de origem, preservando títulos, exemplos, código, tabelas, links e imagens.

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
do mesmo repositório

Mais Skills

Todos os Skills