← LeaderboardThe Skill Leaderboard

refactoring

Apply Martin Fowler-inspired refactoring rules when improving existing code structure while preserving observable behavior.

Published by ciembor ↗ciembor/agent-rules-books

Try your first task

Plan a small behavior-preserving refactor

Start a fresh conversation.

Use the refactoring skill to review the existing code in <path-to-file-or-module>. Identify one concrete code smell and propose a small, behavior-preserving refactoring sequence. State which existing tests protect the behavior and which focused test should be added first if coverage is missing. Keep the refactoring separate from feature changes; do not modify files yet.

Required inputs

  • Path to an existing file or module
  • Optional description of the behavior that must remain unchanged

Suggested template by Skill Leaderboard, grounded in the linked source. Task evidence ↗

SKILL.md

name: refactoringdescription: Apply Martin Fowler-inspired refactoring rules when improving existing code structure while preserving observable behavior.license: MIT

Refactoring Skill

Use this skill when a task involves behavior-preserving code improvement, code smells, small refactoring steps, test-backed cleanup, or separating refactoring from feature changes.

Before making design or code decisions, read and apply refactoring.mini.md. Use refactoring.md only as a deeper reference when the mini rules are not enough for the current refactoring tradeoff.