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 pjt222/agent-almanac --skill clean-codebasegit clone --depth 1 https://github.com/pjt222/agent-almanacWrote 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/pjt222/agent-almanac/clean-codebase)<a href="https://agentmods.dev/skills/pjt222/agent-almanac/clean-codebase"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/clean-codebase/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/pjt222/agent-almanac/clean-codebase"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/clean-codebase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Rogue Agent · line 173 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.00068 | $0.02183 |
| Opus 5.5 | $0.00027 | $0.00873 |
| Sonnet 5.5 | $0.00014 | $0.00437 |
| Haiku 4.5 | $0.00007 | $0.00218 |
Grade A, and why
clean-codebase 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.
How it starts
The opening of the file, as written. The whole thing — 292 lines — stays where its author put it; the contents beside it link to each section on GitHub.
clean-codebase
When to Use
Use this skill when a codebase has accumulated hygiene debt:
- Lint warnings have piled up during rapid development
- Unused imports and variables clutter files
- Dead code paths exist but were never removed
- Formatting is inconsistent across files
- Static analysis tools report fixable issues
Do NOT use for architectural refactoring, bug fixes, or business logic changes. This skill focuses purely on hygiene and automated cleanup.
Inputs
| Parameter | Type | Required | Description |
|---|---|---|---|
codebase_path |
string | Yes | Absolute path to codebase root |
language |
string | Yes | Primary language (js, python, r, rust, etc.) |
cleanup_mode |
enum | No | safe (default) or aggressive |
run_tests |
boolean | No | Run test suite after cleanup (default: true) |
backup |
boolean | No | Create backup before deletion (default: true) |
Procedure
Step 1: Pre-Cleanup Assessment
Measure the current state to quantify improvements later.
# Count lint warnings by severity
lint_tool --format json > lint_before.json
# Count lines of code
cloc . --json > cloc_before.json
# List unused symbols (language-dependent)
# JavaScript/TypeScript: ts-prune or depcheck
# Python: vulture
# R: lintr unused function checks
Got: Baseline metrics saved to lint_before.json and cloc_before.json
If fail: If lint tool not found, skip automated fixes and focus on manual review
Step 2: Fix Automated Lint Warnings
Apply safe automated fixes (spacing, quotes, semicolons, trailing whitespace).
JavaScript/TypeScript:
eslint --fix .
prettier --write .
Python:
black .
isort .
ruff check --fix .
R:
Rscript -e "styler::style_dir('.')"
Rust:
cargo fmt
cargo clippy --fix --allow-dirty
Got: All safe lint warnings resolved; files formatted consistently
If fail: If automated fixes introduce test failures, revert changes and escalate
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.
- 1mo ago First seen · 292 lines · 68 tokens per session scan A 85851c3b61cb
clean-codebase is a skill published in the GitHub repository pjt222/agent-almanac (39 stars, last pushed yesterday), licensed MIT. It adds 68 tokens to every session and 2,183 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-09-03.
Other skills, from other repositories
triage-issue
Verify an issue, persisted audit finding, or unresolved review finding against current code, classify it, and write only the contracted forge/ledger outcome. Supports independent batches and an immediate-fix review-finding route. Triggers: "triage-issue", "triage issue N", "triage this finding", "is this trigger met".
triage-issue-reports
Triage Slack issue reports with one thread-only verdict, evidence review, cause-aware routing, tracker dedupe, and fail-closed ticket creation. Use only from the configured Benny triage automation.
workers-profiling
Profile or debug CPU usage and memory allocation in deployed Cloudflare Workers and Durable Objects. Then use this information to optimize your code.
cocoreview
CocoReview — structured code review with six-severity findings vocabulary, progressive disclosure architecture, and universal anti-pattern baseline. Invoked via $review [file] [--complexity] [--security] [--architecture] [--language ].
stall-reset
Reset CocoStall counters after an operator-approved recovery.
stall-status
Report current CocoStall no-progress and loop state.