From oh-my-claudeagent
Intelligent refactoring with codebase awareness, test verification, and step-by-step execution.
npx claudepluginhub utsavbalar1231/oh-my-claudeagent --plugin oh-my-claudeagentThis skill uses the workspace's default tool permissions.
```
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
/refactor <refactoring-target> [--scope=<file|module|project>] [--strategy=<safe|aggressive>]
Arguments:
refactoring-target: What to refactor. Can be:
- File path: src/auth/handler.ts
- Symbol name: "AuthService class"
- Pattern: "all functions using deprecated API"
- Description: "extract validation logic into separate module"
Options:
--scope: Refactoring scope (default: module)
- file: Single file only
- module: Module/directory scope
- project: Entire codebase
--strategy: Risk tolerance (default: safe)
- safe: Conservative, maximum test coverage required
- aggressive: Allow broader changes with adequate coverage
Deterministic refactoring with codebase awareness: understand intent, map codebase, assess risk, plan via prometheus, execute with ast-grep MCP tools, verify after each change.
Classify and validate before acting.
| Signal | Classification | Action |
|---|---|---|
| Specific file/symbol | Explicit | Proceed to codebase analysis |
| "Refactor X to Y" | Clear transformation | Proceed to codebase analysis |
| "Improve", "Clean up" | Open-ended | MUST ask: "What specific improvement?" |
| Ambiguous scope | Uncertain | MUST ask: "Which modules/files?" |
// Agent 1: Find the refactoring target
Agent(subagent_type="oh-my-claudeagent:explore", prompt="Find all occurrences and definitions of [TARGET]")
// Agent 2: Find related code
Agent(subagent_type="oh-my-claudeagent:explore", prompt="Find all code that imports, uses, or depends on [TARGET]")
// Agent 3: Find similar patterns
Agent(subagent_type="oh-my-claudeagent:explore", prompt="Find similar code patterns to [TARGET] in the codebase")
// Agent 4: Find tests
Agent(subagent_type="oh-my-claudeagent:explore", prompt="Find all test files related to [TARGET]")
// Agent 5: Architecture context
Agent(subagent_type="oh-my-claudeagent:explore", prompt="Find architectural patterns and module organization around [TARGET]")
Dependency graph and impact zones from Phase 1:
| Zone | Risk Level | Action |
|---|---|---|
| Core | HIGH | Extra verification |
| Consumers | MEDIUM | Standard verification |
| Edge | LOW | Quick check |
| Coverage Level | Strategy |
|---|---|
| HIGH (>80%) | Run existing tests after each step |
| MEDIUM (50-80%) | Run tests + add safety assertions |
| LOW (<50%) | PAUSE: Propose adding tests first |
| NONE | BLOCK: Refuse aggressive refactoring |
Delegate to prometheus:
Agent(
subagent_type="oh-my-claudeagent:prometheus",
prompt="Create a detailed refactoring plan for: [GOAL]. Codemap: [CODEMAP]. Coverage: [VERIFICATION_PLAN]. Requirements: atomic steps, each independently verifiable, ordered by dependency, with exact file paths and rollback strategy."
)
Nesting constraint: Prometheus runs as a subagent (depth 1) and cannot delegate to metis or explore. Supply ALL necessary context in the prompt — include the full codemap, coverage data, and specific file paths so prometheus can plan without sub-research.
Per step:
lsp_rename only if the current Claude environment exposes it.evidence_log(evidence_type="typecheck", command="<cmd>", exit_code=<code>, output_snippet="<output>")If ANY verification fails: STOP, REVERT, DIAGNOSE.
Full test suite, type check, lint, build, final diagnostics. evidence_log after EACH — task completion blocked without fresh evidence.
NEVER:
as any, @ts-ignore, @ts-expect-errorALWAYS:
librarian for recommended modern alternative