Safely improve code quality through test-driven refactoring with automatic validation and rollback. Use during quality review to reduce technical debt while preserving behavior.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Safely improve code quality through test-driven refactoring with automatic validation and rollback. Use during quality review to reduce technical debt while preserving behavior.
acceptance
[{"config_validated":"Configuration allows refactoring and prerequisites verified"},{"opportunities_identified":"Refactoring opportunities identified and prioritized by risk"},{"refactorings_applied":"Selected refactorings applied incrementally with test validation"},{"log_created":"Refactoring log documenting all changes with rationale"},{"tests_passing":"All tests passing after refactoring with no behavioral changes"}]
inputs
{"task_file":{"type":"string","required":true,"description":"Path to task specification with quality findings"},"aggressiveness":{"type":"enum","required":false,"description":"Refactoring scope: conservative, moderate, aggressive","default":"moderate"},"allow_refactoring":{"type":"boolean","required":false,"description":"Override config to allow/disallow refactoring"}}
outputs
{"refactorings_applied":{"type":"number","description":"Number of refactorings successfully applied"},"refactorings_failed":{"type":"number","description":"Number of refactorings that failed and were rolled back"},"files_modified":{"type":"array","description":"List of files modified during refactoring"},"quality_impact":{"type":"object","description":"Before/after quality metrics showing improvements"}}
Safely improve code quality through automated refactoring while maintaining behavioral correctness. This skill identifies refactoring opportunities from quality findings and applies them incrementally with continuous test validation.
Core Capabilities:
Test-driven refactoring (run tests after each change)
Refactoring opportunities identified and prioritized
Selected refactorings applied incrementally
All tests passing after refactoring
Refactoring log created with full documentation
Task file updated with summary
Quality metrics improved or maintained
User notified with actionable next steps
Safety Guarantees
Behavioral preservation (no functionality changes) | Test validation (after each change) | Automatic rollback (on failures) | Full traceability (logged) | Incremental (one at a time) | User control (choose scope)
Integration with Quality Review
Runs after nfr-assess, before quality-gate in quality workflow. Optional - only if user opts in and tests exist/pass. Improvements reflected in final gate decision.