一键导入
refactor
Safely refactor code while preserving test behavior
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Safely refactor code while preserving test behavior
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
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
| 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.