This skill writes clear, runnable documentation in docs/ using the Eight Rules and Diataxis to ensure discoverable, linked, and up-to-date content.
npx playbooks add skill nilecui/skillsbase --skill documentation-writing
Creates high-quality, discoverable documentation following the Eight Rules and Diataxis framework. Ensures all docs are properly located, linked, and contain real runnable examples.
I load automatically when you mention:
docs/ directoryNever put in docs/:
Where temporal info belongs:
# [Feature Name]
Brief one-sentence description of what this is.
## Quick Start
Minimal steps to get started (3-5 steps max).
## Contents
- [Configuration](#configuration)
- [Usage](#usage)
- [Troubleshooting](#troubleshooting)
## Configuration
Step-by-step setup with real examples.
## Usage
Common use cases with runnable code.
## Troubleshooting
Common problems and solutions.
| Type | Purpose | Location | User Question |
| ----------- | ------------- | ----------------- | ----------------------- |
| Tutorial | Learning | docs/tutorials/ | "Teach me how" |
| How-To | Doing | docs/howto/ | "Help me do X" |
| Reference | Information | docs/reference/ | "What are the options?" |
| Explanation | Understanding | docs/concepts/ | "Why is it this way?" |
Ask: What is the reader trying to accomplish?
docs/
├── tutorials/ # Learning-oriented
├── howto/ # Task-oriented
├── reference/ # Information-oriented
├── concepts/ # Understanding-oriented
└── index.md # Links to all docs
Every concept needs a runnable example:
# Example: Analyze file complexity
from amplihack import analyze
result = analyze("src/main.py")
print(f"Complexity: {result.score}")
# Output: Complexity: 12.5
Add entry to docs/index.md:
- [New Feature Guide](./howto/new-feature.md) - How to configure X
Checklist before completion:
docs/ directoryreference.md - Read when you need:
examples.md - Read when you need:
| Anti-Pattern | Why It's Bad | Better Approach |
| ------------------ | ------------- | ------------------------------ |
| "Click here" links | No context | "See [auth config](./auth.md)" |
| foo/bar examples | Not realistic | Use real project code |
| Wall of text | Hard to scan | Use headings and bullets |
| Orphan docs | Never found | Link from index |
| Status in docs | Gets stale | Use Issues/PRs |
When writing documentation BEFORE implementation (document-driven development):
# [PLANNED - Implementation Pending]
This document describes the intended behavior of Feature X.
## Planned Interface
def future_function(input: str) -> Result:
"""Process input and return result."""
pass
Once implemented, remove the [PLANNED] markers and update with real examples.
---
**Full reference**: See [reference.md](./reference.md) for complete specification.
**Templates**: See [examples.md](./examples.md) for copy-paste templates.Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.