
Doc Generator
- 64 installs
- 36 repo stars
- Updated July 14, 2026
- oimiragieo/agent-studio
Helps with ai & agent building tasks.
About
doc-generator is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- doc-generator
- AI & Agent Building
- AI-coding skill
Doc Generator by the numbers
- 64 all-time installs (skills.sh)
- Ranked #6,128 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oimiragieo/agent-studio --skill doc-generatorAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 64 |
|---|---|
| repo stars | ★ 36 |
| Last updated | July 14, 2026 |
| Repository | oimiragieo/agent-studio ↗ |
What it does
Helps with ai & agent building tasks.
Files
Mode: Cognitive/Prompt-Driven — No standalone utility script; use via agent context.
<identity> Documentation Generator Skill - Generates comprehensive documentation from code, APIs, and specifications including API docs, developer guides, architecture documentation, and user manuals. </identity>
<capabilities>
- Generating API documentation
- Creating developer guides
- Documenting architecture
- Creating user manuals
- Generating OpenAPI/Swagger specs
- Updating existing documentation
</capabilities>
<instructions> <execution_process>
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> Integration with Technical Writer Agent:
- Uses this skill for documentation generation
- Ensures documentation quality
- Validates completeness
Integration with Developer Agent:
- Generates API documentation
- Creates inline documentation
- Updates docs with code changes
</integration>
<best_practices>
1. Extract from Code: Use code as source of truth 2. Include Examples: Provide working examples 3. Keep Updated: Sync docs with code 4. Clear Structure: Organize logically 5. User-Focused: Write for users, not system </best_practices> </instructions>
<examples> <formatting_example> API Documentation
````markdown
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:
{
"data": [
{
"id": "uuid",
"email": "user@example.com",
"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
# Developer Guide
## Getting Started
### Prerequisites
- Node.js 18+
- pnpm 8+
### Installationpnpm install ````
Development
pnpm devArchitecture
[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>
## Iron Laws
1. **ALWAYS** extract documentation from code as the source of truth — never write documentation that describes how you wish the code worked rather than how it actually works.
2. **NEVER** publish documentation with non-runnable examples — every code example must be copy-paste ready and verified to work before the documentation is written.
3. **ALWAYS** structure documentation with the progressive disclosure pattern (Setup → Quick Start → Reference → Troubleshooting) — readers need orientation before details.
4. **NEVER** document internal implementation details that consumers don't need to know — documentation of private internals creates false contracts and maintenance burden.
5. **ALWAYS** regenerate documentation when the code it describes changes — stale documentation is worse than no documentation because it actively misleads users.
## Anti-Patterns
| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| No working code examples | Users can't understand how to use the API without runnable examples | Include minimal copy-paste examples verified to work for every public API |
| Aspirational documentation (describes intended behavior) | Creates false contracts; users file bugs when docs don't match code | Read the actual implementation first; document only observed behavior |
| Documenting private/internal APIs | Creates implicit dependencies; refactoring breaks "documented" behavior | Only document public APIs; mark internal functions with `@internal` if needed |
| Monolithic reference dumps without Quick Start | Users abandon before finding what they need | Always include a Quick Start section with the simplest possible working example |
| Documentation in a separate PR from code change | Docs drift immediately; often abandoned | Require documentation updates in the same PR as API changes |
## 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.Invoke the doc-generator skill and follow it exactly as presented to you
#!/usr/bin/env node
/**
* doc-generator - Post-Execute Hook
* Runs after the skill executes for cleanup, logging, or follow-up actions.
*/
const fs = require('fs');
const path = require('path');
const { safeParseJSON } = require('../../../lib/utils/safe-json.cjs');
// Parse hook input
const result = safeParseJSON(process.argv[2] || '{}');
console.log('📝 [DOC-GENERATOR] Post-execute processing...');
/**
* Process execution result
*/
function processResult(_result) {
// TODO: Add your post-processing logic here
return { success: true };
}
// Run post-processing
const outcome = processResult(result);
if (outcome.success) {
console.log('✅ [DOC-GENERATOR] Post-processing complete');
process.exit(0);
} else {
console.error('⚠️ [DOC-GENERATOR] Post-processing had issues');
process.exit(0);
}
#!/usr/bin/env node
/**
* doc-generator - Pre-Execute Hook
* Runs before the skill executes to validate input or prepare context.
*/
const fs = require('fs');
const path = require('path');
const { safeParseJSON } = require('../../../lib/utils/safe-json.cjs');
// Parse hook input
const input = safeParseJSON(process.argv[2] || '{}');
console.log('🔍 [DOC-GENERATOR] Pre-execute validation...');
/**
* Validate input before execution
*/
function validateInput(_input) {
const errors = [];
// TODO: Add your validation logic here
return errors;
}
// Run validation
const errors = validateInput(input);
if (errors.length > 0) {
console.error('❌ Validation failed:');
errors.forEach(e => console.error(' - ' + e));
process.exit(1);
}
console.log('✅ [DOC-GENERATOR] Validation passed');
process.exit(0);
doc-generator Research Requirements
Generated: 2026-02-28
Skill Description
Generates comprehensive documentation from code, APIs, and specifications. Creates API documentation, developer guides, architecture docs, and user manuals with examples and tutorials.
Research Areas
- Current best practices for doc-generator
- Industry standards and tooling
- Integration patterns
Source References
- To be populated by skill-updater research phase
doc-generator Rules
Purpose
Generates comprehensive documentation from code, APIs, and specifications. Creates API documentation, developer guides, architecture docs, and user manuals with examples and tutorials.
Best Practices
- Extract documentation from code comments
- Generate OpenAPI/Swagger specs from code
- Create comprehensive examples
- Include troubleshooting guides
- Follow documentation standards
Integration Points
See SKILL.md for complete documentation.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "doc-generator Input Schema",
"description": "Input validation schema for doc-generator skill",
"type": "object",
"required": [],
"properties": {},
"additionalProperties": true
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "doc-generator Output Schema",
"description": "Output validation schema for doc-generator skill",
"type": "object",
"required": ["success"],
"properties": {
"success": {
"type": "boolean",
"description": "Whether the skill executed successfully"
},
"result": {
"type": "object",
"description": "The skill execution result",
"additionalProperties": true
},
"error": {
"type": "string",
"description": "Error message if execution failed"
}
},
"additionalProperties": true
}
#!/usr/bin/env node
/**
* Doc Generator - Main Script
* Generates comprehensive documentation from code, APIs, and specifications. Creates API documentation, developer guides, architecture docs, and user manuals with examples and tutorials.
*
* Usage:
* node main.cjs [options]
*
* Options:
* --help Show this help message
*/
const fs = require('fs');
const path = require('path');
// Find project root
function findProjectRoot() {
let dir = __dirname;
while (dir !== path.parse(dir).root) {
if (fs.existsSync(path.join(dir, '.claude'))) {
return dir;
}
dir = path.dirname(dir);
}
return process.cwd();
}
const PROJECT_ROOT = findProjectRoot();
// Parse command line arguments
const args = process.argv.slice(2);
const options = {};
for (let i = 0; i < args.length; i++) {
if (args[i].startsWith('--')) {
const key = args[i].slice(2);
const value = args[i + 1] && !args[i + 1].startsWith('--') ? args[++i] : true;
options[key] = value;
}
}
/**
* Main execution
*/
function main() {
if (options.help) {
console.log(`
Doc Generator - Main Script
Usage:
node main.cjs [options]
Options:
--help Show this help message
`);
process.exit(0);
}
console.log(
'Doc Generator provides in-context guidance for API docs, developer guides, and architecture docs. Invoke via the agent; no standalone script.'
);
process.exit(0);
}
main();
doc-generator Implementation Template
Goal
- Define target outcome and acceptance criteria.
TDD
1. Red 2. Green 3. Refactor
Verification
- lint
- format
- targeted tests