Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add radumarias/xorio-claude-plugin/plugin install xorioWrote 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/radumarias/xorio-claude-plugin/cleanup-code)<a href="https://agentmods.dev/skills/radumarias/xorio-claude-plugin/cleanup-code"><img src="https://agentmods.dev/badge/skills/radumarias/xorio-claude-plugin/cleanup-code/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/radumarias/xorio-claude-plugin/cleanup-code"><img src="https://agentmods.dev/badge/skills/radumarias/xorio-claude-plugin/cleanup-code.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.00066 | $0.00979 |
| Opus 5.5 | $0.00026 | $0.00392 |
| Sonnet 5.5 | $0.00013 | $0.00196 |
| Haiku 4.5 | $0.00007 | $0.00098 |
Grade A, and why
cleanup-code 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 — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Cleanup
Perform cleanup-focused analysis and refactoring of the target code.
Step 1: Detect Language
From $ARGUMENTS (target path) or git diff HEAD, determine which languages are in scope:
.rsfiles orCargo.toml→ Rust.ts/.tsxfiles orpackage.json→ TypeScript.pyfiles orpyproject.toml/setup.py→ Python
Step 2: Load Standards
Read ONLY the matching standards files from references/ (relative to SKILL.md):
- Rust →
references/standards-rust.md - TypeScript →
references/standards-typescript.md - Python →
references/standards-python.md
Also read ${CLAUDE_PLUGIN_ROOT}/rules/planning.md for design principles.
Step 3: Cleanup Analysis
Review the target code looking for cleanup opportunities. Think like a PR reviewer focused on code quality.
Focus areas (all languages):
- Dead code and unused imports
- Code duplication (DRY violations)
- Files exceeding 800 lines — split them; use
code-simplifierandpr-review-toolkitplugins - Overly complex functions (candidates for simplification)
- Law of Demeter violations (excessive chaining, inappropriate coupling)
- YAGNI violations (unused abstractions, over-engineering)
Language-specific focus (from loaded standards):
- Apply the error handling, naming, and organization rules from the loaded standards file
- Check for deprecated API usage per the standards
Step 4: Relationship Mapping
Use ast-grep for structural pattern matching first, then serena's symbolic tools (find_symbol, find_referencing_symbols, get_symbols_overview) to understand code relationships before proposing changes. Identify methods that can be consolidated and reused rather than duplicated.
Step 5: Refactoring Plan
Generate a structured refactoring plan following the design principles from planning.md. Prioritize changes by impact and risk. Group related changes for atomic commits.
Step 6: Review Gate
Present the refactoring plan for approval. Clearly identify any breaking changes or risks.
What ships with it
3 files 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.
- 1mo ago First seen · 115 lines · 66 tokens per session scan A 50a213af5af5
cleanup-code is a skill published in the GitHub repository radumarias/xorio-claude-plugin (3 stars, last pushed 6d ago), licensed MIT. It adds 66 tokens to every session and 979 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-08-31.
Other skills, from other repositories
sync-model-processor
Reviews changes to Chromium Sync model internals in components/sync/model/, including ClientTagBasedDataTypeProcessor, ClientTagBasedRemoteUpdateHandler, ProcessorEntity, ProcessorEntityMetadata, and ProcessorEntityTracker. Use when modifying or reviewing processor state transitions, entity metadata tracking, conflict…
adversarial-reviewer
Stress-test a code change for concrete correctness defects, unsafe assumptions, and failure modes. Use when the user explicitly asks for an adversarial review, a deep bug hunt, or to tear a change apart, or to check your own change before submitting it. Do not use for ordinary review, style feedback, or general…
gsd-ns-review
Invoke this Pi skill with /skill:gsd-ns-review.
gitnexus
A code-graph analysis add-on for examining an existing codebase, including symbols, call paths, execution flows, and effects across repositories. It can query GitNexus through its command-line or MCP interfaces.
issue
Use when starting a chain from a GitHub issue — turning an issue URL or number into a triaged, planned, dispatched, and reviewed pull request. Classifies the thread (bug → root-cause discipline, feature → plan chain, question → drafted reply), synthesizes a spec from the issue's own acceptance criteria, then runs the…
cleanup-code-inspections
Reduce technical debt and improve code quality by systematically resolving static analysis warnings.