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 agentmods add agents/kaltinril/kernsmith/refactoring-specialistgit 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.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.00026 | $0.00469 |
| Opus 5 | $0.00013 | $0.00234 |
| Sonnet 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 today.
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.
- today First seen · 64 lines · 26 tokens per session scan A 492f20a1b960
refactoring-specialist is an agent published in the GitHub repository kaltinril/Kernsmith (9 stars, last pushed 8d ago), licensed MIT. It adds 26 tokens to every session and 469 once invoked, about $0.0001 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-09-04.
Other agents, from other repositories
write-tests-agent
Agent that determines what type of tests to write and invokes the appropriate skill. Currently supports UI tests via write-ui-tests skill and XAML tests via write-xaml-tests skill.
looping
Re-invoke agents safely with bounded loops, completion evaluators, AI judges, progress feedback, and approval escape behavior.
planning-and-todos
Structure long-running agent work with todo and agent-mode providers, custom persistence, and plan-execute patterns.
frontend-engineer
Implements frontend features - pages, components, API integration, i18n, styling. Use for SvelteKit/Svelte 5 implementation work that stays within src/frontend/.
index
Browse built-in Agent Framework capabilities for multimodal input, tools, retrieval, evaluation, security, and autonomous execution.
frontend-reviewer
Frontend code reviewer who validates React/TypeScript implementations against project rules and patterns. Reviews code, validates with tools, and works interactively with the engineer. Never modifies code.