document-code

document-code is a skill for Claude Code, Codex from jjmartres/ai-coding-agents. It costs 88 tokens per session (2,530 once invoked), scanned A, original, MIT.

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

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding or reviewing documentation, explaining functions and classes, or improving code that lacks clear comments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jjmartres/ai-coding-agents/document-code
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.

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.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jjmartres/ai-coding-agents/document-code/github.svg)](https://agentmods.dev/skills/jjmartres/ai-coding-agents/document-code)
Your own site
<a href="https://agentmods.dev/skills/jjmartres/ai-coding-agents/document-code"><img src="https://agentmods.dev/badge/skills/jjmartres/ai-coding-agents/document-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for document-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/jjmartres/ai-coding-agents/document-code"><img src="https://agentmods.dev/badge/skills/jjmartres/ai-coding-agents/document-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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,530 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00088 $0.02530
Opus 5.5 $0.00035 $0.01012
Sonnet 5.5 $0.00018 $0.00506
Haiku 4.5 $0.00009 $0.00253

Measured 2mo ago against content hash 8c05aba56476, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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.

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

How it starts

The opening of the file, as written. The whole thing — 398 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 · 398 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. 2mo ago Changed · +36 lines 8c05aba56476
  2. 3mo ago 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 (48 stars, last pushed 1mo ago), licensed MIT. It adds 88 tokens to every session and 2,530 once invoked, about $0.0004 per session on Opus 5.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

document-code compared with skills from other repositories

document-code next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
document-codejjmartres/ai-coding-agentsSkill481mo agoMITA88Claude Code, Codex
coding-guidance-pythonn-n-code/n-n-code-skillsSkill429d agoMITA53Claude Code, Codex
effect-v4ComposioHQ/composioSkill31ktodayMITA159Claude Code, Codex
pn-python-scaffoldingperniemann/pnCoreSkill0todayMITA51Cursor
coding-guidance-gon-n-code/n-n-code-skillsSkill429d agoMITA68Claude Code, Codex
coding-guidance-qtn-n-code/n-n-code-skillsSkill429d agoMITA67Claude Code, Codex
coding-guidance-cppn-n-code/n-n-code-skillsSkill429d agoMITA72Claude Code, Codex