document-code

document-code is a skill for Claude Code from hoblin/claude-ruby-marketplace. It costs 147 tokens per session (3,830 once invoked), scanned A, original, MIT.

A documentation skill for deciding whether comments belong in code and for writing or revising comments, docstrings, and YARD blocks. It covers Ruby, YAML, Dockerfiles, shell scripts, tests, and configuration.

In plain words
What is it for?
Use it before adding, deleting, or changing code documentation, especially after the implementation is complete.
Why use it?
It helps prevent comments that merely repeat the code or describe unfinished decisions, while keeping useful documentation for published interfaces.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rpi plugin — 13 skills, 12 agents shipped together

Good fit Use it before adding, deleting, or changing code documentation, especially after the implementation is complete.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoblin/claude-ruby-marketplace/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 hoblin/claude-ruby-marketplace --skill document-code
Clone the repo
git clone --depth 1 https://github.com/hoblin/claude-ruby-marketplace

Made for: Claude Code.

Or install rpi, the plugin that ships this one along with the rest of its 13 skills, 12 agents.

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/hoblin/claude-ruby-marketplace/document-code/github.svg)](https://agentmods.dev/skills/hoblin/claude-ruby-marketplace/document-code)
Your own site
<a href="https://agentmods.dev/skills/hoblin/claude-ruby-marketplace/document-code"><img src="https://agentmods.dev/badge/skills/hoblin/claude-ruby-marketplace/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/hoblin/claude-ruby-marketplace/document-code"><img src="https://agentmods.dev/badge/skills/hoblin/claude-ruby-marketplace/document-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,830 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.00147 $0.03830
Opus 5.5 $0.00059 $0.01532
Sonnet 5.5 $0.00029 $0.00766
Haiku 4.5 $0.00015 $0.00383

Measured 1mo ago against content hash a1b21afd4817, 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 1mo 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.

plugins/rpi/skills/document-code/SKILL.md · 250 lines

How it starts

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

A comment is judged only together with the block of code it comments, never on its own. Whether it is needed, what it should say, and whether it should be deleted are decided by reading the two side by side.

Documenting is its own pass

Documentation starts once the code works, and not before. A comment written mid-implementation is written by someone still deciding, so what it captures is the deciding rather than the decision. Write no comments during implementation at all, and the pass that follows has nothing to judge and only something to add.

What you are documenting

Step one: your first output names what you are about to document — Published interface or Implementation. Say it again whenever you move to code of the other kind.

A published interface is code that other people call without reading it: a gem, an engine, a package another team consumes. Its comments are rendered by YARD, RDoc, an IDE hover or ri, away from the source, so they have to stand alone. Application code — app/, a service's lib/ — has almost no published interface: whoever wants to know what a service does opens the service. The answer is not "is the repository public": an internal package another team consumes without reading it is a published interface, and a public repository nobody imports is not.

Two other situations fall outside these rules, because their comments serve a different reader. Code written to teach — a tutorial, a README sample — narrates each line on purpose, and Knuth's literate programming is the extreme of it. Code written to be assessed, such as a take-home exercise, shows the author's reasoning because the reasoning is the deliverable. Neither register belongs in code that ships.

The four kinds of comment

A comment that is none of these four has no reason to exist.

Interface comment — sits at the declaration of a class, module or public method, and describes the abstraction: behaviour, arguments, return value, side effects, exceptions, what the caller must guarantee, and what the thing does not do. Its tags are part of it: @param and @return declare a type, are read by a documentation generator and an IDE hover, and are never accompanied by a sentence restating them. A duck type says more than a class name — [String, #read] states what the method actually requires. Object#blank?, from active_support/core_ext/object/blank.rb:

Read the full file on GitHub · 250 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. 1mo ago First seen · 250 lines · 147 tokens per session scan A a1b21afd4817

Subscribe to this mod's changes

document-code is a skill published in the GitHub repository hoblin/claude-ruby-marketplace (37 stars, last pushed 1mo ago), licensed MIT. It adds 147 tokens to every session and 3,830 once invoked, about $0.0006 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-09-07.

Related

Other skills, from other repositories

deep-debugging

Systematic debugging protocol for bugs that resist quick fixes. Use bisection, hypothesis trees, and scientific method when a bug isn't obvious from the stack trace. Goes beyond bugfix-quick for production-grade root cause analysis.

nguyenthienthanh/aura-frog · 49 tokens

self-healing-orchestrator

Proposes patches for F2 (local-logic) and F3 (local-design) failures. NEVER applies without user approval. Confidence ≥0.7 to propose; below that, escalates raw findings. Counts toward replanbudget. Per-task: max 1; per-session: max 5.

nguyenthienthanh/aura-frog · 69 tokens

test-writer

Write tests with TDD following structured patterns. Ensures consistent AAA structure, proper coverage targets, and framework-specific conventions. Without this skill, tests lack consistent naming, miss coverage targets, and skip anti-pattern checks.

nguyenthienthanh/aura-frog · 47 tokens

monorepo

Detect and navigate monorepos correctly. Use when working with repos containing multiple packages (pnpm/yarn/npm workspaces, Turborepo, Nx, Lerna). Ensures commands run in correct package scope, dependencies are routed properly, and cross-package changes are coordinated.

nguyenthienthanh/aura-frog · 60 tokens

api-designer

Designs RESTful APIs with endpoint naming, versioning strategies (URL path, header-based), pagination (offset and cursor), error response schemas, and OpenAPI conventions. Use when the user asks about REST API design, creating endpoints, URL structure, API versioning, status codes, Swagger, or OpenAPI specs.

nguyenthienthanh/aura-frog · 68 tokens

bugfix-quick

Fast bug fixes with root cause investigation + TDD. Enforces 'no fix without root cause' discipline and verification protocol. Without this skill, fixes are applied at symptoms instead of sources, and bugs return.

nguyenthienthanh/aura-frog · 47 tokens