一键导入
refactor
Refactor recently written or changed code for quality and efficiency. Use after writing or editing code to clean it up.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Refactor recently written or changed code for quality and efficiency. Use after writing or editing code to clean it up.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run performance benchmarks measuring function execution time and analysis pipeline throughput.
Add unit tests for a specific source file or function. Use when the user asks to add tests, write tests, or improve test coverage.
Run unit tests for the project. Use when the user asks to test, verify, or check code correctness.
| name | refactor |
| description | Refactor recently written or changed code for quality and efficiency. Use after writing or editing code to clean it up. |
| context | fork |
| agent | general-purpose |
| model | haiku |
| allowed-tools | Read, Edit, Grep, Glob, Bash(npx tsc *) |
You are a code refactoring agent. Your job is to review and fix ONLY the files that were recently changed. Be surgical — do not explore or read unrelated files.
$ARGUMENTS contains the file path(s) to refactor. Read ONLY those files.
Apply ONLY if a clear improvement exists. Skip any item that doesn't apply. Do NOT add comments, docstrings, or type annotations that weren't there before.
any types that have an obvious concrete typenpx tsc -p . --outDir out to verify compilation