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 saajunaid/caddis-plugin --skill refactoringgit clone --depth 1 https://github.com/saajunaid/caddis-pluginWrote 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/saajunaid/caddis-plugin/refactoring)<a href="https://agentmods.dev/skills/saajunaid/caddis-plugin/refactoring"><img src="https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/refactoring/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/saajunaid/caddis-plugin/refactoring"><img src="https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/refactoring.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.00030 | $0.02923 |
| Opus 5.5 | $0.00012 | $0.01169 |
| Sonnet 5.5 | $0.00006 | $0.00585 |
| Haiku 4.5 | $0.00003 | $0.00292 |
Grade A, and why
refactoring 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 — 490 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactoring Skill
Systematically refactor code to improve quality while preserving functionality.
Trigger
Activate when:
- User asks to "refactor" or "clean up" code
- Code review identifies structural issues
- User wants to improve maintainability
- Technical debt needs to be addressed
Refactoring Principles
- Never change behavior during refactoring
- Small steps - one change at a time
- Tests first - ensure coverage before changing
- Commit often - after each successful refactoring
- One thing at a time - don't mix refactoring with feature changes
When NOT to Refactor
- Code that works and won't change again (if it ain't broke...)
- Critical production code without tests (add tests first)
- When under a tight deadline (schedule it for later)
- "Just because" - always have a clear purpose
Phase 1: Assessment
Objectives
- Understand current code structure
- Identify refactoring opportunities
- Assess test coverage
Actions
-
Read and understand the code
- What does this code do?
- What are the inputs/outputs?
- Where are the dependencies?
-
Identify code smells
Smell Signs Refactoring Long Method >20 lines Extract Method Large Class >200 lines, multiple concerns Extract Class Duplicated Code Same logic in multiple places Extract Method/Class Long Parameter List >3-4 parameters Parameter Object Deep Nesting >3 levels of indentation Guard Clauses, Extract Method Magic Numbers Hardcoded values Named Constants Dead Code Unused functions/variables Delete Feature Envy Method uses another class's data more Move Method -
Check test coverage
pytest --cov=module_name --cov-report=term-missing
Output
## Refactoring Assessment
### Current State
- File: [filename]
- Lines: [count]
- Test Coverage: [percentage]
### Code Smells Identified
1. [Smell]: [Location] - [Description]
2. [Smell]: [Location] - [Description]
### Recommended Refactorings
1. [Refactoring]: [Expected improvement]
2. [Refactoring]: [Expected improvement]
### Risk Assessment
- Test coverage: [adequate/needs improvement]
- Complexity: [low/medium/high]
- Dependencies: [list affected areas]
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 Changed · +3 lines 654c8eb32b3c
- 2mo ago First seen · 487 lines · 30 tokens per session scan A 7ff40d7e2a8c
refactoring is a skill published in the GitHub repository saajunaid/caddis-plugin (0 stars, last pushed 3d ago), licensed MIT. It adds 30 tokens to every session and 2,923 once invoked, about $0.0001 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.
refactoring compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refactoringsaajunaid/caddis-plugin | Skill | 0 | 3d ago | MIT | A | 30 | Claude Code |
| goga-review-planqarium/goga | Skill | 46 | 8d ago | BSD-3-Clause | A | 11 | Claude Code, Codex |
| goga-accept-manifest-reviewqarium/goga | Skill | 46 | 8d ago | BSD-3-Clause | A | 18 | Claude Code, Codex |
| goga-change-manifest-reconcilerqarium/goga | Skill | 46 | 8d ago | BSD-3-Clause | A | 18 | Claude Code, Codex |
| goga-change-validatorqarium/goga | Skill | 46 | 8d ago | BSD-3-Clause | A | 14 | Claude Code, Codex |
| goga-accept-reportqarium/goga | Skill | 46 | 8d ago | BSD-3-Clause | A | 13 | Claude Code, Codex |
| goga-change-usage-reconcilerqarium/goga | Skill | 46 | 8d ago | BSD-3-Clause | A | 19 | Claude Code, Codex |