sc-document
π―Skillfrom tony363/superclaude
Generates comprehensive documentation for code components, APIs, and features across various styles and types, providing structured technical documentation with customizable detail levels.
Installation
npx skills add https://github.com/tony363/superclaude --skill sc-documentSkill Details
Generate focused documentation for components, functions, APIs, and features. Use when creating inline docs, API references, user guides, or technical documentation.
Overview
# Documentation Generation Skill
Focused documentation for code, APIs, and features.
Quick Start
```bash
# Inline documentation
/sc:document src/auth/login.js --type inline
# API reference
/sc:document src/api --type api --style detailed
# User guide
/sc:document payment-module --type guide
```
Behavioral Flow
- Analyze - Examine component structure and functionality
- Identify - Determine documentation requirements and audience
- Generate - Create appropriate documentation content
- Format - Apply consistent structure and patterns
- Integrate - Ensure compatibility with existing docs
Flags
| Flag | Type | Default | Description |
|------|------|---------|-------------|
| --type | string | inline | inline, external, api, guide |
| --style | string | detailed | brief, detailed |
Evidence Requirements
This skill does NOT require hard evidence. Deliverables are:
- Generated documentation files
- Inline code comments
- API reference materials
Documentation Types
Inline (`--type inline`)
- JSDoc/docstring generation
- Parameter and return descriptions
- Function-level comments
External (`--type external`)
- Standalone documentation files
- Component overviews
- Integration guides
API (`--type api`)
- Endpoint documentation
- Request/response schemas
- Usage examples
Guide (`--type guide`)
- User-focused tutorials
- Implementation patterns
- Common use cases
Style Options
Brief (`--style brief`)
- Concise descriptions
- Essential information only
- Quick reference format
Detailed (`--style detailed`)
- Comprehensive explanations
- Extended examples
- Edge case coverage
Examples
Inline Code Docs
```
/sc:document src/auth/login.js --type inline
# JSDoc with @param, @returns, @throws
```
API Reference
```
/sc:document src/api --type api --style detailed
# Full endpoint docs with examples
```
User Guide
```
/sc:document payment-module --type guide --style brief
# Quick-start tutorial with common patterns
```
Component Docs
```
/sc:document components/ --type external
# README.md for component library
```
MCP Integration
PAL MCP (Quality & Research)
| Tool | When to Use | Purpose |
|------|-------------|---------|
| mcp__pal__codereview | API docs | Review documentation accuracy |
| mcp__pal__apilookup | External APIs | Get current API documentation |
| mcp__pal__chat | Writing assistance | Get help with complex explanations |
| mcp__pal__consensus | Style decisions | Multi-model validation of doc approach |
PAL Usage Patterns
```bash
# Verify documentation accuracy
mcp__pal__codereview(
review_type="quick",
step="Reviewing API documentation for accuracy",
findings="Parameter descriptions, return types, examples",
relevant_files=["/docs/api/auth.md"]
)
# Get current API docs for external integration
mcp__pal__apilookup(
prompt="Get current Stripe API documentation for payment intents"
)
# Writing assistance for complex topics
mcp__pal__chat(
prompt="Help me explain the OAuth2 authorization code flow clearly for developers",
model="gpt-5.2"
)
```
Rube MCP (Publishing & Collaboration)
| Tool | When to Use | Purpose |
|------|-------------|---------|
| mcp__rube__RUBE_SEARCH_TOOLS | Doc platforms | Find Notion, Confluence, GitBook |
| mcp__rube__RUBE_MULTI_EXECUTE_TOOL | Publishing | Push docs to platforms |
| mcp__rube__RUBE_REMOTE_WORKBENCH | Bulk docs | Generate docs for large codebases |
Rube Usage Patterns
```bash
# Publish documentation
mcp__rube__RUBE_MULTI_EXECUTE_TOOL(tools=[
{"tool_slug": "NOTION_CREATE_PAGE", "arguments": {
"title": "API Reference: Authentication",
"content": "## Endpoints\n### POST /auth/login\n..."
}},
{"tool_slug": "CONFLUENCE_CREATE_PAGE", "arguments": {
"space": "DEV",
"title": "Auth API Documentation",
"content": "..."
}}
])
# Notify team of new docs
mcp__rube__RUBE_MULTI_EXECUTE_TOOL(tools=[
{"tool_slug": "SLACK_SEND_MESSAGE", "arguments": {
"channel": "#documentation",
"text": "New API docs published: Authentication endpoints"
}}
])
# Bulk generate docs
mcp__rube__RUBE_REMOTE_WORKBENCH(
thought="Generate JSDoc for all exported functions",
code_to_execute='''
import os
# Process all JS files and generate documentation
# Use invoke_llm for each function
'''
)
```
Flags (Extended)
| Flag | Type | Default | Description |
|------|------|---------|-------------|
| --pal-review | bool | false | Use PAL to review doc accuracy |
| --publish | string | - | Publish via Rube (notion, confluence, gitbook) |
| --notify | string | - | Notify via Rube (slack, teams, email) |
Tool Coordination
- Read - Component analysis
- Grep - Reference extraction
- Write - Documentation creation
- Glob - Multi-file documentation
- PAL MCP - Accuracy review, API lookup, writing assistance
- Rube MCP - Publishing, notifications, bulk generation
More from this repository10
Automates data pipeline creation, transformation, and ETL workflows using AI-driven code generation and intelligent data engineering strategies
Automatically updates README.md by analyzing git branch changes with multi-model consensus validation for accurate documentation synchronization.
Executes comprehensive tests with coverage analysis, real-time tracking, and automated quality reporting across various test types.
Generates structured implementation workflows by analyzing PRDs and requirements, creating comprehensive, multi-domain development plans with strategic coordination.
Designs comprehensive system architectures, APIs, and component interfaces using best practices and industry standards.
Systematically improve code quality, performance, and maintainability through multi-persona analysis and safe refactoring.
Automates intelligent git operations with smart commit generation, branch management, and workflow optimization.
Systematically estimates development tasks by analyzing scope, calculating effort, and providing confidence intervals for time, complexity, and resource planning.
Intelligently implements features, APIs, and components by coordinating expertise, applying best practices, and ensuring systematic development.
Performs comprehensive code analysis across quality, security, performance, and architecture domains, generating actionable insights and recommendations.