Agent skill

Code Documentation

by HezaoHezao in HezaoHezao/poirot

Generate docs: README, API reference, architecture, guides. An agent skill from HezaoHezao/poirot.

MITAuto-check passedDevelopment

Install Code Documentation

skills CLI
$ npx skills add HezaoHezao/poirot --skill code-documentation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HezaoHezao/poirot code-documentation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HezaoHezao/poirot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/poirot/backend/agents/skill/builtin_skills/productivity/code-documentation .claude/skills/code-documentation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-documentation
GitHub stars
250
Token cost
~1.2k tokens
SKILL.md length
312 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

Generate docs: README, API reference, architecture, guides. An agent skill from HezaoHezao/poirot.

  • Works in 3 steps: Codebase Analysis → Documentation Generation → Review
  • Tasks that involve Technical documentation
  • SKILL.md covers Overview, When to Use, Workflow and Documentation Conventions by…, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Code Documentation is an agent skill from HezaoHezao/poirot. Generate docs: README, API reference, architecture, guides.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical documentation. The repository describes itself as: Poirot is a deep research agent kernel built for those who care about how agents are architected. The licence is MIT.

When your agent uses it

  • Tasks that involve Technical documentation

Example prompts

  • “/code-documentation”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): bash, read_file, write_file, list_dir

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Codebase Analysis
  2. Documentation Generation
  3. Review

What it can do on your machine

Read from SKILL.md and the folder at commit 86bf279. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • bash
    • read_file
    • write_file
    • list_dir

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Documentation loads about 1.2k tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 312 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HezaoHezao/poirot at commit 86bf279, republished under its MIT licence (© HezaoHezao). 312 words, ~1,161 tokens.

Download SKILL.mdSave it as .claude/skills/code-documentation/SKILL.md (or your agent's skills folder).
name
code-documentation
description
Generate docs: README, API reference, architecture, guides.
allowed-tools
bash, read_file, write_file, list_dir
enabled
true
related-skills
codebase-inspection
license
MIT
author
Adapted from deer-flow (Bytedance, MIT)

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
FieldHow to Determine
Language(s)File extensions, package.json, pyproject.toml, go.mod
FrameworkDependencies (React, Django, Express, Spring)
Build SystemMakefile, CMakeLists.txt, webpack.config.js
Package Managernpm/yarn/pnpm, pip/uv/poetry, cargo
Project StructureMap directory tree
Entry Pointsmain files, CLI entry points, exported modules
Existing DocsREADME, docs/, wiki, inline docs
bash
# 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
bash
# 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
markdown
# 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

LanguageInline FormatReference Format
Pythondocstrings (Google/NumPy style)Sphinx, MkDocs
JavaScript/TypeScriptJSDoc/TSDocJSDoc, TypeDoc
GoGoDoc commentsgodoc
JavaJavadocjavadoc
Rustrustdoc (///)rustdoc

Changelog Generation

bash
# 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.

© HezaoHezao, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in poirot/backend/agents/skill/builtin_skills/productivity/code-documentation of HezaoHezao/poirot.

Open the folder on GitHubat commit 86bf279

Compare with similar skills

Code Documentation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Documentation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Documentation this skillHezaoHezao/poirot250—~1.2kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design44k1 repos~7.5kAutomated safety check: PassMIT
Simple Englishmoeru-ai/airi50k2 repos~4.6kAutomated safety check: PassMIT
Get API Docs with chubandrewyng/context-hub14k2 repos~775Automated safety check: PassMIT
Doc SyncJetBrains/ideavim10k2 repos~2.6kAutomated safety check: PassMIT
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.4kAutomated safety check: PassGPL-3.0

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    44k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    DevelopmentAuto-check passed
  • Get API Docs with chub

    andrewyng/context-hub

    Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

    14k GitHub starsUsed in 2 repos~775 tokens
    DevelopmentAuto-check passed
  • Doc Sync

    JetBrains/ideavim

    Official

    Keeps IdeaVim documentation in sync with code changes. An agent skill from JetBrains/ideavim.

    10k GitHub starsUsed in 2 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes

More from HezaoHezao/poirot

All 23 skills in this repo
  • Requesting Code Review

    HezaoHezao/poirot

    Pre-commit review: security scan, quality gates, auto-fix. An agent skill from HezaoHezao/poirot.

    250 GitHub starsUsed in 5 repos~1.6k tokens
    Auto-check passed
  • Research Paper Writing

    HezaoHezao/poirot

    ML paper pipeline: experiment design to submission. An agent skill from HezaoHezao/poirot.

    250 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Academic Paper Review

    HezaoHezao/poirot

    Structured peer-review of academic papers. An agent skill from HezaoHezao/poirot.

    250 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Blogwatcher

    HezaoHezao/poirot

    Monitor blogs and RSS/Atom feeds via blogwatcher-cli. An agent skill from HezaoHezao/poirot.

    250 GitHub stars~854 tokensUpdated 2 mo ago
    Auto-check passed
  • Bootstrap

    HezaoHezao/poirot

    Onboarding conversation to generate a user profile. An agent skill from HezaoHezao/poirot.

    250 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Chart Visualization

    HezaoHezao/poirot

    Generate charts: select type, extract data, render image. An agent skill from HezaoHezao/poirot.

    250 GitHub stars~1k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Code Documentation

What does Code Documentation do?

Generate docs: README, API reference, architecture, guides. An agent skill from HezaoHezao/poirot. Code Documentation is an agent skill from HezaoHezao/poirot. Generate docs: README, API reference, architecture, guides.

When should I use Code Documentation?

Code Documentation fits situations like: tasks that involve Technical documentation.

How do I install Code Documentation in Claude Code?

Run `npx skills add HezaoHezao/poirot --skill code-documentation -a claude-code`. Or copy the skill folder (poirot/backend/agents/skill/builtin_skills/productivity/code-documentation in HezaoHezao/poirot) into .claude/skills/code-documentation in your project. Claude Code loads it when a task matches its description.

How do I install Code Documentation in Codex?

Run `npx skills add HezaoHezao/poirot --skill code-documentation -a codex`. Or copy the skill folder (poirot/backend/agents/skill/builtin_skills/productivity/code-documentation in HezaoHezao/poirot) into .agents/skills/code-documentation in your project. Codex loads it when a task matches its description.

Can I use Code Documentation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HezaoHezao/poirot --skill code-documentation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-documentation, .gemini/skills/code-documentation, .github/skills/code-documentation and .opencode/skills/code-documentation in your project.

What does Code Documentation need to run?

SKILL.md names no scripts, command-line tools or credentials: Code Documentation is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: bash, read_file, write_file, list_dir.

Does Code Documentation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Documentation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Documentation use?

Code Documentation is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Documentation use?

About 1.2k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Documentation?

Skills that share tags, products or a category with Code Documentation: Diagram Design (cathrynlavery/diagram-design, 44k stars), Simple English (moeru-ai/airi, 50k stars), Get API Docs with chub (andrewyng/context-hub, 14k stars) and Doc Sync (JetBrains/ideavim, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Documentation?

HezaoHezao (a GitHub user) maintains it in HezaoHezao/poirot, which has 250 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on July 28, 2026.

Source: HezaoHezao/poirot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.