refactorer

refactorer is an agent for Claude Code from Sagargupta16/claude-skills. It costs 108 tokens per session (456 once invoked), scanned A, original, MIT.

An agent for carrying out organized code changes across multiple files, such as renaming symbols, extracting functions, or changing module formats.

In plain words
What is it for?
Use it for codebase-wide renames, moving or extracting code, converting JavaScript to TypeScript, or changing CommonJS modules to modern ES modules.
Why use it?
It helps prevent missed references, broken imports, and regressions when a change affects many parts of a codebase.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the refactoring plugin — 1 skill, 1 command, 1 agent shipped together

Good fit Use it for codebase-wide renames, moving or extracting code, converting JavaScript to TypeScript, or changing CommonJS modules to modern ES modules.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/sagargupta16/claude-skills/refactorer
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.

Clone the repo
git clone --depth 1 https://github.com/Sagargupta16/claude-skills

Made for: Claude Code.

Or install refactoring, the plugin that ships this one along with the rest of its 1 skill, 1 command, 1 agent.

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 refactorer

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

agentmods 80×15 button for refactorer

Your own site · 80×15
<a href="https://agentmods.dev/agents/sagargupta16/claude-skills/refactorer"><img src="https://agentmods.dev/badge/agents/sagargupta16/claude-skills/refactorer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 456 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.
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.00108 $0.00456
Opus 5 $0.00054 $0.00228
Sonnet 5 $0.00022 $0.00091
Haiku 4.5 $0.00011 $0.00046

Measured 9d ago against content hash 50189cbde366, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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 9d 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.

plugins/refactoring/agents/refactorer.md · 48 lines

What it actually says

You are a refactoring specialist. Execute safe, systematic refactoring across codebases.

Process

  1. Understand the scope: What's being refactored and why
  2. Map dependencies: Find all files that reference the code being changed
  3. Plan the order: Change in dependency order (leaves first, then dependents)
  4. Execute changes:
    • One logical change at a time
    • Run tests after each change
    • If tests fail, revert and investigate
  5. Verify: Run full test suite, check for broken imports/references

Refactoring Patterns

Rename Symbol

  1. Search for all references (grep, LSP find-references)
  2. Change declaration first
  3. Update all references in dependency order
  4. Run tests

Extract Function

  1. Identify the code to extract
  2. Determine parameters (what the code needs from its context)
  3. Determine return value
  4. Create the function, replace original code with a call
  5. Run tests

Module Migration (CJS to ESM)

  1. Change require() to import
  2. Change module.exports to export
  3. Update package.json ("type": "module")
  4. Fix any dynamic imports
  5. Update build config if needed

Safety Rules

  • Never refactor and add features in the same pass
  • Run tests after every change
  • Keep commits atomic (one refactor per commit)
  • If tests fail after a change, fix or revert before continuing
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. 9d ago First seen · 48 lines · 108 tokens per session scan A 50189cbde366

Subscribe to this mod's changes

refactorer is an agent published in the GitHub repository Sagargupta16/claude-skills (5 stars, last pushed 3d ago), licensed MIT. It adds 108 tokens to every session and 456 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-31.

Related

Other agents, from other repositories

workflow-orchestrator

Coordinates development workflows and orchestrates base plugin operations including git workflows, quality checks, and productivity automation.

shrwnsan/vibekit-claude-plugins · 24 tokens

search-plus

Enhanced web search and content extraction with intelligent multi-service fallback strategy for reliable access to blocked or problematic domains.

shrwnsan/vibekit-claude-plugins · 23 tokens

test-generator

Test generator for Shopware 6 tests. Execution environment for test generation skills — do not invoke directly. Skills fork into this agent via context: fork. Does not review tests — use the appropriate reviewer agent for that.

shopwareLabs/ai-coding-tools · 47 tokens

code-researcher

Researches a codebase's architecture, data flows, and component relationships and returns synthesized findings with file:line citations. Use proactively for architectural questions, multi-file dependency tracing, impact analysis before a refactoring, and onboarding to unfamiliar code — any wide investigation that…

shopwareLabs/ai-coding-tools · 86 tokens

dev-tooling-runner

Runs Shopware dev-tooling checks — PHPStan, ECS, PHPUnit, Rector, ESLint, Stylelint, Prettier, TypeScript, Jest, Vitest, ludtwig, and Vite/Webpack builds — plus the rule-driven fixers (ecsfix, rectorfix, eslint/stylelint/prettier/ludtwig fix) on the files it is given and returns a condensed pass/fail report. Use when…

shopwareLabs/ai-coding-tools · 141 tokens

implementer

Scope-fenced implementation worker dispatched per phase by /implementation:implement-dispatch (directly, or chained from callers such as /work-items:work): executes exactly one brief inside its assigned or self-provisioned worktree, commits and pushes early, and returns a verdict plus identifiers. Not intended for…

melodic-software/claude-code-plugins · 70 tokens