refactor

refactor is a skill for Claude Code from greglas75/zuvo. It costs 47 tokens per session (1,362 once invoked), scanned A, original, MIT.

A structured refactoring runner for safely restructuring existing code, such as extracting methods, splitting files, removing circular dependencies, or cleaning up overly large classes. It uses staged checks and can resume interrupted work.

In plain words
What is it for?
It is for running full or batched refactoring workflows with evaluation, tests, implementation, proof, and recorded safety checks.
Why use it?
It adds a repeatable process for proving that a refactor is safe before committing it.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the zuvo plugin — 57 skills, 48 agents, 5 hooks shipped together

Good fit It is for running full or batched refactoring workflows with evaluation, tests, implementation, proof, and recorded safety checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/greglas75/zuvo/refactor
Install

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.

Any agent
npx skills add greglas75/zuvo --skill refactor
Clone the repo
git clone --depth 1 https://github.com/greglas75/zuvo

Made for: Claude Code.

Or install zuvo, the plugin that ships this one along with the rest of its 57 skills, 48 agents, 5 hooks.

Wrote 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.

agentmods badge for refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/greglas75/zuvo/refactor/github.svg)](https://agentmods.dev/skills/greglas75/zuvo/refactor)
Your own site
<a href="https://agentmods.dev/skills/greglas75/zuvo/refactor"><img src="https://agentmods.dev/badge/skills/greglas75/zuvo/refactor/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.

agentmods 80×15 button for refactor

Your own site · 80×15
<a href="https://agentmods.dev/skills/greglas75/zuvo/refactor"><img src="https://agentmods.dev/badge/skills/greglas75/zuvo/refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,362 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 9 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 493
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Excessive Agency · line 540
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 559
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 690
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 758
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 861
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Rogue Agent · line 1114
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 1290
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • low Excessive Agency · line 848
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.01362
Opus 5.5 $0.00019 $0.00545
Sonnet 5.5 $0.00009 $0.00272
Haiku 4.5 $0.00005 $0.00136

Measured 1mo ago against content hash 45f24ad8bdcf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

refactor 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.

skills/refactor/SKILL.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

zuvo:refactor

Refactor the requested symbols while preserving their observed behavior. Resolve ../../shared/includes/execution-policy.md and ../../shared/includes/evidence-reuse.md once. Follow the user's current authorization, project verification rules and behavior scope.

Argument Parsing

Argument Action
<file(s)> Analyze and refactor this scope
continue Resume the selected contract at its recorded phase
batch <file> Load batch handling in references/completion.md and ../../shared/includes/refactor-reference.md
no-commit Finish verification; retain uncommitted work and report its location
Other documented flags Resolve the full argument table in references/bootstrap.md

Mandatory File Loading

Load only the current phase reference below. Read its required includes when that phase needs them; use the realpath/hash/context-generation receipt protocol in evidence-reuse.md. After compaction reload current requirements; a persistent file ledger is not retained context. Do not concatenate every phase at entry. Missing optional enrichment is a named degradation; missing mandatory safety definitions blocks the dependent assessment.

Phase routing

Phase / contract boundary Read on entry Required outcome
0: discovery references/bootstrap.md Current worktree, capabilities, gate install, scope and refactor type
1: plan references/planning.md Callers, duplication, CQ baseline, behavior/symbol scope and contract
2: characterize references/characterization.md Every moved unit exercised on pre-change code; use ../../shared/includes/regression-fence.md
3: transform references/transformation.md Planned move, targeted verification, independent CQ audit under policy
3: review references/review.md Actual adversarial review of formatted final inputs; finding dispositions
3.5–3.6: fix/audit references/remediation.md Authorized fixes with linked red/green runs; test-quality substage with parent evidence; mutation substage over the tests this run produced
4: completion references/completion.md Shared verifier, content-keyed proof, required telemetry and concise result

Read the full file on GitHub · 118 lines

Changes

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.

  1. 1mo ago Changed 45f24ad8bdcf
  2. 1mo ago Changed · -1,441 lines · -32 tokens per session 8083e0888233
  3. 1mo ago First seen · 1,559 lines · 79 tokens per session scan A 60d2e7f9b91f

Subscribe to this mod's changes

refactor is a skill published in the GitHub repository greglas75/zuvo (7 stars, last pushed yesterday), licensed MIT. It adds 47 tokens to every session and 1,362 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-09-03.