code-documentation

code-documentation is a skill for Claude Code, Codex from HezaoHezao/poirot. It costs 16 tokens per session (1,183 once invoked), scanned A, original, MIT.

A documentation guide for creating README files, API references, architecture notes, and developer guides from software projects. It starts by examining the codebase, its tools, structure, entry points, and existing documentation.

In plain words
What is it for?
Documenting codebases, libraries, APIs, project setup, architecture, usage instructions, migrations, and changes.
Why use it?
It helps produce documentation that reflects the actual project instead of relying on guesses. It also provides a consistent way to cover the parts developers need to understand.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hezaohezao/poirot/code-documentation
Any agent
npx skills add HezaoHezao/poirot --skill code-documentation
Clone the repo
git clone --depth 1 https://github.com/HezaoHezao/poirot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-documentation

README.md
[![agentmods](https://agentmods.dev/badge/skills/hezaohezao/poirot/code-documentation.svg)](https://agentmods.dev/skills/hezaohezao/poirot/code-documentation)
Your own site
<a href="https://agentmods.dev/skills/hezaohezao/poirot/code-documentation"><img src="https://agentmods.dev/badge/skills/hezaohezao/poirot/code-documentation.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,183 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.01183
Opus 5 $0.00008 $0.00592
Sonnet 5 $0.00003 $0.00237
Haiku 4.5 $0.00002 $0.00118

Measured 4d ago against content hash cd057241fb0b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-documentation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

poirot/backend/agents/skill/builtin_skills/productivity/code-documentation/SKILL.md · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Read the full file on GitHub · 174 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 174 lines · 16 tokens per session scan A cd057241fb0b

Subscribe to this mod's changes

code-documentation is a skill published in the GitHub repository HezaoHezao/poirot (213 stars, last pushed 1mo ago), licensed MIT. It adds 16 tokens to every session and 1,183 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

commit

Atomic git commit with conventional message. Use when the user says "commit", "save my changes", "commit this", or wants to create a git commit. Stages specific files, writes a conventional commit message with body explaining non-obvious decisions. Never uses git add -A.

congchuanling-dot/Cohort · 59 tokens

python-run

Run and debug Python scripts in the project. Use when the user says "run python", "execute this script", "debug this py file", or wants to run/modify a .py file. Handles dependency checks, linting, execution, and error analysis.

congchuanling-dot/Cohort · 56 tokens

hqe

Comprehensive codebase health auditing, remediation, and verification skill based on the canonical HQE Protocol v5.0.0.

spearchucker667/Skill-HQE · 29 tokens

reskin

Author a NEW skin for the reskinnable-demo app. A skin is a self-contained domain plugin under src/skins/ / that implements the frozen Skin contract (src/shell/skin-contract.ts) to swap the app's entire experience — brand, theme, layout, pages, tools, data, and agent — as a live sales demo. Use when the user says "add…

CopilotKit/CopilotKit · 154 tokens

setup-slack-channel

Use for the PROVIDER half of getting a locally running CopilotKit Channels agent to answer in Slack, when no Slack app exists yet — setting up a Channels bot in Slack for the first time, creating the Slack app and its tokens, attaching it to a managed Intelligence Channel, or when a Channel reports setuprequired, sits…

CopilotKit/CopilotKit · 206 tokens

copilotkit-integrations

Use when wiring an external agent framework (LangGraph, CrewAI, PydanticAI, Mastra, ADK, LlamaIndex, Agno, Strands, Microsoft Agent Framework, or others) into a CopilotKit application via the AG-UI protocol.

CopilotKit/CopilotKit · 61 tokens