codebase-documenter
This skill should be used when writing documentation for codebases, including README files, architecture documentation, code comments, and API documentation. Use this skill when users request help documenting their code, creating getting-started guides, explaining project structure, or making codebases more accessible to new developers. The skill provides templates, best practices, and structured approaches for creating clear, beginner-friendly documentation.
What this skill does
# Codebase Documenter
## Overview
This skill enables creating comprehensive, beginner-friendly documentation for codebases. It provides structured templates and best practices for writing READMEs, architecture guides, code comments, and API documentation that help new users quickly understand and contribute to projects.
## Core Principles for Beginner-Friendly Documentation
When documenting code for new users, follow these fundamental principles:
1. **Start with the "Why"** - Explain the purpose before diving into implementation details
2. **Use Progressive Disclosure** - Present information in layers from simple to complex
3. **Provide Context** - Explain not just what the code does, but why it exists
4. **Include Examples** - Show concrete usage examples for every concept
5. **Assume No Prior Knowledge** - Define terms and avoid jargon when possible
6. **Visual Aids** - Use diagrams, flowcharts, and file tree structures
7. **Quick Wins** - Help users get something running within 5 minutes
## Documentation Types and When to Use Them
### 1. README Documentation
**When to create:** For project root directories, major feature modules, or standalone components.
**Structure to follow:**
```markdown
# Project Name
## What This Does
[1-2 sentence plain-English explanation]
## Quick Start
[Get users running the project in < 5 minutes]
## Project Structure
[Visual file tree with explanations]
## Key Concepts
[Core concepts users need to understand]
## Common Tasks
[Step-by-step guides for frequent operations]
## Troubleshooting
[Common issues and solutions]
```
**Best practices:**
- Lead with the project's value proposition
- Include setup instructions that actually work (test them!)
- Provide a visual overview of the project structure
- Link to deeper documentation for advanced topics
- Keep the root README focused on getting started
### 2. Architecture Documentation
**When to create:** For projects with multiple modules, complex data flows, or non-obvious design decisions.
**Structure to follow:**
```markdown
# Architecture Overview
## System Design
[High-level diagram and explanation]
## Directory Structure
[Detailed breakdown with purpose of each directory]
## Data Flow
[How data moves through the system]
## Key Design Decisions
[Why certain architectural choices were made]
## Module Dependencies
[How different parts interact]
## Extension Points
[Where and how to add new features]
```
**Best practices:**
- Use diagrams to show system components and relationships
- Explain the "why" behind architectural decisions
- Document both the happy path and error handling
- Identify boundaries between modules
- Include visual file tree structures with annotations
### 3. Code Comments
**When to create:** For complex logic, non-obvious algorithms, or code that requires context.
**Annotation patterns:**
**Function/Method Documentation:**
```javascript
/**
* Calculates the prorated subscription cost for a partial billing period.
*
* Why this exists: Users can subscribe mid-month, so we need to charge
* them only for the days remaining in the current billing cycle.
*
* @param {number} fullPrice - The normal monthly subscription price
* @param {Date} startDate - When the user's subscription begins
* @param {Date} periodEnd - End of the current billing period
* @returns {number} The prorated amount to charge
*
* @example
* // User subscribes on Jan 15, period ends Jan 31
* calculateProratedCost(30, new Date('2024-01-15'), new Date('2024-01-31'))
* // Returns: 16.13 (17 days out of 31 days)
*/
```
**Complex Logic Documentation:**
```python
# Why this check exists: The API returns null for deleted users,
# but empty string for users who never set a name. We need to
# distinguish between these cases for the audit log.
if user_name is None:
# User was deleted - log this as a security event
log_deletion_event(user_id)
elif user_name == "":
# User never completed onboarding - safe to skip
continue
```
**Best practices:**
- Explain "why" not "what" - the code shows what it does
- Document edge cases and business logic
- Add examples for complex functions
- Explain parameters that aren't self-explanatory
- Note any gotchas or counterintuitive behavior
### 4. API Documentation
**When to create:** For any HTTP endpoints, SDK methods, or public interfaces.
**Structure to follow:**
```markdown
## Endpoint Name
### What It Does
[Plain-English explanation of the endpoint's purpose]
### Endpoint
`POST /api/v1/resource`
### Authentication
[What auth is required and how to provide it]
### Request Format
[JSON schema or example request]
### Response Format
[JSON schema or example response]
### Example Usage
[Concrete example with curl/code]
### Common Errors
[Error codes and what they mean]
### Related Endpoints
[Links to related operations]
```
**Best practices:**
- Provide working curl examples
- Show both success and error responses
- Explain authentication clearly
- Document rate limits and constraints
- Include troubleshooting for common issues
## Documentation Workflow
### Step 1: Analyze the Codebase
Before writing documentation:
1. **Identify entry points** - Main files, index files, app initialization
2. **Map dependencies** - How modules relate to each other
3. **Find core concepts** - Key abstractions users need to understand
4. **Locate configuration** - Environment setup, config files
5. **Review existing docs** - Build on what's there, don't duplicate
### Step 2: Choose Documentation Type
Based on user request and codebase analysis:
- **New project or missing README** → Start with README documentation
- **Complex architecture or multiple modules** → Create architecture documentation
- **Confusing code sections** → Add inline code comments
- **HTTP/API endpoints** → Write API documentation
- **Multiple types needed** → Address in order: README → Architecture → API → Comments
### Step 3: Generate Documentation
Use the templates from `assets/templates/` as starting points:
- `assets/templates/README.template.md` - For project READMEs
- `assets/templates/ARCHITECTURE.template.md` - For architecture docs
- `assets/templates/API.template.md` - For API documentation
Customize templates based on the specific codebase:
1. **Fill in project-specific information** - Replace placeholders with actual content
2. **Add concrete examples** - Use real code from the project
3. **Include visual aids** - Create file trees, diagrams, flowcharts
4. **Test instructions** - Verify setup steps actually work
5. **Link related docs** - Connect documentation pieces together
### Step 4: Review for Clarity
Before finalizing documentation:
1. **Read as a beginner** - Does it make sense without project context?
2. **Check completeness** - Are there gaps in the explanation?
3. **Verify examples** - Do code examples actually work?
4. **Test instructions** - Can someone follow the setup steps?
5. **Improve structure** - Is information easy to find?
## Documentation Templates
This skill includes several templates in `assets/templates/` that provide starting structures:
### Available Templates
- **README.template.md** - Comprehensive README structure with sections for quick start, project structure, and common tasks
- **ARCHITECTURE.template.md** - Architecture documentation template with system design, data flow, and design decisions
- **API.template.md** - API endpoint documentation with request/response formats and examples
- **CODE_COMMENTS.template.md** - Examples and patterns for effective inline documentation
### Using Templates
1. **Read the appropriate template** from `assets/templates/`
2. **Customize for the specific project** - Replace placeholders with actual information
3. **Add project-specific sections** - Extend the template as needed
4. **Include real examples** - Use actual code from the codebase
5. **Remove irrelevant sections** - Delete parts that don't apply
## Best Practices Reference
ForRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.