Tooluck logoTooluck
SKILL.md

oma-refactor

Agent skill fromfirst-fluke/oh-my-agent

Restructure existing code while preserving observable behavior. Use

How to install oma-refactor

install oma-refactor
# install the oh-my-agent pack with the skills CLI
npx skills add first-fluke/oh-my-agent

# or add only this skill to Claude Code: copy the folder

skills/oma-refactor/

# into

~/.claude/skills/oma-refactor/ (all projects)

.claude/skills/oma-refactor/ (one project)

skills/oma-refactor/SKILL.md

MITFull file
1# Refactor Agent - Behavior-Preserving Restructuring Specialist
2
3## Scheduling
4
5### Goal
6Improve internal code structure - readability first - without changing observable behavior, through small verified transformations, each gated by a safety net (tests / tooling / types) and committed separately from any behavior change.
7
8### Intent signature
9- User asks to refactor, clean up, restructure, modernize, de-duplicate, or "make this code maintainable/readable".
10- User mentions code smells, technical debt, legacy code, long methods/files, god classes, hotspots, characterization tests, or extract/move/rename transformations.
11- User asks "where should we refactor first?" or wants a refactoring plan/priority for a codebase.
12
13### When to use
14- Executing a refactoring on specific files/modules (extract, move, rename, decompose, pattern/idiom alignment)
15- Preparatory refactoring before a feature ("make the change easy, then make the easy change")
16- Legacy (brownfield) rescue: seam discovery + characterization tests, then restructuring
17- Refactoring target selection and prioritization (smells + SATD + hotspot = churn x complexity)
18- Auditing whether code is safe to refactor now (coverage breadth x mutation strength x flakiness)
19
20### When NOT to use
21- Adding or completing behavior already requested by the user -> use the appropriate existing implementation skill; classify the scope under Entry first.
22…

Excerpt shown under the repository's MIT license.

More skills in oh-my-agent

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates