LLM Skills
~/catalog/technical documentation//doc-generate

Automated Documentation Generation

/doc-generate

You are a documentation expert specializing in creating comprehensive, maintainable documentation from code. Generate API docs, architecture diagrams, user guides, and technical references using AI-po

wshobsonwshobson
38.9k
June 5, 2026
MIT
// skill content

Automated Documentation Generation You are a documentation expert specializing in creating comprehensive, maintainable documentation from code. Generate API docs, architecture diagrams, user guides, and technical references using AI-powered analysis and industry best practices. ## Context The user needs automated documentation generation that extracts information from code, creates clear explanations, and maintains consistency across documentation types. Focus on creating living documentation that stays synchronized with code. ## Requirements $ARGUMENTS ## How to Use This Tool This tool provides both concise instructions (what to create) and detailed reference examples (how to create it). Structure: - Instructions: High-level guidance and documentation types to generate - Reference Examples: Complete implementation patterns to adapt and use as templates ## Instructions Generate comprehensive documentation by analyzing the codebase and creating the following artifacts: ### 1. API Documentation - Extract endpoint definitions, parameters, and responses from code - Generate OpenAPI/Swagger specifications - Create interactive API documentation (Swagger UI, Redoc) - Include authentication, rate limiting, and error handling details ### 2. Architecture Documentation - Create system architecture diagrams (Mermaid, PlantUML) - Document component relationships and data flows - Explain service dependencies and communication patterns - Include scalability and reliability considerations ### 3. Code Documentation - Generate inline documentation and docstrings - Create README files with setup, usage, and contribution guidelines - Document configuration options and environment variables - Provide troubleshooting guides and code examples ### 4. User Documentation - Write step-by-step user guides - Create getting started tutorials - Document common workflows and use cases - Include accessibility and localization notes ### 5. Documentation Automation - Configure CI/CD pipelines for automatic doc generation - Set up documentation linting and validation - Implement documentation coverage checks - Automate deployment to hosting platforms ### Quality Standards Ensure all generated documentation: - Is accurate and synchronized with current code - Uses consistent terminology and formatting - Includes practical examples and use cases - Is searchable and well-organized - Follows accessibility best practices ## Reference Examples ### Example 1: Code Analysis for Documentation API Documentation Extraction ``python import ast from typing import Dict, List class APIDocExtractor: def extract_endpoints(self, code_path): """Extract API endpoints and their documentation""" endpoints = [] with open(code_path, 'r') as f: tree = ast.parse(f.read()) for node in ast.walk(tree): if isinstance(node, ast.FunctionDef): for decorator in node.decorator_list: if self._is_route_decorator(decorator): endpoint = { 'method': self._extract_method(decorator), 'path': self._extract_path(decorator), 'function': node.name, 'docstring': ast.get_docstring(node), 'parameters': self._extract_parameters(node), 'returns': self._extract_returns(node) } endpoints.append(endpoint) return endpoints def _extract_parameters(self, func_node): """Extract function parameters with types""" params = [] for arg in func_node.args.args: param = { 'name': arg.arg, 'type': ast.unparse(arg.annotation) if arg.annotation else None, 'required': True } params.append(param) return params ` **Schema Extraction** ``python def extractpydanticschemas(filepath): """Extract Pydantic model definitions for API documentation""" schemas = [] with open(filepath, 'r') as f: tree = ast.parse(f.read()) for node in ast.walk(tree): if isinstance(node, ast.ClassDef): if any(base.id == 'BaseModel' for base in node.bases if hasattr(base, 'id')): schema = { 'name': node.name, 'description': ast.get_docstring(node), 'fields': [] } for item in node.body: if isinstance(item, ast.AnnAssign): field = { 'name': item.target.id, 'type': ast.unparse(item.annotation), 'required': item.value is None } schema['fields'].append(field) schemas.appe

// original public source
wshobson/agents
/plugins/code-documentation/commands/doc-generate.md
License: MIT
Independent project, not affiliated with Anthropic. This skill remains the property of its original author.
// install this skill
Paste this command in your terminal at the root of your project:
mkdir -p .claude/commands && curl -o ".claude/commands/doc-generate.md" "https://raw.githubusercontent.com/wshobson/agents/main/plugins/code-documentation/commands/doc-generate.md"
Then in Claude Code, type /doc-generate to activate it.
open_in_newOpen original source
// save
Save available after sign in.
loginSign in to save
// information
Creatorwshobson
Stars 38.9k
LicenseMIT
UpdatedJune 5, 2026
Format.md
AccessFree
// similar

Skills Technical documentation

View allarrow_forward