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 krzysztofsurdy/code-virtuoso --skill refactoringgit clone --depth 1 https://github.com/krzysztofsurdy/code-virtuosoWrote 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/krzysztofsurdy/code-virtuoso/refactoring)<a href="https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/refactoring"><img src="https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/refactoring.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.00105 | $0.02767 |
| Opus 5 | $0.00053 | $0.01384 |
| Sonnet 5 | $0.00021 | $0.00553 |
| Haiku 4.5 | $0.00011 | $0.00277 |
Grade A, and why
refactoring 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 — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactoring
A thorough reference covering 89 refactoring techniques and code smells — featuring PHP 8.3+ examples, rationale, step-by-step mechanics, and before/after comparisons.
Refactoring Techniques (67)
Composing Methods
- Extract Method — Pull code fragments into named methods → reference
- Inline Method — Substitute a method call with its body → reference
- Extract Variable — Give complex expressions meaningful names through explanatory variables → reference
- Inline Temp — Substitute a temporary variable with its expression → reference
- Replace Temp with Query — Swap temp variables for method calls → reference
- Split Temporary Variable — Assign separate variables for separate purposes → reference
- Remove Assignments to Parameters — Introduce local variables rather than reassigning parameters → reference
- Replace Method with Method Object — Convert a complex method into its own class → reference
- Substitute Algorithm — Swap an algorithm for a clearer alternative → reference
Moving Features Between Objects
- Move Method — Relocate a method to the class that depends on it most → reference
- Move Field — Relocate a field to the class that depends on it most → reference
- Extract Class — Divide a class that handles too much → reference
- Inline Class — Consolidate a class that does too little → reference
- Hide Delegate — Introduce methods that conceal delegation chains → reference
- Remove Middle Man — Allow clients to call the delegate directly → reference
- Introduce Foreign Method — Attach a missing method to a class you cannot modify → reference
- Introduce Local Extension — Build a wrapper or subclass for a library class → reference
What ships with it
60 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.
- references/add-parameter.md 4.5 KB
- references/alternative-classes-with-different-interfaces.md 5.3 KB
- references/change-bidirectional-association-to-unidirectional.md 5.9 KB
- references/change-reference-to-value.md 5.7 KB
- references/change-unidirectional-association-to-bidirectional.md 6.2 KB
- references/change-value-to-reference.md 7.2 KB
- references/collapse-hierarchy.md 5.2 KB
- references/comments.md 5.8 KB
- references/consolidate-conditional-expression.md 7.0 KB
- references/consolidate-duplicate-conditional-fragments.md 5.9 KB
- references/data-class.md 6.7 KB
- references/data-clumps.md 6.2 KB
- references/dead-code.md 6.0 KB
- references/decompose-conditional.md 7.2 KB
- references/divergent-change.md 6.9 KB
- references/duplicate-code.md 6.5 KB
- references/duplicate-observed-data.md 8.0 KB
- references/encapsulate-collection.md 5.6 KB
- references/encapsulate-field.md 6.6 KB
- references/extract-class.md 6.6 KB
- references/extract-interface.md 7.0 KB
- references/extract-method.md 8.1 KB
- references/extract-subclass.md 8.0 KB
- references/extract-superclass.md 8.7 KB
- references/extract-variable.md 8.2 KB
- references/feature-envy.md 6.1 KB
- references/form-template-method.md 9.2 KB
- references/hide-delegate.md 6.2 KB
- references/hide-method.md 4.2 KB
- references/inappropriate-intimacy.md 6.7 KB
- references/incomplete-library-class.md 5.7 KB
- references/inline-class.md 4.6 KB
- references/inline-method.md 7.6 KB
- references/inline-temp.md 6.3 KB
- references/introduce-assertion.md 6.8 KB
- references/introduce-foreign-method.md 9.7 KB
- references/introduce-local-extension.md 9.7 KB
- references/introduce-null-object.md 6.9 KB
- references/introduce-parameter-object.md 4.7 KB
- references/large-class.md 7.4 KB
- references/lazy-class.md 5.8 KB
- references/long-method.md 7.3 KB
- references/long-parameter-list.md 6.5 KB
- references/message-chains.md 6.0 KB
- references/middle-man.md 4.5 KB
- references/move-field.md 6.5 KB
- references/move-method.md 5.8 KB
- references/parallel-inheritance-hierarchies.md 5.0 KB
- references/parameterize-method.md 4.1 KB
- references/preserve-whole-object.md 5.7 KB
- references/primitive-obsession.md 6.7 KB
- references/pull-up-constructor-body.md 6.6 KB
- references/pull-up-field.md 7.4 KB
- references/pull-up-method.md 4.8 KB
- references/push-down-field.md 4.4 KB
- references/push-down-method.md 5.3 KB
- references/refused-bequest.md 5.4 KB
- references/remove-assignments-to-parameters.md 6.9 KB
- references/remove-control-flag.md 5.4 KB
- references/remove-middle-man.md 5.4 KB
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 · 135 lines · 105 tokens per session scan A d12de690fd35
refactoring is a skill published in the GitHub repository krzysztofsurdy/code-virtuoso (20 stars, last pushed 3mo ago), licensed MIT. It adds 105 tokens to every session and 2,767 once invoked, about $0.0005 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 skills, from other repositories
gh-issues
Fetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5]…
skill-creator
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating…
openclaw-pr-maintainer
Maintainer workflow for reviewing, triaging, preparing, closing, or landing OpenClaw pull requests and related issues. Use when Codex needs to validate bug-fix claims, search for related issues or PRs, apply or recommend close/reason labels, prepare GitHub comments safely, check review-thread follow-up, or perform…
github
GitHub operations via gh CLI: issues, PRs, CI runs, code review, API queries. Use when: (1) checking PR status or CI, (2) creating/commenting on issues, (3) listing/filtering PRs or issues, (4) viewing run logs. NOT for: complex web UI interactions requiring manual browser flows (use browser tooling when available)…
code-review-report
Turn code changes into a single-file HTML code review report that pairs the diff with context a diff can't show — design decisions, rejected alternatives, tradeoffs, unfinished work — plus prioritized review points. Use when preparing for review after finishing a sizable change, refactor, or feature, or whenever the…
impl
A code-review workflow that checks whether an implementation matches the project's agreed plan and evaluation criteria. It uses `.claude/context.md` as the reference document.