Best for
- User asks to "document", "create docs", or "write documentation" for any code
- User requests a README, API reference, or developer guide
- User shares a codebase or repository and wants documentation generated
bytedance/deer-flow/skills/public/code-documentation/SKILL.md
Use this skill when the user requests to generate, create, or improve documentation for code, APIs, libraries, repositories, or software projects. Supports README generation, API reference documentation, inline code comments, architecture documentation, changelog generation, and developer guides. Trigger on requests like "document this code", "create a README", "generate API docs", "write developer guide", or when analyzing codebases for documentation purposes.
Decision brief
Supports README generation, API reference documentation, inline code comments, architecture documentation, changelog generation, and developer guides. Trigger on requests like "document this code", "create a README", "generate API docs", "write developer guide", or when analyzing codebases for documentation purposes.
In this controlled same-task single run, enabling code-documentation changed the output from 2578 non-whitespace characters and 14 headings to 3216 characters and 15 headings. Matches among 8 signals extracted from the pinned source changed from 0 to 3. Both actual outputs are shown; this is a structural observation, not a quality score or a universal performance claim.
Create an implementation guide for adding a webhook retry queue to a TypeScript service. Include prerequisites, steps, verification, and common mistakes. The deliverable must specifically reflect this user intent: Use this skill when the user requests to generate, create, or improve documentation for code, APIs, libraries, repositories, or software projects. Supports README generation, API reference documentation, inline code comments, architecture documentation, changelog generation, and developer guides. Trigger on requests like "document this code", "create a README", "generate API docs", "write developer guide", or when analyzing codebases for documentation purposes.

Baseline: 2578 non-whitespace characters, 14 headings, and 67 list items.

With Skill: 3216 non-whitespace characters, 15 headings, and 81 list items.
| Observation | Without Skill | With Skill |
|---|---|---|
| Source-signal coverage | 0/8: none | 3/8: documentation, codebase, analysis |
| Output structure | 2578 chars · 14 headings · 67 list items · 0 code blocks | 3216 chars · 15 headings · 81 list items · 1 code blocks |
| Verification and caution signals | 15 verification signals · 4 risk/limitation signals | 14 verification signals · 2 risk/limitation signals |
Use the code-documentation Skill pinned at a5acc25de674 for my task. Follow its source-specific constraints around `code-documentation`, `documentation`, `capabilities`, `phase`, then return the finished deliverable with explicit assumptions, verification, failure conditions, and limits. Do not treat the Skill text as a factual source or claim that a single demonstration proves universal performance.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/bytedance/deer-flow --skill "skills/public/code-documentation"Inspect the Agent Skill "code-documentation" from https://github.com/bytedance/deer-flow/blob/2a261d227675c7bedd55721f2d361546fa2d7701/skills/public/code-documentation/SKILL.md at commit 2a261d227675c7bedd55721f2d361546fa2d7701. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Before writing any documentation, thoroughly understand the codebase.
Before writing any documentation, thoroughly understand the codebase.
Identify the project fundamentals:
Use sandbox tools to explore the codebase:
Based on analysis, determine what documentation to produce:
Permission review
The documentation includes network, browsing, or remote request actions.
# Search for public API surfacesEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 92/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 80,816 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | tested outcome page | Tested | Generated or reviewed according to the visible evidence level |
Pinned source
This skill generates professional, comprehensive documentation for software projects, codebases, libraries, and APIs. It follows industry best practices from projects like React, Django, Stripe, and Kubernetes to produce documentation that is accurate, well-structured, and useful for both new contributors and experienced developers.
The output ranges from single-file READMEs to multi-document developer guides, always matched to the project's complexity and the user's needs.
Always load this skill when:
Before writing any documentation, thoroughly understand the codebase.
Identify the project fundamentals:
| Field | How to Determine |
|---|---|
| Language(s) | Check file extensions, package.json, pyproject.toml, go.mod, Cargo.toml, etc. |
| Framework | Look at dependencies for known frameworks (React, Django, Express, Spring, etc.) |
| Build System | Check for Makefile, CMakeLists.txt, webpack.config.js, build.gradle, etc. |
| Package Manager | npm/yarn/pnpm, pip/uv/poetry, cargo, go modules, etc. |
| Project Structure | Map out the directory tree to understand the architecture |
| Entry Points | Find main files, CLI entry points, exported modules |
| Existing Docs | Check for existing README, docs/, wiki, or inline documentation |
Use sandbox tools to explore the codebase:
# Get directory structure
ls /mnt/user-data/uploads/project-dir/
# Read key files
read_file /mnt/user-data/uploads/project-dir/package.json
read_file /mnt/user-data/uploads/project-dir/pyproject.toml
# Search for public API surfaces
grep -r "export " /mnt/user-data/uploads/project-dir/src/
grep -r "def " /mnt/user-data/uploads/project-dir/src/ --include="*.py"
grep -r "func " /mnt/user-data/uploads/project-dir/ --include="*.go"
Based on analysis, determine what documentation to produce:
| Project Size | Recommended Documentation |
|---|---|
| Single file / script | Inline comments + usage header |
| Small library | README with API reference |
| Medium project | README + API docs + examples |
| Large project | README + Architecture + API + Contributing + Changelog |
Every project needs a README. Follow this structure:
# Project Name
[One-line project description — what it does and why it matters]
[](#) [](#)
## Features
- [Key feature 1 — brief description]
- [Key feature 2 — brief description]
- [Key feature 3 — brief description]
## Quick Start
### Prerequisites
- [Prerequisite 1 with version requirement]
- [Prerequisite 2 with version requirement]
### Installation
[Installation commands with copy-paste-ready code blocks]
### Basic Usage
[Minimal working example that demonstrates core functionality]
## Documentation
- [Link to full API reference if separate]
- [Link to architecture docs if separate]
- [Link to examples directory if applicable]
## API Reference
[Inline API reference for smaller projects OR link to generated docs]
## Configuration
[Environment variables, config files, or runtime options]
## Examples
[2-3 practical examples covering common use cases]
## Development
### Setup
[How to set up a development environment]
### Testing
[How to run tests]
### Building
[How to build the project]
## Contributing
[Contribution guidelines or link to CONTRIBUTING.md]
## License
[License information]
For each public API surface, document:
Function / Method Documentation:
### `functionName(param1, param2, options?)`
Brief description of what this function does.
**Parameters:**
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `param1` | `string` | Yes | — | Description of param1 |
| `param2` | `number` | Yes | — | Description of param2 |
| `options` | `Object` | No | `{}` | Configuration options |
| `options.timeout` | `number` | No | `5000` | Timeout in milliseconds |
**Returns:** `Promise<Result>` — Description of return value
**Throws:**
- `ValidationError` — When param1 is empty
- `TimeoutError` — When the operation exceeds the timeout
**Example:**
\`\`\`javascript
const result = await functionName("hello", 42, { timeout: 10000 });
console.log(result.data);
\`\`\`
Class Documentation:
### `ClassName`
Brief description of the class and its purpose.
**Constructor:**
\`\`\`javascript
new ClassName(config)
\`\`\`
| Parameter | Type | Description |
|-----------|------|-------------|
| `config.option1` | `string` | Description |
| `config.option2` | `boolean` | Description |
**Methods:**
- [`method1()`](#method1) — Brief description
- [`method2(param)`](#method2) — Brief description
**Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `property1` | `string` | Description |
| `property2` | `number` | Read-only. Description |
For medium-to-large projects, include architecture documentation:
# Architecture Overview
## System Diagram
[Include a Mermaid diagram showing the high-level architecture]
\`\`\`mermaid
graph TD
A[Client] --> B[API Gateway]
B --> C[Service A]
B --> D[Service B]
C --> E[(Database)]
D --> E
\`\`\`
## Component Overview
### Component Name
- **Purpose**: What this component does
- **Location**: `src/components/name/`
- **Dependencies**: What it depends on
- **Public API**: Key exports or interfaces
## Data Flow
[Describe how data flows through the system for key operations]
## Design Decisions
### Decision Title
- **Context**: What situation led to this decision
- **Decision**: What was decided
- **Rationale**: Why this approach was chosen
- **Trade-offs**: What was sacrificed
Generate language-appropriate inline documentation:
Python (Docstrings — Google style):
def process_data(input_path: str, options: dict | None = None) -> ProcessResult:
"""Process data from the given file path.
Reads the input file, applies transformations based on the provided
options, and returns a structured result object.
Args:
input_path: Absolute path to the input data file.
Supports CSV, JSON, and Parquet formats.
options: Optional configuration dictionary.
- "validate" (bool): Enable input validation. Defaults to True.
- "format" (str): Output format ("json" or "csv"). Defaults to "json".
Returns:
A ProcessResult containing the transformed data and metadata.
Raises:
FileNotFoundError: If input_path does not exist.
ValidationError: If validation is enabled and data is malformed.
Example:
>>> result = process_data("/data/input.csv", {"validate": True})
>>> print(result.row_count)
1500
"""
TypeScript (JSDoc / TSDoc):
/**
* Fetches user data from the API and transforms it for display.
*
* @param userId - The unique identifier of the user
* @param options - Configuration options for the fetch operation
* @param options.includeProfile - Whether to include the full profile. Defaults to `false`.
* @param options.cache - Cache duration in seconds. Set to `0` to disable.
* @returns The transformed user data ready for rendering
* @throws {NotFoundError} When the user ID does not exist
* @throws {NetworkError} When the API is unreachable
*
* @example
* ```ts
* const user = await fetchUser("usr_123", { includeProfile: true });
* console.log(user.displayName);
* ```
*/
Go (GoDoc):
// ProcessData reads the input file at the given path, applies the specified
// transformations, and returns the processed result.
//
// The input path must be an absolute path to a CSV or JSON file.
// If options is nil, default options are used.
//
// ProcessData returns an error if the file does not exist or cannot be parsed.
func ProcessData(inputPath string, options *ProcessOptions) (*Result, error) {
Verify the documentation covers:
| Standard | Check |
|---|---|
| Accuracy | Every code example must actually work with the described API |
| Completeness | No public API surface left undocumented |
| Consistency | Same formatting and structure throughout |
| Freshness | Documentation matches the current code, not an older version |
| Accessibility | No jargon without explanation, acronyms defined on first use |
| Examples | Every complex concept has at least one practical example |
Ensure:
#, ##, ###)```python, ```bash)code formatting for function names, file paths, variable names, and CLI commands| Language | Doc Format | Style Guide |
|---|---|---|
| Python | Google-style docstrings | PEP 257 |
| TypeScript/JavaScript | TSDoc / JSDoc | TypeDoc conventions |
| Go | GoDoc comments | Effective Go |
| Rust | Rustdoc (///) | Rust API Guidelines |
| Java | Javadoc | Oracle Javadoc Guide |
| C/C++ | Doxygen | Doxygen manual |
After generation:
/mnt/user-data/outputs/present_files tooldeep-research skill for documenting third-party integrations or dependenciesFrequently asked questions
Supports README generation, API reference documentation, inline code comments, architecture documentation, changelog generation, and developer guides. Trigger on requests like "document this code", "create a README", "generate API docs", "write developer guide", or when analyzing codebases for documentation purposes.
The source record exposes this install command: npx skills add https://github.com/bytedance/deer-flow --skill "skills/public/code-documentation". Inspect the command and pinned source before running it.
Static rules flagged network in the source; the page lists the matching lines and excerpts.
Alternatives
seb1n/awesome-ai-agent-skills
Automatically generate clear, comprehensive documentation for codebases — including API references, inline docstrings, README files, and usage guides. Use when the user requests code documentation or provides relevant inputs for this workflow.
NintendaDev/unikit-ai
Generate and maintain the project's TECHNICAL documentation from its codebase — scans the project structure, tech stack, and module boundaries, then writes a lean README landing page plus detailed topic pages (architecture, modules, setup, build, APIs), only the docs that are relevant. Use whenever the user wants to create, update, or validate documentation of the CODE or the project itself, e.g. "generate documentation", "create docs", "write the README", "update the project docs", "document th
mgiovani/cc-arsenal
Multi-agent review team: architecture, security, performance, testing, style, docs/UX, plus an adversary that cross-examines the other 6, for security-sensitive, architectural, or large PRs (15+ files) where a single-agent pass risks missing cross-cutting issues. Use for auth/payments/PII changes, schema/pattern changes, compliance sign-off, or when asked to 'get the review team on this' / 'multi-agent review' / 'thorough review before merge'. For a standard PR or a quick pre-merge check, use /r
ArabelaTso/Skills-4-SE
Generate formal specifications including preconditions, postconditions, invariants, and contracts from code or requirements. Use this skill when documenting APIs, creating formal verification annotations, defining function contracts, specifying class invariants, writing design-by-contract code, or preparing code for formal verification. Supports multiple specification languages including JML, ACSL, Dafny, Eiffel contracts, and documentation annotations.