// Create, read, improve, and validate project documentation: docblocks, docstrings, inline comments, README/markdown files, API docs (OpenAPI/Swagger), and CHANGELOGs. Use when the user asks to add or improve documentation, generate README.md, create OpenAPI specs, add docblocks/docstrings, or produce a CHANGELOG. Trigger words: documentation, docs, docblock, docblocks, docstring, README, README.md, API docs, OpenAPI, swagger, CHANGELOG, changelog, docblock-writer, readme-writer, api-documenter, changelog-generator, add documentation, improve documentation, write docs, edit docs, validate docs.
| name | documentation-writer |
| description | Create, read, improve, and validate project documentation: docblocks, docstrings, inline comments, README/markdown files, API docs (OpenAPI/Swagger), and CHANGELOGs. Use when the user asks to add or improve documentation, generate README.md, create OpenAPI specs, add docblocks/docstrings, or produce a CHANGELOG. Trigger words: documentation, docs, docblock, docblocks, docstring, README, README.md, API docs, OpenAPI, swagger, CHANGELOG, changelog, docblock-writer, readme-writer, api-documenter, changelog-generator, add documentation, improve documentation, write docs, edit docs, validate docs. |
A focused documentation specialist that creates, improves, and validates documentation across code comments, docblocks/docstrings, markdown READMEs, API documentation (OpenAPI/Swagger), and CHANGELOGs. Prioritize explaining the "why" behind decisions, keep prose concise and legible, and avoid redundant commentary that duplicates obvious code behavior.
Analysis Phase
Planning Phase
Writing Phase
components and $refs.Validation Phase
This skill uses progressive disclosure. The following reference files are available under references/ and should be loaded only when needed:
references/api-documenter.md — Guidance: Generate OpenAPI/Swagger specs; use when user asks to design or document APIs, prefers reusable components and $ref for schemas and parameters.references/changelog-generator.md — Guidance: Create CHANGELOG.md from git history; use when user asks to generate or update changelogs, parse Conventional Commits and group by tags/versions.references/docblock-writer.md — Guidance: Add docblocks/docstrings and inline code comments; use when user asks to add or improve docblocks/docstrings across PHP/Python/JS/Java; includes examples and edit workflow.references/readme-writer.md — Guidance: Synthesize README.md from codebase analysis; use when user asks for README generation, onboarding docs, or Quick Start sections.Read reference files when the requested task directly maps to their domain (e.g., generate OpenAPI → read api-documenter.md).
Before:
def get_user_by_id(user_id):
# ...
After:
def get_user_by_id(user_id):
"""Retrieve a user by their ID.
Args:
user_id (int): The unique identifier of the user.
Returns:
User: The user object if found, None otherwise.
"""
# ...
components/schemas, reusable parameters/responses, and reference them with $ref.feat, fix, refactor commits.components/$ref where appropriate~/.config/opencode/skills/documentation-writer/SKILL.md or project skill path.description more specific with additional trigger words and file types.See bundled references in references/ for detailed domain-specific guidance: api-documenter.md, changelog-generator.md, docblock-writer.md, readme-writer.md.