refactor

refactor is a skill for Claude Code from phodal/auto-dev. It costs 10 tokens per session (151 once invoked), scanned A, original, MPL-2.0.

A code-review guide for improving existing software without changing what it is meant to do. It covers issues such as long methods, repeated code, design problems, slow algorithms, and hard-to-test code.

In plain words
What is it for?
It helps show the current code, propose a revised version, and explain improvements related to design, performance, readability, testability, and modularity.
Why use it?
It gives a structured way to make code easier to read, test, maintain, and extend instead of leaving problems scattered through the implementation.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit It helps show the current code, propose a revised version, and explain improvements related to design, performance, readability, testability, and modularity.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/phodal/auto-dev/refactor
About the project

AutoDev is an AI-native, multi-agent development platform that supports workflows such as document research, coding, code review, data queries, artifact creation, and web interaction. It runs across environments including IntelliJ IDEA, VS Code, command-line tools, desktop and mobile applications, web runtimes, and servers. The catalogue skills extend its coding-agent workflows.

phodal/auto-dev · 4,558 stars · on GitHub · ide.unitmesh.cc

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 phodal/auto-dev --skill refactor
Clone the repo
git clone --depth 1 https://github.com/phodal/auto-dev

Made for: Claude Code.

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/phodal/auto-dev/refactor/github.svg)](https://agentmods.dev/skills/phodal/auto-dev/refactor)
Your own site
<a href="https://agentmods.dev/skills/phodal/auto-dev/refactor"><img src="https://agentmods.dev/badge/skills/phodal/auto-dev/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/phodal/auto-dev/refactor"><img src="https://agentmods.dev/badge/skills/phodal/auto-dev/refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 151 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 pass 7 Sept 2026
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.00010 $0.00151
Opus 5.5 $0.00004 $0.00060
Sonnet 5.5 $0.00002 $0.00030
Haiku 4.5 $0.00001 $0.00015

Measured 1mo ago against content hash 1e1216ffbf2f, 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.

examples/skills/refactor/SKILL.md · 33 lines

What it actually says

Code Refactoring

You are an expert software engineer specializing in code refactoring.

Refactoring Request

$ARGUMENTS

Refactoring Focus

  1. Code Smells: Long methods, large classes, duplicate code
  2. Design: SOLID principles, design patterns
  3. Performance: Algorithm efficiency, resource management
  4. Maintainability: Readability, testability, modularity

Output Format

Before (Current Code)

Show current implementation with issues

After (Refactored Code)

Show improved implementation

Improvements Made

List all improvements with explanations

Project: $PROJECT_NAME

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 First seen · 33 lines · 10 tokens per session scan A 1e1216ffbf2f

Subscribe to this mod's changes

refactor is a skill published in the GitHub repository phodal/auto-dev (4,558 stars, last pushed 20d ago), licensed MPL-2.0. It adds 10 tokens to every session and 151 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-30.

Related

Other skills, from other repositories

review-prs

Review a GitHub pull request in the googleapis/mcp-toolbox repo against the team's reviewer checklist: PR title/description conventions, linked issue, logic errors and unhandled edge cases, breaking changes, test coverage, docs updates, security (input handling), and new dependencies. Use whenever a maintainer asks…

googleapis/mcp-toolbox · 162 tokens

deslop

Remove AI-generated code slop and clean up code style.

get-bb/bb · 14 tokens

code-review

A structured code review process covering security, correctness, speed, and maintainability. Code review means checking source code for defects and risks before it is shipped.

anymouschina/TapCanvas · 38 tokens

review

Review local code changes for bugs, regressions, missing tests, and pragmatic improvements. Use when the user asks to review the current changes from git status, or to review a specific backlog task by id such as task-65 or TASK-65. Also trigger when the user says things like "review", "review current changes", "check…

devoxx/DevoxxGenieIDEAPlugin · 90 tokens

plugin-code-review-orchestrated

Orchestrates a code review of the spring-plugin repository through scope/context passes, routing, domain reviewer subskills, and per-artifact validation. Use when asked to review a PR, diff, commit, branch, module, or file set, to run a full orchestrated review, or to produce a validated review report.

explyt/spring-plugin · 72 tokens

review-async-lifecycle

Normative reviewer for EDT safety, coroutines, cancellation, read/write actions, disposal, listeners and async lifecycle in the explyt spring-plugin. Use during orchestrated code review when the diff touches threading, background tasks, read or write actions, listeners, MessageBus, Disposable ownership or progress…

explyt/spring-plugin · 66 tokens