mcpbeat Sign in

Code Documentation Agent Skill

Generate docs: README, API reference, architecture, guides.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
117
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/HezaoHezao/poirot --skill code-documentation

What it tells the agent to use

found in the instruction text
Bash runs shell commands — read the instruction before connecting

The instruction itself

15 sections, as written by the author

Code Documentation

Overview

Generate professional, comprehensive documentation for software projects,

codebases, libraries, and APIs. Follows best practices from React, Django,

Stripe, Kubernetes to produce accurate, well-structured docs.

When to Use

  • User asks to "document", "create docs", or "write documentation" for code
  • User requests a README, API reference, or developer guide
  • User shares a codebase and wants documentation generated
  • User asks to improve or update existing documentation
  • User needs architecture documentation with diagrams
  • User requests a changelog or migration guide

Workflow

Phase 1: Codebase Analysis

Step 1.1: Project Discovery

| Field | How to Determine |

|-------|-----------------|

| Language(s) | File extensions, package.json, pyproject.toml, go.mod |

| Framework | Dependencies (React, Django, Express, Spring) |

| Build System | Makefile, CMakeLists.txt, webpack.config.js |

| Package Manager | npm/yarn/pnpm, pip/uv/poetry, cargo |

| Project Structure | Map directory tree |

| Entry Points | main files, CLI entry points, exported modules |

| Existing Docs | README, docs/, wiki, inline docs |

# Discover project structure
list_dir(".")
# Read key files
read_file("package.json")  # or pyproject.toml, go.mod, etc.
# Find all source files
bash("find . -name '*.py' -not -path '*/venv/*' -not -path '*/.venv/*' | head -30")
Step 1.2: Code Structure Analysis
# Find entry points
bash("grep -rl 'if __name__' --include='*.py' . | head -10")

# Find API routes/endpoints
bash("grep -rn '@app.route\|@router\.\|def get\|def post' --include='*.py' . | head -20")

# Find exported modules
bash("grep -rn 'export\|module.exports' --include='*.js' --include='*.ts' . | head -20")

# Find classes (for API reference)
bash("grep -rn '^class ' --include='*.py' . | head -20")

Phase 2: Documentation Generation

README.md
# Project Name

> One-line description

## Features
- Feature 1
- Feature 2

## Installation
\`\`\`bash
pip install project-name
\`\`\`

## Quick Start
\`\`\`python
from project import Client
client = Client()
result = client.do_thing()
\`\`\`

## API Reference
### `Client.do_thing(param: str) -> Result`
Description of what this does.

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| param | str | Yes | The input |

## Configuration
| Key | Default | Description |
|-----|---------|-------------|

## Contributing
See CONTRIBUTING.md

## License
MIT
API Reference

For each public function/class:

  • Signature (parameters, return type)
  • Description
  • Parameters table
  • Return value
  • Example usage
  • Exceptions raised
Architecture Documentation
  • System overview diagram (use architecture-diagram skill)
  • Component descriptions
  • Data flow
  • Key design decisions (ADR format)

Phase 3: Review

  • [ ] All public APIs documented
  • [ ] Examples are runnable
  • [ ] Installation instructions tested
  • [ ] No broken links
  • [ ] Language-appropriate conventions (docstrings, JSDoc, GoDoc)
  • [ ] Architecture diagram included for complex projects

Documentation Conventions by Language

| Language | Inline Format | Reference Format |

|----------|--------------|-----------------|

| Python | docstrings (Google/NumPy style) | Sphinx, MkDocs |

| JavaScript/TypeScript | JSDoc/TSDoc | JSDoc, TypeDoc |

| Go | GoDoc comments | godoc |

| Java | Javadoc | javadoc |

| Rust | rustdoc (///) | rustdoc |

Changelog Generation

# From git log
bash("git log --oneline --no-decorate v1.0.0..HEAD | head -50")

# Generate changelog from commits
bash("git log v1.0.0..HEAD --pretty=format:'- %s (%h)' --no-merges")

Pitfalls

  • Stale docs: documentation must match code. If code changed, docs must

update. Note the commit/version the docs were generated from.

  • No examples: documentation without runnable examples is useless. Always

include copy-pasteable examples.

  • Over-documenting internals: document public API, not implementation

details. Internal code should have inline comments, not API docs.

  • No table of contents: for long docs, include a TOC with anchor links.
  • Missing prerequisites: list all dependencies, environment requirements,

and minimum versions.

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take hezaohezao/code-documentation from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference pip. Without those the skill loads but fails at the first command.