auto-comment

A code-comment cleanup and documentation workflow that compares comments with the behavior of the code. It handles stale, missing, inconsistent, and overly detailed comments while preserving comments that explain important constraints.

In plain words
What is it for?
Use it to audit comments incrementally, document public APIs, establish project commenting rules, and record progress across source, legacy, generated, or vendor code.
Why use it?
It helps remove comments that describe behavior the code no longer has and makes useful documentation easier to recognize. It also keeps track of areas already reviewed and files that should not be edited.

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/mr-tbot/auto-everything/auto-comment
Any agent
npx skills add mr-tbot/Auto-Everything --skill auto-comment
Clone the repo
git clone --depth 1 https://github.com/mr-tbot/Auto-Everything

Made for: Claude Code, Codex.

Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,466 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.00087 $0.02466
Opus 5 $0.00044 $0.01233
Sonnet 5 $0.00017 $0.00493
Haiku 4.5 $0.00009 $0.00247

Measured 3d ago against content hash 41bbfe128bff, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

auto-comment 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 3d 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/auto-comment/SKILL.md · 203 lines

How it starts

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

/auto-comment

Bring the codebase's comments into line with what the code actually does — incrementally, resumably, and without touching the comments that are load-bearing.

The failure this exists for: successive passes by different hands and different models. One adds a comment to every line, one strips comments as noise, one writes none. What is left is a codebase where comment density signals nothing about complexity and half the comments describe code that has since changed.

A comment that lies is worse than no comment, because it is trusted. Stale comments are the primary target of this skill; missing ones are secondary.

Step 1 — Read Your Own State

State lives in .agent/comment-state.json (create it if absent, and make sure it is gitignored or committed deliberately — either is fine, but decide):

{
  "last_run": "2026-08-17T14:22:05Z",
  "last_commit": "f932834…",
  "conventions": { "…": "what was established in step 2" },
  "swept": ["src/core/", "src/api/"],
  "remaining": ["src/legacy/", "src/vendor-shim/"],
  "deliberate_skips": { "src/generated/": "codegen output, never edit" }
}

On every run:

  1. No state file → this is a first run. Go to Step 2 and establish conventions.
  2. State exists → compute what changed since last_commit:
git diff --name-only <last_commit>..HEAD
git log --oneline <last_commit>..HEAD | head -20

Then work in this order:

  • Changed files first. Code that moved is where comments went stale. This is the highest-value work and it is what "keep comments in line with the codebase" actually means.
  • Then the backlog — the next slice of remaining, so an untouched corner eventually gets swept.
  • Update state at the end of every run, including a partial one. A run that does not update state has broken the resumability that justifies the skill.

Report at the start: when you last ran, how many commits ago, and what you are covering this run.

Step 2 — Establish The Convention, Do Not Impose One

Read the full file on GitHub · 203 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. 3d ago First seen · 203 lines · 87 tokens per session scan A 41bbfe128bff

Subscribe to this mod's changes

auto-comment is a skill published in the GitHub repository mr-tbot/Auto-Everything (5 stars, last pushed 8d ago), licensed MIT. It adds 87 tokens to every session and 2,466 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-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens