| name | documentation-writer |
| description | Write clear technical documentation including READMEs, API docs, architecture guides, and inline documentation. Use when creating or improving project documentation. |
| allowed-tools | ["Read","Grep","Glob","Bash","Write","Edit"] |
| tags | ["documentation","readme","api-docs","technical-writing","jsdoc","docstrings","guides"] |
| platforms | ["Claude","ChatGPT","Gemini"] |
| author | locusai |
Documentation Writer
When to use this skill
- Writing or improving a README
- Documenting API endpoints
- Creating architecture or design docs
- Writing setup/installation guides
- Adding JSDoc/docstrings to code
- Creating migration guides for breaking changes
README structure
A good README answers: What is this? How do I use it? How do I contribute?
# Project Name
Brief description (1-2 sentences). What does it do and who is it for?
## Quick Start
\`\`\`bash
npm install project-name
\`\`\`
\`\`\`typescript
import { something } from 'project-name';
const result = something('hello');
\`\`\`
## Features
- Feature one — brief explanation
- Feature two — brief explanation
- Feature three — brief explanation
## Installation
\`\`\`bash
# npm
npm install project-name
# yarn
yarn add project-name
\`\`\`
### Prerequisites
- Node.js >= 18
- PostgreSQL >= 14
## Usage
### Basic usage
[Code example with explanation]
### Configuration
[Configuration options with defaults]
### Advanced usage
[More complex examples]
## API Reference
### `functionName(param1, param2)`
Description of what the function does.
**Parameters:**
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `param1` | `string` | — | Description |
| `param2` | `number` | `10` | Description |
**Returns:** `Promise<Result>` — Description
**Example:**
\`\`\`typescript
const result = await functionName('hello', 5);
\`\`\`
## Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `DATABASE_URL` | Yes | — | PostgreSQL connection string |
| `PORT` | No | `3000` | Server port |
| `LOG_LEVEL` | No | `info` | Logging level |
## Development
\`\`\`bash
git clone https://github.com/org/repo.git
cd repo
npm install
npm run dev
\`\`\`
### Running tests
\`\`\`bash
npm test
npm run test:coverage
\`\`\`
## Contributing
[Brief contribution guidelines or link to CONTRIBUTING.md]
## License
[License type] — see [LICENSE](LICENSE)
API documentation
OpenAPI / Swagger
paths:
/users:
post:
summary: Create a new user
tags: [Users]
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [name, email]
properties:
name:
type: string
example: "Alice"
email:
type: string
format: email
responses:
'201':
description: User created
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'400':
description: Validation error
Inline API docs (JSDoc)
async function createUser(input: CreateUserInput): Promise<User> {
Python docstrings
def create_user(name: str, email: str) -> User:
"""Create a new user account.
Args:
name: The user's display name (1-100 characters).
email: A valid email address. Must be unique.
Returns:
The created User object with generated ID.
Raises:
ValidationError: If name or email is invalid.
ConflictError: If email already exists.
Example:
>>> user = create_user("Alice", "alice@example.com")
>>> print(user.id)
'usr_abc123'
"""
Documentation principles
- Write for your audience: Beginner guide ≠ API reference
- Start with examples: Show, then explain
- Keep it current: Outdated docs are worse than no docs
- Be concise: Short paragraphs, bullet points, tables
- Use code blocks: Always specify the language for syntax highlighting
- Document the why: Comments explain why, not what
When to add inline comments
const cutoffHour = 14;
setTimeout(() => scrollToBottom(), 0);
let count = 0;
for (const user of users) { ... }
Checklist