doc-rot

doc-rot is a skill for Claude Code from jerseycheese/agent-skills. It costs 66 tokens per session (1,559 once invoked), scanned A, original, MIT.

A documentation-checking workflow that looks for Markdown files, comments, docstrings, and commented-out code that no longer match the codebase.

In plain words
What is it for?
Use it to find and update stale documentation, remove obsolete comments, and identify uncertain cases for review.
Why use it?
It reduces confusion caused by instructions, examples, paths, or API names that became wrong as the code changed.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the workflow-skills plugin — 36 skills shipped together

Good fit Use it to find and update stale documentation, remove obsolete comments, and identify uncertain cases for review.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jerseycheese/agent-skills/doc-rot
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 jerseycheese/agent-skills --skill doc-rot
Clone the repo
git clone --depth 1 https://github.com/jerseycheese/agent-skills

Made for: Claude Code.

Or install workflow-skills, the plugin that ships this one along with the rest of its 36 skills.

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 doc-rot

README.md
[![agentmods](https://agentmods.dev/badge/skills/jerseycheese/agent-skills/doc-rot/github.svg)](https://agentmods.dev/skills/jerseycheese/agent-skills/doc-rot)
Your own site
<a href="https://agentmods.dev/skills/jerseycheese/agent-skills/doc-rot"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/doc-rot/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 doc-rot

Your own site · 80×15
<a href="https://agentmods.dev/skills/jerseycheese/agent-skills/doc-rot"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/doc-rot.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,559 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.00066 $0.01559
Opus 5.5 $0.00026 $0.00624
Sonnet 5.5 $0.00013 $0.00312
Haiku 4.5 $0.00007 $0.00156

Measured 1mo ago against content hash 1aa5ef38bf1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

doc-rot 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.

skills/doc-rot/SKILL.md · 99 lines

How it starts

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

Doc Rot

Documentation lies as the code moves on. This skill finds the lies and fixes them — across *.md files, inline comments, docstrings, and commented-out code. It's the docs counterpart to dead-code-cleanup, and it enforces the comment hygiene rules in the user's CLAUDE.md ("explain WHY not WHAT"; "one canon version per file"; "update existing docs, don't proactively create new ones").

For a broader sweep of dead variables, functions, files, or tests (not just docs and comments), use dead-code-cleanup instead.

The core discipline: a doc isn't stale because it looks old — it's stale because it contradicts the code. Ground every call against the actual codebase before flagging it. A "removed" symbol might just be renamed; a "broken" path might live elsewhere now.

Pre-flight

Per the user's git workflow: git fetch && git status, confirm you're on the right base branch (develop if it exists, else main) and up to date. Then scope the doc set — don't boil the ocean. List what's in range (a directory, the README, the files a recent change touched) and confirm before sweeping a whole repo.

What counts as rot

Doc files (*.md)

  • References to things that no longer exist — files/paths, npm scripts, CLI flags, config keys, env vars, API/function names. Verify each against the code before flagging.
  • Stale setup/usage steps — install commands, toolchain versions, ports, or workflows the code has moved past.
  • Code examples that wouldn't run — using removed or renamed APIs, old signatures, deleted imports.
  • Dead links — broken internal anchors and relative file links (high confidence); external links (flag, don't chase every one).
  • Superseded / duplicate docs — two docs covering the same thing, or a doc describing a feature that's gone. "One canon version per file" — pick the canonical one, fold or remove the rest.

Comments & docstrings

  • Contradicts the code below it — the comment says one thing, the code does another. Highest-value find; almost always a real bug-in-waiting.
  • Docstring drift — @param/@returns/documented args that don't match the actual signature.
  • Anti-pattern comments (per CLAUDE.md): archaeological ("Extracted from X to reduce complexity"), motion-tracking ("Moved from Y on DATE"), obvious ("increment counter" above counter += 1).
  • Stale TODO/FIXME — referencing a closed issue or a condition that's already resolved.

Read the full file on GitHub · 99 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 Changed 1aa5ef38bf1d
  2. 1mo ago Changed · -1 lines · -73 tokens per session 358612add41b
  3. 3mo ago First seen · 100 lines · 139 tokens per session scan A e152948e091a

Subscribe to this mod's changes

doc-rot is a skill published in the GitHub repository jerseycheese/agent-skills (4 stars, last pushed 4d ago), licensed MIT. It adds 66 tokens to every session and 1,559 once invoked, about $0.0003 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-31.

Related

doc-rot compared with skills from other repositories

doc-rot next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
doc-rotjerseycheese/agent-skillsSkill44d agoMITA66Claude Code
local-placesgeezerrrr/motiveSkill1201mo agoMITA22Claude Code, Codex
market-skillYasuui/ystackSkill12mo agoMITA81Claude Code, Codex
nano-banana-skillYasuui/ystackSkill12mo agoMITA71Claude Code, Codex
copy-skillYasuui/ystackSkill12mo agoMITA72Claude Code, Codex
suno-musicAceDataCloud/SkillsSkill183d agononeA56Claude Code
capability-spotlight-videoAceDataCloud/SkillsSkill183d agononeA63Claude Code, Codex