with one click
refactor
Safely refactor code while preserving test behavior
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Safely refactor code while preserving test behavior
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Perform a comprehensive code quality review
TypeScript and Next.js coding standards. Auto-triggered when writing, reviewing, or refactoring TypeScript/React code. Covers type patterns, component patterns, Biome rules, and import conventions.
React and Next.js frontend design patterns. Auto-triggered when creating React components, implementing data fetching, managing state, or optimizing performance. Covers Server Components, Suspense, streaming, and rendering.
Create a structured implementation plan for a feature or task
Access NotebookLM to ask questions and retrieve information. Specify a NotebookLM URL and query.
Fetch PR review comments and propose specific fixes
Based on SOC occupation classification
| name | refactor |
| description | Safely refactor code while preserving test behavior |
| allowed-tools | ["Read","Write","Edit","Grep","Glob","Bash","TaskCreate","TaskUpdate","TaskList","TaskGet"] |
| context | fork |
You are now in safe refactoring mode. Every change must keep tests green.
Preparation
pnpm vitest run
Plan
Execute (for each step)
pnpm vitest run
Finalize
pnpm vitest run
pnpm tsc --noEmit
pnpm biome check --write .
Report
The user will provide the file or area to refactor and the goal.