document-code

A coding guide for writing clear, consistent documentation in Python, Go, TypeScript, and Terraform. It covers Python docstrings, Go comments, TypeScript JSDoc, and Terraform descriptions.

In plain words
What is it for?
Use it when adding or reviewing documentation, explaining functions and classes, or improving code that lacks clear comments.
Why use it?
It helps developers document public code consistently, including its inputs, outputs, errors, and usage examples.

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/jjmartres/ai-coding-agents/document-code
Any agent
npx skills add jjmartres/ai-coding-agents --skill document-code
Clone the repo
git clone --depth 1 https://github.com/jjmartres/ai-coding-agents

Made for: Claude Code, Codex.

Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,226 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.00088 $0.02226
Opus 5 $0.00044 $0.01113
Sonnet 5 $0.00018 $0.00445
Haiku 4.5 $0.00009 $0.00223

Measured yesterday against content hash 60bb2848f6ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

document-code 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 yesterday.

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.

shared/.ai-agents/skills/document-code/SKILL.md · 362 lines

How it starts

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

Code Documentation Standards

Apply Google Style documentation standards to Python (docstrings), Go (comments), TypeScript (JSDoc), and Terraform (descriptions). Ensures consistent, professional, and comprehensive code documentation across multiple languages.

When to Apply This Skill

Use this skill when:

  • Writing new functions, classes, or packages
  • Reviewing code for documentation quality
  • User requests "document this code" or "add docstrings"
  • User mentions "Google Style" or documentation standards
  • Refactoring code that lacks proper documentation
  • Creating code examples that should be well-documented

Core Principles

  1. Clarity: Documentation should be immediately understandable
  2. Completeness: Document all public APIs, parameters, returns, exceptions
  3. Consistency: Follow language-specific Google Style conventions
  4. Conciseness: Be thorough but avoid redundancy
  5. Examples: Include usage examples for complex functionality

Workflow

1. Detect Language

Identify the programming language:

  • Python: Look for .py files, def, class keywords, type hints
  • Go: Look for .go files, func, type, package keywords
  • TypeScript: Look for .ts / .tsx files, interface, type, export, import keywords
  • Terraform: Look for .tf files, resource, variable, module keywords

2. Apply Appropriate Standard

Read the corresponding reference file:

  • Python: Read references/python_google_style.md for complete docstring standards
  • Go: Read references/go_google_style.md for complete comment standards
  • TypeScript: Read references/typescript_google_style.md for complete JSDoc standards
  • Terraform: Read references/terraform_style.md for complete description standards

3. Document Code Elements

Apply documentation to all appropriate code elements:

Python:

  • Module-level docstrings
  • Class docstrings
  • Method/function docstrings
  • Important variables/constants

Read the full file on GitHub · 362 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 362 lines · 88 tokens per session scan A 60bb2848f6ec

Subscribe to this mod's changes

document-code is a skill published in the GitHub repository jjmartres/ai-coding-agents (43 stars, last pushed 2mo ago), licensed MIT. It adds 88 tokens to every session and 2,226 once invoked, about $0.0004 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

cocowatch

Developer engagement observer — non-blocking, always-on observational layer that tracks Delegation Intensity, Review Depth, and Engagement Zone throughout a session. Summary surfaced at $ship and FULL checkpoints.

Snowflake-Labs/cocoplus · 43 tokens

audit

Eight audit modes (codebase — owns "audit the codebase" — docs/process, performance, threat-model, motion, SEO, debt). Triggers "nuclear review", "whole codebase review", "adversarial audit", "fable audit", "correctness audit", "audit the docs", "doc drift", "process audit", "perf audit", "why is it slow", "bundle…

darkroomengineering/cc-settings · 132 tokens

the-grilling

Use when adversarial brainstorming is needed after reconnaissance — the Proposer, Devils-Advocate, and Synthesizer each run ONE pass (no rounds); the Don is grilled on the IDEA first, one question at a time, then the proposal is attacked.

kucherenko/gangsta · 55 tokens

using-gangsta

Use when starting any conversation — establishes how to find and use Gangsta skills, enforces the 1% invocation rule, maps platform tools, and routes the Don's intent through the Gangsta Agents Family hierarchy.

kucherenko/gangsta · 47 tokens

interrogation-debugging

Use when encountering any bug, test failure, or unexpected behavior — finds the rat in the code through systematic root-cause interrogation before any fix attempts.

kucherenko/gangsta · 35 tokens

handoff

End-of-session save and next-session resume. Triggers "ending session", "wrapping up", "context window", "running out of context", "done for today" (save mode); "continue where we left off", "pick up where", "last session", "previous work", "resume" (resume mode).

darkroomengineering/cc-settings · 69 tokens