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.
npx skills add khasky/awesome-agent-skills --skill awesome-code-cleanupgit clone --depth 1 https://github.com/khasky/awesome-agent-skillsWrote 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.
[](https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-code-cleanup)<a href="https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-code-cleanup"><img src="https://agentmods.dev/badge/skills/khasky/awesome-agent-skills/awesome-code-cleanup/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.
<a href="https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-code-cleanup"><img src="https://agentmods.dev/badge/skills/khasky/awesome-agent-skills/awesome-code-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00166 | $0.06213 |
| Opus 5 | $0.00083 | $0.03106 |
| Sonnet 5 | $0.00033 | $0.01243 |
| Haiku 4.5 | $0.00017 | $0.00621 |
Grade A, and why
awesome-code-cleanup 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Cleanup
Audit and clean every code comment in a repository (or a scoped part of it) so the code follows: comments only when strictly necessary; the code itself is authoritative and self-documenting; kept comments are 1–2 lines where possible. The pass is strictly behavior-preserving — a comment pass that changes behavior is a failed pass.
Every comment gets one of four verdicts:
| Verdict | When | Action |
|---|---|---|
| DELETE | Restates code, narrates flow, tutorial-style, echoes a signature | Remove |
| CONDENSE | Load-bearing but bloated | Compress to 1–2 lines, keep the essence |
| FIX | Stale, misplaced, or contradicts the code | Verify against code, rewrite accurately (or delete) |
| KEEP | Dense gotcha/contract that genuinely needs its length | Leave intact, flag in report |
The FIX class is the highest-value work. Redundant comments are noise; stale comments are lies. A real pass regularly finds comments claiming constants that changed ("10,000 rows" over VOLUME = 2_000), explanations of mechanisms that no longer exist, JSDoc stranded above the wrong function, and references to deleted files. Always verify a suspicious comment against the actual code before rewording it — and never "fix" a comment to say something you haven't confirmed.
Modes
- Comment pass (default) — the phased pipeline below, comments only.
- Audit (read-only) — when the user asks to audit or review without editing: run Phase 0 recon and the Phase 1 analysis, edit nothing, and return findings instead of diffs. For each finding report: file:line, the smell, the suggested change, risk level (low / medium / high), recommendation strength (Strong / Worth exploring / Speculative — be honest about the last one), whether it can be fixed behavior-preservingly, and the verification command that would prove it. Shape each as
Symptom → Consequence → Remedy— a smell with no concrete consequence and no remedy is noise, not a finding; where a named principle backs it (Fowler smell, Ousterhout shallow module, Hyrum's Law), cite it. Rank findings by impact and safety, and end with a "do not do" list — changes that look tempting but would touch public API or behavior. Cover comments plus the refactor-mode smells below. - Refactor (on explicit request) — extends the pass beyond comments to the code smells of AI-generated or vibe-coded files (see the REFACTOR MODE rulebook). Same phases, same NEVER list, same regression gate; every structural edit is held to the rename bar — provably behavior-preserving or not done.
- Detection (on request) — when the user asks to find dead/unused code or logical inconsistencies ("find dead code", "найди мёртвый код", "неиспользуемый код", "логические несоответствия"): the DETECTION MODE pipeline — mechanical sweeps, evidence-contract subagents, execute-to-verify. Findings first; fixes only for the findings the user picks.
- Execution (given a findings list) — the user arrives with a report from
awesome-slop-audit,awesome-architecture-audit, or a reviewer, and wants it applied. The list replaces Phase 1's own analysis; everything else holds — Phase 0 recon still runs (the report may predate the current tree), the rulebook still governs each edit, the FIX-PASS TRAPS below apply per finding, and Phase 2 still verifies. Restate what is in and out of scope before the first edit: a user who picked three categories gets three categories, and the lies found in the others are re-listed unfixed, never quietly swept in.
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.
- today Changed · +2 lines 640b064a0be2
- 2d ago Changed · +9 lines · -85 tokens per session 8a8a99f13e2f
- 4d ago Changed · +15 lines e13faa84f88d
- 9d ago First seen · 134 lines · 251 tokens per session scan A 587daaa2b1a5
awesome-code-cleanup is a skill published in the GitHub repository khasky/awesome-agent-skills (8 stars, last pushed today), licensed MIT. It adds 166 tokens to every session and 6,213 once invoked, about $0.0008 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.
Other skills, from other repositories
code-review-and-quality
Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.
doubt-driven-development
Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production, security-sensitive logic, irreversible operations), or any time a confident output would be cheaper to verify now…
code-simplification
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.
chinese-code-review
A Chinese-language code-review communication guide with templates and severity levels for review comments.
receiving-code-review
A guide for handling code-review feedback carefully. Code review is the process of checking proposed changes before they are accepted into a project.
requesting-code-review
A code-review procedure for checking completed work against its requirements before it spreads or is merged. A code reviewer is a person or agent who looks for defects and missing parts.