Agent skill
doc-generator
Generates comprehensive documentation from code, APIs, and specifications. Creates API documentation, developer guides, architecture docs, and user manuals with examples and tutorials.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/doc-generator
SKILL.md
Mode: Cognitive/Prompt-Driven — No standalone utility script; use via agent context.
Step 1: Identify Documentation Type
Determine documentation type:
- API Documentation: Endpoint references
- Developer Guide: Setup and usage
- Architecture Docs: System overview
- User Manual: Feature guides
Step 2: Extract Information
Gather documentation content:
- Read code and comments
- Analyze API endpoints
- Extract examples
- Understand architecture
Step 3: Generate Documentation
Create documentation:
- Follow documentation templates
- Include examples
- Add troubleshooting
- Create clear structure
Step 4: Validate Documentation
Validate quality:
- Check completeness
- Verify examples work
- Ensure clarity
- Validate links </execution_process>
Integration with Developer Agent:
- Generates API documentation
- Creates inline documentation
- Updates docs with code changes
<best_practices>
- Extract from Code: Use code as source of truth
- Include Examples: Provide working examples
- Keep Updated: Sync docs with code
- Clear Structure: Organize logically
- User-Focused: Write for users, not system </best_practices>
# Users API
## Endpoints
### GET /api/users
List all users with pagination.
**Query Parameters:**
- `page` (number): Page number (default: 1)
- `limit` (number): Items per page (default: 10)
**Response:**
```json
{
"data": [
{
"id": "uuid",
"email": "[email protected]",
"name": "User Name"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 100
}
}
```
Example:
curl -X GET "http://localhost:3000/api/users?page=1&limit=10"
</formatting_example>
<formatting_example>
**Developer Guide**
```markdown
# Developer Guide
## Getting Started
### Prerequisites
- Node.js 18+
- pnpm 8+
### Installation
```bash
pnpm install
Development
pnpm dev
Architecture
[Architecture overview]
Development Workflow
[Development process]
</formatting_example>
</examples>
<examples>
<usage_example>
**Example Commands**:
Generate API documentation
Generate API documentation for app/api/users
Generate developer guide
Generate developer guide for this project
Generate architecture docs
Generate architecture documentation
Generate OpenAPI spec
Generate OpenAPI specification from API routes
</usage_example>
</examples>
## Memory Protocol (MANDATORY)
**Before starting:**
Read `.claude/context/memory/learnings.md`
**After completing:**
- New pattern -> `.claude/context/memory/learnings.md`
- Issue found -> `.claude/context/memory/issues.md`
- Decision made -> `.claude/context/memory/decisions.md`
> ASSUME INTERRUPTION: If it's not in memory, it didn't happen.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?