// Technical documentation, API references, user guides, maintaining documentation quality. Use for documentation, docs, user-docs, api-docs, guide, readme tags. Provides documentation patterns, validation, clarity standards.
| name | Documentation Implementation |
| description | Technical documentation, API references, user guides, maintaining documentation quality. Use for documentation, docs, user-docs, api-docs, guide, readme tags. Provides documentation patterns, validation, clarity standards. |
| allowed-tools | Read, Write, Edit, Grep, Glob |
Domain-specific guidance for creating clear, comprehensive technical documentation.
Load this Skill when task has tags:
documentation, docs, user-docs, api-docsguide, readme, tutorial, reference# Markdown linting
npx markdownlint **/*.md
# Spell check
npx cspell "**/*.md"
# Link checking
npx markdown-link-check docs/**/*.md
# Build documentation site (if applicable)
npm run docs:build
mkdocs build
# Live preview
npm run docs:serve
mkdocs serve
# Static site preview
python -m http.server 8000 -d docs/
โ Documentation is accurate (reflects actual behavior) โ Documentation is complete (all required sections present) โ Examples work (code examples run without errors) โ Links are valid (no broken links) โ Spelling and grammar correct โ Follows project style guide
## POST /api/users
Creates a new user account.
**Authentication:** Required (Bearer token)
**Request Body:**
```json
{
"email": "user@example.com", // Required, must be valid email
"password": "secure123", // Required, min 8 characters
"name": "John Doe" // Required
}
Success Response (201 Created):
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "user@example.com",
"name": "John Doe",
"createdAt": "2024-01-15T10:30:00Z"
}
Error Responses:
400 Bad Request - Invalid input
{
"error": "Invalid email format",
"code": "VALIDATION_ERROR"
}
409 Conflict - Email already exists
{
"error": "Email already registered",
"code": "DUPLICATE_EMAIL"
}
Example Request:
curl -X POST https://api.example.com/api/users \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "secure123",
"name": "John Doe"
}'
### User Guide Pattern
```markdown
# Setting Up User Authentication
This guide walks you through enabling user authentication in your application.
## Prerequisites
- Node.js 18+ installed
- Database configured
- Admin access to the application
## Step 1: Install Required Packages
```bash
npm install bcrypt jsonwebtoken express-session
Create a .env file in your project root:
JWT_SECRET=your-secret-key-here
SESSION_TIMEOUT=3600
Edit config/app.js and add:
const authMiddleware = require('./middleware/auth');
app.use(authMiddleware);
npm startProblem: Login fails with "Invalid credentials"
Solution: Check that you've run database migrations: npm run migrate
Problem: Session expires immediately
Solution: Verify JWT_SECRET is set in .env file
### Code Documentation Pattern
```kotlin
/**
* Creates a new user account with the provided information.
*
* This function validates the user data, hashes the password using bcrypt,
* and persists the user to the database. Email uniqueness is enforced at
* the database level.
*
* @param email User's email address (must be valid format and unique)
* @param password Plain text password (min 8 characters, will be hashed)
* @param name User's full name
* @return Created user with generated ID and timestamps
* @throws ValidationException if email format is invalid or password too short
* @throws DuplicateEmailException if email already registered
* @throws DatabaseException if database operation fails
*
* @example
* ```kotlin
* val user = userService.createUser(
* email = "john@example.com",
* password = "secure123",
* name = "John Doe"
* )
* println(user.id) // UUID generated by database
* ```
*
* @see User
* @see validateEmail
* @see hashPassword
*/
fun createUser(email: String, password: String, name: String): User {
// Implementation
}
Issue: Cannot document features that don't exist yet
What to try:
If blocked: Report to orchestrator - implementation incomplete or requirements unclear
Issue: Don't know what endpoint does, what parameters mean, or what responses look like
What to try:
If blocked: Report to orchestrator - need clarification on API behavior
Issue: User guide needs screenshots but UI not implemented or accessible
What to try:
If blocked: Report to orchestrator - need access to UI or design assets
Issue: Code does X, requirements say Y, existing docs say Z
What to try:
If blocked: Report to orchestrator - need authoritative answer on correct behavior
Issue: Don't know how something works internally to document it
What to try:
If blocked: Report to orchestrator - need technical details from implementer
โ ๏ธ BLOCKED - Requires Senior Engineer
Issue: [Specific problem - implementation incomplete, unclear behavior, etc.]
Attempted Research:
- [What sources you checked]
- [What you tried to find out]
- [Why it didn't work]
Blocked By: [Task ID / incomplete implementation / unclear requirements]
Partial Progress: [What documentation you DID complete]
Requires: [What needs to happen to unblock documentation]
โ Uses simple, clear language โ Defines technical terms on first use โ Short sentences (< 25 words) โ Active voice ("Click the button" not "The button should be clicked") โ Consistent terminology (don't switch between "user" and "account")
โ All required sections present โ All parameters documented โ All status codes explained โ Edge cases covered โ Examples provided โ Troubleshooting section included
โ Code examples run without errors โ Screenshots match current UI โ API responses match actual responses โ Links work (no 404s) โ Version numbers correct
โ Consistent heading levels โ Code blocks have language specified โ Lists use consistent bullet style โ Tables formatted correctly โ Proper markdown syntax
โ Passive: "The user object is returned by the API" โ Active: "The API returns the user object"
โ Vague: "Call the endpoint with the data" โ Specific: "Send a POST request to /api/users with email, password, and name"
โ Abstract: "Configure the authentication settings" โ Concrete:
Edit config/auth.js and set:
```javascript
module.exports = {
jwtSecret: 'your-secret-here',
tokenExpiry: '24h'
};
### Include Examples
Every documented feature should have:
- Code example showing usage
- Expected output
- Common use cases
### Anticipate Questions
After each instruction, ask:
- What could go wrong here?
- What might be unclear?
- What would I wonder about?
Add troubleshooting for those questions.
## Common Patterns to Follow
1. **Start with overview** - what it is, why it matters
2. **Prerequisites first** - what user needs before starting
3. **Step-by-step instructions** - numbered, one action per step
4. **Examples that work** - test all code examples
5. **Troubleshooting section** - common problems and solutions
6. **Clear formatting** - headings, code blocks, lists
7. **Links to related docs** - help users find more information
## What NOT to Do
โ Don't use jargon without explaining it
โ Don't assume prior knowledge
โ Don't skip error cases
โ Don't provide untested code examples
โ Don't use vague terms ("simply", "just", "obviously")
โ Don't forget to update docs when code changes
โ Don't document implementation details users don't need
## Focus Areas
When reading task sections, prioritize:
- `requirements` - What needs documenting
- `context` - Purpose and audience
- `documentation` - Existing docs to update
- `implementation` - How it actually works
## Remember
- **Accuracy is critical** - test everything you document
- **Clarity over cleverness** - simple language wins
- **Examples are essential** - every feature needs working examples
- **Update, don't duplicate** - check if docs already exist
- **Test your instructions** - follow them yourself
- **Report blockers promptly** - missing information, incomplete features
- **Users read docs when stuck** - be helpful and thorough
## Additional Resources
For deeper patterns and examples, see:
- **PATTERNS.md** - Advanced documentation patterns, style guides (load if needed)
- **BLOCKERS.md** - Detailed documentation-specific blockers (load if stuck)
- **examples.md** - Complete documentation examples (load if uncertain)