一键导入
refactor
Use Codex CLI to refactor a module, file, or code pattern. Use when you want an independent take on how to restructure complex or tangled code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use Codex CLI to refactor a module, file, or code pattern. Use when you want an independent take on how to restructure complex or tangled code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Transcribe audio files to text using mlx_whisper on Apple Silicon. Use when the user has an audio file (MP3, WAV, AAC, OGG, etc.) they want transcribed.
Run consistent, findings-first code reviews with Codex CLI for any target: uncommitted/dirty working tree, current branch vs base branch, specific commit SHA, or pull request. Use when asked to review bugs, risks, regressions, and test gaps with actionable file/line findings.
Deep-dive into complex code using Codex CLI. Traces call chains, maps dependencies, and explains how code works. Use when asked to understand, unwind, or explain tangled or unfamiliar code.
Use Codex CLI to diagnose and fix a bug, error, or failing test. Use when you want a second opinion on a bug or when Claude's fix isn't working.
| name | refactor |
| description | Use Codex CLI to refactor a module, file, or code pattern. Use when you want an independent take on how to restructure complex or tangled code. |
Use Codex CLI to analyze code and apply a refactor.
From the user's request, construct a prompt for Codex that includes:
Log output to a tmp directory:
CODEX_DIR="$(mktemp -d)/codex-refactor"
mkdir -p "$CODEX_DIR"
codex --sandbox danger-full-access -a never exec "$PROMPT" | tee "$CODEX_DIR/refactor.log"
Structure the response as:
After Codex finishes, review the changes and run tests to verify nothing broke.