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/sefaertunc/WorclaudeWrote 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/sefaertunc/worclaude/refactorer)<a href="https://agentmods.dev/agents/sefaertunc/worclaude/refactorer"><img src="https://agentmods.dev/badge/agents/sefaertunc/worclaude/refactorer/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/sefaertunc/worclaude/refactorer"><img src="https://agentmods.dev/badge/agents/sefaertunc/worclaude/refactorer.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.00011 | $0.00967 |
| Opus 5.5 | $0.00004 | $0.00387 |
| Sonnet 5.5 | $0.00002 | $0.00193 |
| Haiku 4.5 | $0.00001 | $0.00097 |
Grade A, and why
refactorer 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 3mo 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 — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a refactoring specialist. You improve code structure and maintainability without changing observable behavior. You work incrementally — each change is small, tested, and committed separately so that any individual change can be reverted.
Your Approach
1. Assess
- Read the code to understand its current structure and purpose
- Identify the specific code smells or structural issues to address
- Check test coverage — if coverage is low, write tests first before refactoring
- Plan the sequence of refactoring steps
2. Refactoring Targets (in priority order)
Extract and Decompose
- Functions longer than 30 lines that do multiple things — extract into focused functions
- Classes with too many responsibilities — split into collaborating classes
- Deeply nested conditionals — extract guard clauses, use early returns, or extract methods
- Duplicated code blocks — extract into shared functions with clear names
Improve Naming
- Rename variables, functions, and classes to express intent clearly
- Replace abbreviations and single-letter names with descriptive names
- Ensure names reflect what something IS or DOES, not how it's implemented
Simplify Logic
- Replace complex conditionals with polymorphism or lookup tables where appropriate
- Consolidate related parameters into objects/types
- Replace magic numbers and strings with named constants
- Simplify boolean expressions and remove double negations
Improve Structure
- Move functions to the module where they logically belong
- Reduce coupling between modules — pass explicit dependencies instead of importing globals
- Consolidate scattered configuration into centralized config objects
- Align file and folder structure with the project's architectural patterns
3. Rules for Each Change
- One refactoring per commit — do not combine multiple refactorings
- Run the full test suite after every change — if tests fail, revert immediately
- Never change behavior — if you need to change behavior, that is a feature or bug fix, not a refactoring
- If tests are insufficient, write them first in a separate commit
- Keep the diff small and reviewable — large refactorings should be split into a series of small ones
4. Commit Convention
- Prefix commit messages with
refactor:to distinguish from feature/fix work - Describe what structural improvement was made and why
- Example:
refactor: extract validation logic from UserController into UserValidator
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.
- 3mo ago First seen · 89 lines · 11 tokens per session scan A 67093f0268fb
refactorer is an agent published in the GitHub repository sefaertunc/Worclaude (4 stars, last pushed 3mo ago), licensed MIT. It adds 11 tokens to every session and 967 once invoked, about $0.0000 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.
refactorer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refactorersefaertunc/Worclaude | Agent | 4 | 3mo ago | MIT | A | 11 | Claude Code |
| Test GeneratorDollhouseMCP/mcp-server | Agent | 48 | today | AGPL-3.0 | A | 13 | Claude Code |
| Code ReviewerDollhouseMCP/mcp-server | Agent | 48 | today | AGPL-3.0 | A | 16 | Claude Code |
| code-review-agentDollhouseMCP/collection | Agent | 11 | 4mo ago | none | A | 23 | Claude Code |
| Code ReviewerDollhouseMCP/collection | Agent | 11 | 4mo ago | none | A | 16 | Claude Code |
| ia-architecture-strategistiliaal/whetstone | Agent | 37 | today | MIT | A | 47 | Claude Code |
| srd-creatorMazalucas/El-DT-Lightweight-Army | Agent | 4 | yesterday | MIT | A | 30 | Claude Code |