derot

derot is a command for Claude Code from ANcpLua/ancplua-claude-plugins. It costs 52 tokens per session (537 once invoked), scanned A, original, MIT.

A command that checks a repository for “rot”: comments, documentation, CI configuration, version information, or dependency choices that contradict the actual code and build setup.

In plain words
What is it for?
Use it across the whole repository or a selected path to inspect source, Markdown, GitHub workflows, build files, versions, and dependency declarations; larger repositories can be split among read-only scouts.
Why use it?
It helps keep repository guidance trustworthy instead of silently preserving old names, versions, workflows, or explanations. Findings are verified against the code and configuration before changes are made.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Part of the derot plugin — 1 skill, 2 commands, 3 agents shipped together

Good fit Use it across the whole repository or a selected path to inspect source, Markdown, GitHub workflows, build files, versions, and dependency declarations; larger repositories can be split among read-only scouts.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ancplua/ancplua-claude-plugins/derot
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.

Clone the repo
git clone --depth 1 https://github.com/ANcpLua/ancplua-claude-plugins

Made for: Claude Code.

Or install derot, the plugin that ships this one along with the rest of its 1 skill, 2 commands, 3 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 derot

README.md
[![agentmods](https://agentmods.dev/badge/commands/ancplua/ancplua-claude-plugins/derot.svg)](https://agentmods.dev/commands/ancplua/ancplua-claude-plugins/derot)
Your own site
<a href="https://agentmods.dev/commands/ancplua/ancplua-claude-plugins/derot"><img src="https://agentmods.dev/badge/commands/ancplua/ancplua-claude-plugins/derot.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 537 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.00052 $0.00537
Opus 5 $0.00026 $0.00269
Sonnet 5 $0.00010 $0.00107
Haiku 4.5 $0.00005 $0.00054

Measured 7d ago against content hash e8861ecce44e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

derot 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 7d 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/derot/commands/derot.md · 19 lines

What it actually says

Run a derot pass: find and fix rot — every place this repo's stated intent (comments, docs, CI infra, versions, dependency choices) has drifted from what the code/build actually is — without deleting knowledge that still holds.

Scope: $ARGUMENTS (empty → the whole repo; prioritise src/, .github/, *.md, build/config files).

Use the derot skill for the full methodology and the five rot dimensions. The pass:

  1. Plan. Decide the scope; split it into areas (by directory / file-type).
  2. Scout — parallel, read-only. For a non-trivial repo, fan out one rot-scout per area (Agent tool, or a Workflow when there are many areas — scouts are independent and read-only, so they parallelise cleanly). Each scout VERIFIES every candidate against ground truth before reporting it (open the referenced code; check Version.props / Directory.Packages.props / global.json for version claims; grep for symbol/ID/file existence; read the code under the comment). For dimension 5, dispatch the dep-analyst.
  3. Synthesize. Collect findings into one ordered apply-list. Drop unverified; keep confirmed-rot, correct-keep-explanation, obsolete-delete. Sanity-check each against its stated evidence.
  4. Apply. YOU — not the scouts — apply the verified edits. Correct beats delete: keep a useful why, fix only the wrong facts.
  5. Verify. Build + test; for YAML/props-only changes, validate the file. Never claim done without running it.
  6. Report + commit. Summarize each change with its one-line root-cause justification, plus a separate flagged, not changed list (secrets to delete, unverified candidates, dependency calls needing a human). Commit + push per the repo's hygiene conventions.

The discipline is non-negotiable (see the skill): never "fix" a comment to match a wrong assumption — fix whichever of {comment, code} is actually wrong, and chase it through every caller. Never assert a dependency succession from memory — cite the source or report it as unverified.

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. 7d ago First seen · 19 lines · 52 tokens per session scan A e8861ecce44e

Subscribe to this mod's changes

derot is a command published in the GitHub repository ANcpLua/ancplua-claude-plugins (5 stars, last pushed 20d ago), licensed MIT. It adds 52 tokens to every session and 537 once invoked, about $0.0003 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-31.