home / skills / lookatitude / beluga-ai / doc-writing
This skill assists you write Go package docs and tutorials with structured patterns, examples, and clear guidance for Beluga AI v2.
npx playbooks add skill lookatitude/beluga-ai --skill doc-writingReview the files below or copy the command above to add this skill to your agents.
---
name: doc-writing
description: Documentation writing patterns for Beluga AI v2. Use when creating package docs, tutorials, API guides, or teaching-oriented content.
---
# Documentation Patterns
## Package Doc Structure
1. **Header**: One paragraph — what it does, who uses it, why.
2. **Quick Start**: Minimal working example (3-10 lines), full imports, compiles.
3. **Core Interface**: Go interface definition.
4. **Usage Examples**: Basic, with middleware, with hooks, custom implementation.
5. **Configuration**: All `WithX()` options with defaults.
6. **Extension Guide**: Implement interface → register via init() → map errors → write tests.
## Rules
- Every concept needs a code example.
- Examples must compile with full import paths (`github.com/lookatitude/beluga-ai/...`).
- Handle errors explicitly — never `_` for error returns.
- No marketing language, filler words, or emojis.
- Professional, active voice, present tense, imperative for instructions.
- Cross-reference related packages and `docs/`.
- Use mermaid diagrams sparingly (< 15 nodes).
- Tutorials: progressive complexity (basic 5min, intermediate 10min, advanced 15min).
## Don'ts
- No phase references or timeline language.
- Don't duplicate architecture docs — link to them.
- Don't list every provider — point to `docs/providers.md`.
- Don't show incomplete examples that won't compile.
This skill provides documentation-writing patterns and a reproducible structure for Beluga AI v2 packages. It codifies headers, quick-starts, interfaces, examples, configuration, and extension guidance so authors produce consistent, compile-ready Go docs. Use it when creating package docs, tutorials, API guides, or teaching-oriented content.
The skill inspects the target package surface and enforces a standard doc layout: header, minimal working example, core interface, usage examples, configuration options, and an extension guide. It validates that every concept includes a complete, compilable code snippet with full import paths, explicit error handling, and cross-references to related docs. It flags marketing language, filler text, and incomplete examples.
Must every example compile?
Yes. Provide full import paths and explicit error handling; do not use blank identifier for errors.
Where to list providers?
Point readers to docs/providers.md rather than enumerating providers in each package doc.