一键导入
awa-refactor
Refactor code or docs while preserving behavior, meaning, and traceability. Use this when asked to refactor, restructure, or improve code quality.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Refactor code or docs while preserving behavior, meaning, and traceability. Use this when asked to refactor, restructure, or improve code quality.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Double-check the last work, whether it be a plan, design, or implementation, ensuring all aspects have been fully considered. Use when user wants to check work, or mentions "double check".
Align source with target. Use this when asked to align, check, or verify alignment between artifacts.
Create or update ARCHITECTURE.md. Use this when asked to create, update or modify the project architecture.
Brainstorm ideas, explore solutions, and evaluate options. Use this when asked to brainstorm, explore ideas, or analyze trade-offs.
Run traceability and schema checks, then fix any errors. Use this when asked to check, validate, or fix traceability and schema issues.
Implement code and tests based on architecture, requirements, and design (or a set of tasks). Use this when asked to implement features, write code, or create tests.
| name | awa-refactor |
| description | Refactor code or docs while preserving behavior, meaning, and traceability. Use this when asked to refactor, restructure, or improve code quality. |
${input}
You MUST consider the user input before proceeding (if not empty).
Refactor the specified cod or docs as instructed, following awa conventions.
You SHALL preserve existing behavior unless explicitly asked to change it.
You SHALL maintain all traceability markers (@awa-component, @awa-impl, @awa-test).
You SHALL run awa check after refactoring to verify all traceability markers are preserved and still resolve correctly.
You SHALL ensure tests pass before and after refactoring.
You SHALL make incremental changes, not wholesale rewrites.
You SHALL NOT change public interfaces without explicit approval.
You SHALL update user-facing documentation when implementation changes user-facing behavior, CLI, API, or configuration.
You SHALL clarify scope and risks with user before major refactors.
You MAY use todos and tools as needed.