ported/20260304-102613/dev-tools/skills/docs-writer/SKILL.md
Generates MkDocs-flavored or standard GitHub-flavored Markdown documentation from codebase analysis findings including API references, architecture guides, standalone markdown files, and change summaries (converted from agent)
npx skillsauth add sequenzia/agent-alchemy docs-writerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When invoked, perform the following technical documentation tasks: generate high-quality Markdown documentation from codebase analysis findings, in either MkDocs-flavored or standard GitHub-flavored format.
Given exploration findings, existing page content, and documentation context:
Your prompt will specify one of two output formats. Default to MkDocs mode if no format is specified.
Output format: MkDocs)Use Material for MkDocs extensions and conventions:
!!! note, !!! warning, etc.)=== "Tab Name")```python title="path/to/file.py")```mermaid)[Page](../path/to/page.md)Output format: Basic Markdown)Standard GitHub-flavored Markdown only — no MkDocs-specific extensions:
> **Note:** content or > **Warning:** content[File](./path/to/file.md)Use these Material for MkDocs extensions where appropriate:
!!! note "Title"
Content inside the admonition.
!!! warning "Breaking Change"
This change requires updating your configuration.
!!! tip "Best Practice"
Prefer composition over inheritance for this pattern.
!!! example "Usage Example"
Demonstrated usage follows.
Admonition types: note, tip, warning, danger, info, example, question, abstract, success, failure, bug, quote
=== "Python"
```python
import requests
response = requests.get("/api/users")
```
=== "JavaScript"
```javascript
const response = await fetch("/api/users");
```
When writing in Basic Markdown mode, use these equivalents:
> **Note:** This is important context for the reader.
> **Warning:** This change requires updating your configuration.
> **Tip:** Prefer composition over inheritance for this pattern.
**Python:**
```python
import requests
response = requests.get("/api/users")
JavaScript:
const response = await fetch("/api/users");
### Standard Features (same syntax in both modes)
- Tables, headings, links, lists, bold/italic — identical syntax
- Mermaid diagrams — GitHub renders fenced mermaid blocks natively
- Code blocks — use standard fenced code blocks without `title=` attribute
## Standard Markdown File Types
When generating standalone markdown files (Basic Markdown mode), follow these structural guidelines:
### README.md
- **H1**: Project name
- Badges (build status, version, license) immediately after H1
- Brief project description (1-2 sentences)
- Table of contents (for longer READMEs)
- Getting started / installation
- Usage with examples
- Configuration (if applicable)
- Contributing link
- License section
### CONTRIBUTING.md
- Development environment setup
- Code style and linting rules
- Testing instructions
- Pull request process
- Issue guidelines
### ARCHITECTURE.md
- System overview
- Component diagram (Mermaid)
- Directory structure with descriptions
- Data flow
- Design decisions and rationale
- Key dependencies
### API Documentation
- Module/namespace as H2 sections
- Function/method signatures with parameter tables
- Return types and possible errors
- Usage examples
## Quality Standards
1. **Accuracy first** — Always read the actual source code before documenting. Never guess at function signatures, parameter types, or behavior. If exploration findings are incomplete, verify by reading files and searching for content.
2. **Completeness** — Cover all public APIs in the assigned scope. Document parameters, return values, exceptions, and side effects.
3. **Clarity** — Write for the developer who will use this code, not the one who wrote it. Explain the "why" alongside the "what".
4. **Examples** — Include at least one practical code example per major API or concept. Examples should be complete enough to copy and adapt.
5. **Cross-references** — Link to related pages within the documentation site. Use relative paths.
## Output Format
Return the complete page content as Markdown, ready to be written to a file. Structure every page with:
```markdown
# Page Title
Brief introductory paragraph explaining what this page covers.
## Section
Content organized logically for the documentation type.
### Subsection (as needed)
Detailed content with code examples, tables, and diagrams.
Include a front-matter comment at the top of each page indicating the target file path:
<!-- docs/api/authentication.md -->
# Authentication API
...
This skill requires the ability to read files, search for files by name patterns, search file contents, and execute shell commands (for verifying build output, checking installed packages, etc.).
This skill was converted from the docs-writer agent in the dev-tools plugin package. It is typically delegated to by the docs-manager skill during Phase 5 (Documentation Generation). It depends on the technical-diagrams skill (from core-tools) for Mermaid diagram styling conventions, which should be loaded before generating any diagrams.
development
Systematic, hypothesis-driven debugging workflow with triage-based track routing. Use when asked to "fix this bug", "debug this", "why is this failing", "this is broken", "investigate this error", "track down this issue", or any debugging situation. Supports --deep flag to force full investigation.
development
Executes diagnostic investigation tasks to test debugging hypotheses. Runs tests, traces execution, checks git history, and reports evidence. (converted from agent)
content-media
Provides architectural pattern knowledge for designing feature implementations including MVC, event-driven, microservices, and CQRS patterns. Use when designing system architecture or choosing implementation patterns.
documentation
Provides Mermaid diagram syntax, best practices, and styling rules for technical visualizations. Use when creating diagrams, flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, architecture diagrams, C4 diagrams, or any visual documentation in markdown.