بنقرة واحدة
refactor
Refactor code to fix DRY, SOLID, and Structure violations while preserving behavior.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Refactor code to fix DRY, SOLID, and Structure violations while preserving behavior.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Atomic execution for the project framework. Executes exactly one atomic task from `PLAN.md`.
Comprehensive Execution for the `SPAE` framework. Executes all tasks from `PLAN.md` sequentially in one invocation.
Optimization & Verification for the `SPAE` framework. Performs gap analysis on `PLAN.md`.
Orchestrate SPAE subagents sequentially through the structured workflow and lifecycle.
Task Decomposition for the `SPAE` framework. Decomposes `SPEC.md` into a `DAG` of atomic tasks in `PLAN.md`.
Orchestrate SPAE subagents sequentially through the spec, plan, and inspect phases of the structured workflow.
| name | refactor |
| description | Refactor code to fix DRY, SOLID, and Structure violations while preserving behavior. |
| user-invocable | true |
| argument-hint | [optional: file path, module, or focus area] |
references/refactoring-guide.md.DRY, SOLID, and Structure violations, improving maintainability
without altering observable behavior.Determine scope by the first available source:
Abort if no scope exists.
Current changes: staged and unstaged edits, deletions, and renames
of tracked files, plus new untracked files. Requires a versioned
project. Abort with a clear message if none detected.
See references/testing-guide.md for test structure, isolation,
mocking, assertion, and performance standards.
See references/shell-command-guide.md for command safety, timeouts,
redirects, and non-interactive environment directives.
references/testing-guide.md.references/shell-command-guide.md.antipatterns using the violation catalog in
references/refactoring-guide.md.Result: No Changes if none
detected: duplicated logic, long methods, large classes,
primitive obsession, SOLID violations.references/refactoring-guide.md.ACT step.ACT, and re-enter VERIFY.references/refactoring-guide.md.tsconfig.json, .eslintrc.*, webpack.config.*, vite.config.*,
jest.config.*, Makefile, pyproject.toml, Cargo.toml.@ts-ignore, eslint-disable, @SuppressWarnings, # type: ignore.as any,
! non-null assertions, or broadening union types.### Execution Summary
- **Actions**:
- [Terse list of actions taken]
- **Files**:
- [Terse list of affected files]
- **Findings**:
- [Terse list of notable findings]
- **Summary**:
- [Terse list of summary of changes]
> **Refactor Status** • `[scope]`
> **Result**: [Complete | No Changes | Failed]
> **Impact**: [Terse impact statement]