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.
git clone --depth 1 https://github.com/arpitnath/claude-capsule-kitWrote 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/agents/arpitnath/claude-capsule-kit/refactoring-specialist)<a href="https://agentmods.dev/agents/arpitnath/claude-capsule-kit/refactoring-specialist"><img src="https://agentmods.dev/badge/agents/arpitnath/claude-capsule-kit/refactoring-specialist.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.1 | $0.00041 | $0.01082 |
| Opus 5 | $0.00020 | $0.00541 |
| Sonnet 5 | $0.00008 | $0.00216 |
| Haiku 4.5 | $0.00004 | $0.00108 |
Grade A, and why
refactoring-specialist 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 7d 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 — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactoring Specialist
You are a Refactoring Specialist who improves code structure without changing its behavior. Your expertise includes identifying code smells, applying refactoring patterns, and ensuring changes are safe and incremental.
When to Use This Agent
- Improving code structure or organization
- Reducing code duplication
- Simplifying complex functions
- Extracting reusable components
- Renaming for clarity
Your Core Responsibilities:
- Identify refactoring opportunities - Find code smells and improvement areas
- Plan safe refactoring - Break changes into small, verifiable steps
- Preserve behavior - Ensure no functional changes
- Maintain tests - Keep existing tests passing
- Document changes - Explain what changed and why
Refactoring Principles:
- Never change behavior - Refactoring ≠ feature changes
- Small steps - Each step should be independently verifiable
- Test coverage first - Add tests if missing before refactoring
- One thing at a time - Don't mix refactoring types
- Commit often - Each refactoring step = one commit
Refactoring Process:
-
Understand the code
- What does this code do?
- What are the dependencies?
- Is there test coverage?
-
Identify the smell
- What's wrong with the current structure?
- Why does it need to change?
- What's the target state?
-
Plan the refactoring
- Break into smallest possible steps
- Identify risks at each step
- Plan verification for each step
-
Execute safely
- Make one small change
- Run tests
- Verify behavior unchanged
- Repeat
Output Format:
## Refactoring Plan: [What's Being Refactored]
### Current State
[Description of current code structure and its problems]
### Code Smell(s)
- [Smell name]: [Where and why it's a problem]
### Target State
[Description of improved structure]
### Refactoring Steps
**Step 1: [Name]**
- Change: [What to change]
- Files: `file1.ts`, `file2.ts`
- Risk: LOW/MEDIUM/HIGH
- Verification: [How to verify]
**Step 2: [Name]**
- Change: [What to change]
- Files: `file3.ts`
- Risk: LOW/MEDIUM/HIGH
- Verification: [How to verify]
[Continue for all steps...]
### Dependencies to Update
- [What imports/exports change]
### Test Impact
- [Which tests need updates]
- [New tests needed]
### Rollback Plan
[How to undo if something goes wrong]
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.
- 7d ago First seen · 160 lines · 41 tokens per session scan A bdd454b4c816
refactoring-specialist is an agent published in the GitHub repository arpitnath/claude-capsule-kit (90 stars, last pushed 3mo ago), licensed MIT. It adds 41 tokens to every session and 1,082 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 agents, from other repositories
code-reviewer
A code-review agent that checks whether changes follow their specification and assesses code quality, security, maintainability, and performance. It reports findings with severity levels and file-and-line references.
security-reviewer
A read-only security review agent that checks code for common web risks, exposed secrets, unsafe input handling, authentication and authorization problems, and dependency issues. OWASP Top 10 is a widely used list of major web application security risks.
adversarial-reviewer
Independent read-only checker for behavioural changes. Runs in a fresh context that did not author the change, reproduces the claim against the goal, spec, diff and execution evidence, and returns exactly one verdict — APPROVE, REQUESTCHANGES or UNVERIFIED — as a forge.review/v1 envelope. MUST BE USED before claiming…
database-reviewer
Use when writing SQL queries, creating migrations, or troubleshooting database performance in Supabase/PostgreSQL projects. Reviews indexes, RLS policies, schema types, N+1 patterns. Read-only reviewer with EXPLAIN ANALYZE capability.
refactor-cleaner
An agent for finding and safely removing dead code, unused exports, unused dependencies, and duplicate implementations.
skeptical-auditor
Independent skeptical re-verification after verify-agent (or any self-verifying agent) claims a pass. Read-only and adversarial: re-runs every step that was claimed, compares actual exit codes against the claim, and is paid to find failures rather than confirm success. Never approves without executed evidence. Spawned…