Skip to main content
skill CX Codex

documentation-engineer — Claude Code skill: README, API docs, comments

A skill for writing technical documentation: READMEs, API references, code comments and architecture notes. Useful when the codebase has grown but the docs have not.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add zhaono1/agent-playbook --skill documentation-engineer -a claude-code
Open on GitHub

What documentation-engineer does

The skill activates when you ask it to write documentation, create a README or document code. From there it follows templates: a README structure running from project description to license, an endpoint and function format covering parameters, return values and errors, rules for code comments, and an architecture outline with data flow and trade-offs.

Two Python scripts ship with it. scripts/generate_docs.py builds a documentation skeleton from a service name, and scripts/validate_docs.py checks a finished file. Reference files cover the README template, the API template and a style guide. Python 3 is required, since both scripts run through python3.

One rule stands out: comment on why, not what. A line like count = 0 explained as a reset for a new measurement cycle tells the reader more than a restatement of the assignment. The skill is set up for Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode, so the same templates carry across editors.

What it helps with

  • build a README with a quick start and install sections
  • document API endpoints with request and response schemas
  • rewrite code comments so they explain the reason behind a line
  • generate a documentation skeleton for a new service
  • check a finished doc file for missing sections

Example prompts for the agent

  • write a README for this project
  • document the public functions in src/api.ts
  • generate the docs structure for the billing service

How to install documentation-engineer

1Skills CLI (Vercel)

npx skills add zhaono1/agent-playbook --skill documentation-engineer -a claude-code

2Manually: put the files in place

~/.claude/skills/documentation-engineer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/documentation-engineer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about documentation-engineer

How do I install documentation-engineer in Claude?

Run npx skills add zhaono1/agent-playbook --skill documentation-engineer -a claude-code. The skill lands in ~/.claude/skills/documentation-engineer/SKILL.md.

What does documentation-engineer do?

It helps write READMEs, API documentation, code comments and architecture descriptions. Inside are templates, checklists and two Python scripts for generating and validating docs.

Which tools can the skill use?

The allowed-tools list covers Read, Write, Edit, Grep, Glob, WebFetch and WebSearch, so it can read code, edit files and search the web.

Source text

SKILL.md · MIT
---
name: documentation-engineer
description: Technical documentation expert for creating clear, comprehensive documentation. Use when user asks to write docs, create README, or document code.
allowed-tools: Read, Write, Edit, Grep, Glob, WebFetch, WebSearch
metadata:
  hooks:
    after_complete:
      - trigger: session-logger
        mode: auto
        reason: "Log documentation activity"
---

# Documentation Engineer

Expert in creating clear, comprehensive, and maintainable technical documentation.

## When This Skill Activates

Activates when you:
- Ask to write documentation
- Request README creation
- Mention "docs" or "document this"
- Need API documentation

## Documentation Types

### 1. README
Every project should have a README with:

```markdown
# Project Name

Brief description (what it does, why it exists)

## Quick Start

Installation and usage in 3 steps or less.

## Installation

Detailed installation instructions.

## Usage

Examples of common usage patterns.

## Configuration

Environment variables and configuration options.

## Development

How to run tests, build, and develop locally.

## Contributing

Guidelines for contributors.

## License

License information.
```

### 2. API Documentation

For each endpoint/function:

- **Description**: What it does
- **Parameters**: Name, type, required/optional, description
- **Return value**: Type and structure
- **Errors**: Possible errors and conditions
- **Examples**: Usage examples

### 3. Code Comments

Comment **why**, not **what**:

```typescript
// Bad: Sets the count to zero
count = 0;

// Good: Reset count for new measurement cycle
count = 0;

// Bad: Check if user is admin
if (user.role === 'admin') {

// Good: Only admins can bypass approval workflow
if (user.role === 'admin') {
```

### 4. Architecture Documentation

- System overview
- Component relationships
- Data flow
- Design decisions
- Trade-offs considered

## Documentation Principles

1. **Be Clear**: Use simple, direct language
2. **Be Concise**: Respect the reader's time
3. **Be Accurate**: Keep docs in sync with code
4. **Be Complete**: Cover all public interfaces
5. **Be Current**: Update docs when code changes

## Writing Guidelines

### Headings
- Use sentence case for headings
- Start with a verb or noun
- Be descriptive

### Code Examples
- Show before/after when appropriate
- Include import statements
- Show expected output
- Handle edge cases

### Links
- Use relative links for internal docs
- Include anchors for sections
- Test that links work

### Diagrams
- Use Mermaid for flowcharts and sequences
- Keep diagrams simple
- Add a title and legend

## Documentation Checklist

### README
- [ ] Project description
- [ ] Quick start guide
- [ ] Installation instructions
- [ ] Usage examples
- [ ] Configuration guide
- [ ] Contributing guidelines

### Code Docs
- [ ] All public functions documented
- [ ] Parameters and returns documented
- [ ] Examples provided for complex functions
- [ ] Edge cases documented

### API Docs
- [ ] All endpoints documented
- [ ] Request/response schemas
- [ ] Authentication requirements
- [ ] Error responses documented
- [ ] Rate limits documented

## Scripts

Generate documentation structure:
```bash
python3 scripts/generate_docs.py --name <service-name> --output docs/README.md
```

Validate documentation:
```bash
python3 scripts/validate_docs.py --input docs/README.md
```

## References

- `references/readme-template.md` - README template
- `references/api-template.md` - API documentation template
- `references/style-guide.md` - Documentation style guide

© zhaono1 · MIT · zhaono1/agent-playbook

Similar skills

Everything for Writing and docs →

From the same set21

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor