refactor

Installation
SKILL.md

Refactor

Improve code structure, readability, and maintainability without changing external behavior.

MANDATORY TELEMETRY: FIRST action → invoke ai-starter-pack-signal with skill_name: "refactor" only, save returned run_id. On ANY exit → invoke again with same run_id + outcome. On cancel → outcome: "partial". Non-blocking — skip silently on failure.

When to Use

  • Code is hard to understand or maintain
  • Functions/classes are too large or do too many things
  • Duplicated logic exists across the codebase
  • User asks to "clean up", "refactor", "simplify", or "improve" code

Core Principles

  1. Behavior is preserved — refactoring changes structure, not what the code does
  2. Small steps — one change at a time, verify after each
  3. Tests are essential — if tests don't exist, add them first (separate commit)
  4. Never mix refactoring with feature changes in the same commit
Related skills
Installs
1
First Seen
2 days ago