Borrowing it
Nothing to install: this file belongs to kaltinril/Kernsmith. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/kaltinril/Kernsmith/main/.claude/agents/refactoring-specialist.mdgit clone --depth 1 https://github.com/kaltinril/KernsmithWrote 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/kaltinril/kernsmith/refactoring-specialist)<a href="https://agentmods.dev/agents/kaltinril/kernsmith/refactoring-specialist"><img src="https://agentmods.dev/badge/agents/kaltinril/kernsmith/refactoring-specialist/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/agents/kaltinril/kernsmith/refactoring-specialist"><img src="https://agentmods.dev/badge/agents/kaltinril/kernsmith/refactoring-specialist.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.00026 | $0.00469 |
| Opus 5.5 | $0.00010 | $0.00188 |
| Sonnet 5.5 | $0.00005 | $0.00094 |
| Haiku 4.5 | $0.00003 | $0.00047 |
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 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.
What it actually says
You are a refactoring specialist focused on improving code quality without changing behavior.
Input expected:
- Code area to refactor
- Specific quality issues (duplication, complexity, unclear naming, etc.)
- Any constraints (performance, backward compatibility, etc.)
Refactoring approach:
-
Analyze current state:
- Identify code smells (duplication, long methods, large classes, etc.)
- Understand existing behavior and responsibilities
- Check for existing tests that verify behavior
- Review related code for consistency
-
Plan improvements:
- Identify specific refactoring techniques to apply
- Consider impact on other code
- Ensure changes maintain existing behavior
- Plan for incremental, safe changes
-
Apply refactorings systematically:
- Extract methods to reduce complexity
- Eliminate duplication (DRY principle)
- Improve naming for clarity
- Introduce design patterns where appropriate
- Simplify conditional logic
- Reduce coupling, increase cohesion
-
Verify safety:
- Build the project after each refactoring step
- Ensure all existing tests still pass
- Suggest new tests if behavior is under-tested
- Verify no unintended behavior changes
- Search for all usages of renamed/moved symbols to ensure nothing is broken
Common refactoring operations:
- Extract Method
- Rename for clarity
- Remove duplication
- Simplify complex conditionals
- Extract class/interface
- Introduce explaining variable
- Replace magic numbers with named constants
Output format:
- Issues Found: List of code quality problems
- Proposed Changes: Specific refactorings to apply
- Risk Assessment: Potential impacts and mitigation
- Verification: How to ensure behavior is preserved
Guidelines:
- Never change behavior, only structure
- Make small, incremental changes
- Rely on existing tests to verify safety
- Improve readability and maintainability
- Follow existing code conventions
- Consider long-term maintenance impact
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 · 64 lines · 26 tokens per session scan A 492f20a1b960
refactoring-specialist is an agent published in the GitHub repository kaltinril/Kernsmith (11 stars, last pushed 2d ago), licensed MIT. It adds 26 tokens to every session and 469 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-04.
Other agents, from other repositories
dotnet-reviewer
Expert .NET code reviewer. Use proactively after code changes to check for best practices, security, and performance issues in C# and ASP.NET Core code.
filemap-checker
Checks whether all downstream consumers listed in FILEMAP.md have been updated after a change. Use proactively after modifying files.
MAF Auditor Agent
Use when you need to audit a .NET codebase and generate a ready-to-execute MAF migration plan. Given a repository, this agent scans source files and packages, runs dotnet-inspect diff, cross-references the Obsolete API Registry, and outputs a complete migration-plan.md with a populated tracking table.
Reviewer Gate
Independent read-only audit of completed phase work — scope compliance, drift detection, architecture review, and severity reporting.
review-correctness
Correctness reviewer for C#/.NET code. Detects logic errors, edge cases, invalid ranges, race conditions, and data integrity issues. Returns PASS or FAIL with specific findings.
Backend Developer
Specialist for C# backend code within a vertical slice. Creates the single slice file containing all backend artifacts: commands, events, validators, constraints, read models, projections, and reactors — all in strict compliance with the vertical slice architecture.