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 jggomez/expert-ai-developer-skills --skill refactoring-code-expertgit clone --depth 1 https://github.com/jggomez/expert-ai-developer-skillsWrote 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/jggomez/expert-ai-developer-skills/refactoring-code-expert)<a href="https://agentmods.dev/skills/jggomez/expert-ai-developer-skills/refactoring-code-expert"><img src="https://agentmods.dev/badge/skills/jggomez/expert-ai-developer-skills/refactoring-code-expert/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/jggomez/expert-ai-developer-skills/refactoring-code-expert"><img src="https://agentmods.dev/badge/skills/jggomez/expert-ai-developer-skills/refactoring-code-expert.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.00054 | $0.00956 |
| Opus 5.5 | $0.00022 | $0.00382 |
| Sonnet 5.5 | $0.00011 | $0.00191 |
| Haiku 4.5 | $0.00005 | $0.00096 |
Grade A, and why
refactoring-code-expert 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.
How it starts
The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactoring Code Expert Skill
Overview
This skill guides safe, disciplined, and incremental structural improvements to existing codebases without modifying external behavior. It acts as a Senior Software Architect and Refactoring Specialist, treating refactoring not as a risky "big-bang rewrite", but as a controlled sequence of micro-transformations protected by a robust automated test safety net.
When to Use
Trigger Scenarios
- Eliminating code smells (God classes, long methods, duplicated logic, high cyclomatic complexity).
- Restructuring messy or legacy code to adhere to SOLID, DRY, and KISS principles.
- Decoupling tightly coupled components using Dependency Inversion or Ports & Adapters.
- Preparing a module for new features by first making the change easy (pre-factoring).
When NOT to Use
- Adding new functional capabilities or modifying contracts: Route to
code-implementerortest-driven-development. - Pure smell diagnosis without altering code: Route to
code-smells-expert. - Database schema modifications: Route to
database-migration-expert. - Authoring new architectural specifications: Route to
senior-architect-engineering.
Process
Phase 1: Test Safety Net & Characterization
- The Golden Rule: Refactoring changes internal structure, NEVER external behavior. If observable behavior changes, the refactoring is broken.
- Verify existing test coverage before editing any code:
python3 ./skills/refactoring-code-expert/scripts/run_tests.py - If tests are absent or inadequate, write minimal "Characterization Tests" to pin down existing behavior before modifying the implementation.
Phase 2: Micro-Refactoring Sequence Plan
Formulate a sequence of atomic, low-risk micro-refactorings:
- Extract Method / Function: Isolate cohesive blocks of logic into well-named functions.
- Introduce Parameter Object: Group related parameters into a dataclass or value object.
- Replace Conditional with Polymorphism: Replace complex
if/elseorswitchtrees with strategy classes. - Rename Symbol: Replace cryptic names with self-documenting domain identifiers.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 81 lines · 54 tokens per session scan A ce684b779800
refactoring-code-expert is a skill published in the GitHub repository jggomez/expert-ai-developer-skills (30 stars, last pushed yesterday), licensed Apache-2.0. It adds 54 tokens to every session and 956 once invoked, about $0.0002 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-11-06.
refactoring-code-expert compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refactoring-code-expertjggomez/expert-ai-developer-skills | Skill | 30 | yesterday | Apache-2.0 | A | 54 | Claude Code, Codex |
| agui-dotnet-streaming-chatag-ui-protocol/ag-ui | Skill | 17k | yesterday | MIT | A | 223 | Claude Code |
| azure-mgmt-apicenter-dotnetmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 97 | Claude Code |
| azure-communication-chat-javamicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 41 | Claude Code |
| minimal-apicodewithmukesh/dotnet-claude-kit | Skill | 805 | 2d ago | MIT | A | 101 | Claude Code |
| grpcmanagedcode/dotnet-skills | Skill | 508 | yesterday | MIT | A | 95 | Claude Code, Codex |
| azure-messaging-webpubsubservice-pybenjaminasterA/antigravity-awesome-skills | Skill | 461 | yesterday | MIT | A | 0 | Claude Code, Codex |