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 mgiovani/cc-arsenal --skill refactorgit clone --depth 1 https://github.com/mgiovani/cc-arsenalWrote 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/mgiovani/cc-arsenal/refactor)<a href="https://agentmods.dev/skills/mgiovani/cc-arsenal/refactor"><img src="https://agentmods.dev/badge/skills/mgiovani/cc-arsenal/refactor/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/mgiovani/cc-arsenal/refactor"><img src="https://agentmods.dev/badge/skills/mgiovani/cc-arsenal/refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00102 | $0.02481 |
| Opus 5.5 | $0.00041 | $0.00992 |
| Sonnet 5.5 | $0.00020 | $0.00496 |
| Haiku 4.5 | $0.00010 | $0.00248 |
Grade A, and why
refactor 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 22d 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 — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor
Refactor code safely: capture current behavior with characterization tests, then restructure it in small steps, running the full test suite after each one before moving to the next.
Refactoring Goal
$ARGUMENTS
Core Principle: Behavior Preservation
Refactoring changes code structure WITHOUT changing behavior. Every step must be verified against existing tests. If tests break, the refactoring introduced a bug: revert and retry.
Anti-hallucination guidelines
- Read the code first: understand all callers and dependencies before touching anything.
- Run the full test suite before starting and again after every incremental change; results must match.
- Where coverage is thin, capture current behavior in characterization tests before restructuring.
- Change one small, verifiable thing at a time. Never combine steps into a single edit.
- Refactoring changes structure, not behavior: no new features, no bug fixes. Those are separate tasks (
implement-feature,fix-bug), and Phase 0's scope gate below is where this gets enforced, not just stated. - Never claim a structure you haven't verified by reading the actual files.
- When several call sites share logic, consolidate it into one place and delete the copies, rather than wrapping them in a new abstraction.
- Simplifying structure must never remove a validation check or an error/data-loss path, nor a security control or an accessibility branch already in place. Losing any of those counts as a behavior change, not a refactor, so stop and re-scope it separately.
Quality Gates
A Stop hook re-runs the Phase 4 Quality Gates Checklist automatically and blocks completion if any item fails, see the hook prompt above for the exact wording.
Task Management
Whether the ceremony below (formal task chain, subagent fan-out) is worth it depends on blast radius, not on whether the skill fired.
The Phase 0 scope gate below always runs, even on the skip path: it's a five-second scan of the request, not ceremony.
What ships with it
4 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.
- 22d ago Changed · -1 lines d568186eda22
- 1mo ago Changed · +4 lines 61750c6f7915
- 1mo ago Changed · +2 lines 3ed024cd53c0
- 1mo ago First seen · 159 lines · 102 tokens per session scan A 21263a9384c1
refactor is a skill published in the GitHub repository mgiovani/cc-arsenal (8 stars, last pushed 2d ago), licensed MIT. It adds 102 tokens to every session and 2,481 once invoked, about $0.0004 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
testing-anti-patterns
Reviews test code to identify and fix common testing anti-patterns including flaky tests, over-mocking, brittle assertions, test interdependency, and hidden test logic. Flags bad patterns, explains the specific defect, and provides corrected implementations. Use when reviewing test code, debugging intermittent or…
structured-code-review
Performs a structured five-stage code review covering requirements compliance, correctness, code quality, testing, and security/performance. Each stage uses targeted checklists and categorized feedback (Blocker/Major/Minor/Nit) with actionable suggestions and rationale. Use when the user asks for code review, PR…
junie
Delegate tasks or get a second opinion from Junie CLI. Infers mode (delegation vs validation) from prompt context. Detects available models at runtime via the CLI. Use when cross-validating code, plans, or architecture with Junie CLI, or offloading work to it. Do not use for tasks that do not benefit from cross-model…
find-simplifications
Use for a periodic repo-wide sweep of qwen-code for accumulated excess surface — dead components and files, orphaned locale keys, exports nothing consumes, added-then-removed scaffolding — filing candidates on a tracking issue and landing only what a maintainer has said yes to. Repo-wide and evidence-first; every…
swarm-pr-review
Run a graph-guided, tool-augmented PR review using context packing, parallel exploration, mandatory repository-agnostic risk-family coverage with dispatch scaled to diff size and risk, independent reviewer validation, critic challenge, and metrics writeback. Use for deep pull request review with low false-positive…
agent-debug-ci
Investigate failed scheduled or nightly GitHub Actions runs on the default branch, determine whether the failure is reproducible and repository-owned, implement the smallest evidence-backed fix, validate it, and open a pull request. Use when a failed nightly CI event starts an agent, or when the standard CI or…