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 agentmods add skills/changoo89/claude-pilot/code-cleanupnpx skills add changoo89/claude-pilot --skill code-cleanupgit clone --depth 1 https://github.com/changoo89/claude-pilotWrote 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/changoo89/claude-pilot/code-cleanup)<a href="https://agentmods.dev/skills/changoo89/claude-pilot/code-cleanup"><img src="https://agentmods.dev/badge/skills/changoo89/claude-pilot/code-cleanup.svg" alt="Measured on agentmods" 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 | $0.00031 | $0.01456 |
| Opus 5 | $0.00015 | $0.00728 |
| Sonnet 5 | $0.00006 | $0.00291 |
| Haiku 4.5 | $0.00003 | $0.00146 |
Grade A, and why
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 4d 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 — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SKILL: Code Cleanup
Purpose: Dead code detection and removal using knip (recommended) or ESLint/TypeScript fallback Target: Coder Agent, cleanup commands
⚠️ EXECUTION DIRECTIVE
IMPORTANT: Execute ALL steps IMMEDIATELY and AUTOMATICALLY.
Core Philosophy: Auto-apply Low/Medium risk | High-risk: User confirmation | Safe flags: --dry-run, --apply | Verification after each batch
Quick Start
When to Use This Skill
- Remove unused import statements
- Detect and delete dead files (zero references)
- Clean up codebase after refactoring
Usage
MODE="${1:-files}" # imports|files|all
SCOPE="${2:-repo}" # repo|path=...
.cleanup-ignore Support
Create .cleanup-ignore file in project root:
# Core infrastructure
**/auth/**
**/database/**
**/*.config.*
# Entry points
**/index.ts
**/main.ts
# Generated files
**/generated/**
**/*.gen.ts
Loading order: Read .cleanup-ignore → Apply patterns → Exclude protected files
Step 1: Detect Dead Code
Detection Tools
Recommended: knip
npx knip # Full analysis
npx knip --reporter compact # Concise output
npx knip --fix # Auto-fix safe issues
Fallback: Standard tooling
grep -r "import.*from" src/ --include="*.ts" # Unused imports
find src/ -name "*.ts" -exec grep -l "{}" \; # Dead files
Dead File Detection Procedure
EXCLUDE="--glob '!*.test.ts' --glob '!*.spec.ts' --glob '!index.ts'"
rg --files $EXCLUDE src/ | while read file; do
refs=$(rg -c "from.*['\"]$file" src/ || echo 0)
[ "$refs" -eq 0 ] && echo "$file: 0 references"
done
Step 2: Risk Classification (4-Level)
| Risk | File Types | Action |
|---|---|---|
| SAFE | Tests (*.test.*), mocks, fixtures |
auto-remove |
| CAUTION | Utils, helpers, internal modules | auto-remove + prompt |
| WARNING | Components, services, hooks | tests pass first |
| DANGER | Auth, database, config, API routes | require --force |
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 4d ago First seen · 201 lines · 31 tokens per session scan A 6ba0f88cc75b
code-cleanup is a skill published in the GitHub repository changoo89/claude-pilot (20 stars, last pushed 6mo ago), licensed MIT. It adds 31 tokens to every session and 1,456 once invoked, about $0.0002 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-30.
Other skills, from other repositories
securing-cloud-and-supply-chain
云原生与软件供应链安全防御。容器/K8s 加固、Service Mesh、CI/CD 安全、SLSA/SBOM/Sigstore、云 IAM、Secrets 管理、IaC 安全。Use when hardening Kubernetes clusters, auditing CI/CD pipelines, implementing supply chain security, managing cloud IAM, or reviewing IaC code.
automating-devops
DevOps knowledge reference covering Git workflows, testing strategies, DevSecOps, release pipeline orchestration (release.yml, multi-arch images, cosign integration), CI/CD pipelines, database management, observability, and performance optimization. Use when working with Git, CI/CD, release pipelines, ghcr image…
provisioning-infrastructure
Cloud-native infrastructure knowledge reference covering Kubernetes, Helm, Kustomize, Operators, CRDs, GitOps (ArgoCD, Flux), and IaC (Terraform, Pulumi, CDK). Use when provisioning infrastructure, managing clusters, or working with GitOps workflows.
release-automation
Enforce and automate releases in CI so a promotion to main can never silently ship without a version bump. Documents and governs the release gate (block a main promotion that did not bump VERSION past the last vX.Y.Z tag) plus, on the same VERSION tag primitive, the auto-release lanes that already ship in this repo…
github-flow-for-claude-on-web
Complete GitHub workflow for Claude Code on the web. ALL GitHub operations MUST use REST API (never gh CLI). Includes branch naming (claude/-sessionId), push retry logic, PR/issue management via API, and complete workflows. Use for all GitHub interactions in Claude Code web environment.
self-testing
E2E self-testing workflow for vibing.nvim using a separate Neovim instance controlled over RPC. Use when writing or debugging E2E tests, running npm run test:e2e, or executing the 3-try auto-fix rule after implementing a feature. Covers the spawnnviminstance/sendkeys/waitforbuffercontent/cleanupinstance helper API…