Skip to content
Agentmart
Submit a tool

refactor

Use when restructuring code without changing its behavior, such as extracting a module or migrating off an API.

Skill by UtsavBalar1231

IndexedMIT★ 3
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/utsavbalar1231-refactor

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when restructuring code without changing its behavior, such as extracting a module or migrating off an API. Maps the affected code, plans the steps, and runs the tests after each change.

Use cases: backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/refactor

What's inside

Skill name
refactor
Description
Use when restructuring code without changing its behavior, such as extracting a module or migrating off an API. Maps the affected code, plans the steps, and runs the tests after each change.
License
MIT
Instructions
19 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Refactor

Preserve behavior while restructuring the requested target. Establish scope and intent before editing; ask about materially different interpretations. Accept a file, symbol, or pattern, such as "all functions using deprecated API". Default to module scope and a safe strategy; honor `--scope=file|module|project` and `--strategy=safe|aggressive` without treating aggressive as permission to change behavior.

Map definitions, callers, imports, and tests. Run a baseline; if behavior lacks coverage, propose characterization tests before restructuring and refuse aggressive changes until that coverage exists. For project-wide investigations, delegate independent search areas only if the current role permits it. Leaf workers search directly.

Plan small, independently verifiable steps in dependency order, with file targets and a way to undo each step. Use `ast_search` for structural references and preview `ast_replace` with `dry_run` before applying. Read version-matched documentation for a requested API migration.

Run affected tests and typechecks after each step. Do not continue past a failure, suppress type errors, or weaken tests to get green. Undo only your failing step without discarding others' work, then diagnose from the recorded failure. Finish with the project's relevant build, lint, and regression checks. Record every run with `evidence_log` and its real exit code; report any unverified behavior.

## Deprecated Code & Library Migration

Do not upgrade dependencies or migrate APIs unasked. For a requested migration, consult official documentation or `oh-my-claudeagent:researcher` for the supported alternative before editing.

## Claude Code

If owner decisions require an interview, ask the user to run `/oh-my-claudeagent:plan`. Do not spawn a planner child that cannot ask the user questions.

From UtsavBalar1231/oh-my-claudeagent, MIT.

More from UtsavBalar1231/oh-my-claudeagent

Signals

Stars
3
Forks
0
Open issues
0
Last commit (this folder)
Oct 15, 2026 (13 days ago)
Last release
Oct 20, 2026 (9 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from UtsavBalar1231

Cite this page

refactor skill. Agent Mart. https://agentmart.dev/skills/utsavbalar1231-refactor (last updated 2026-10-24)