← Back to list

refactoring
by atusy
⭐ 22🍴 0📅 Jan 16, 2026
SKILL.md
name: refactoring description: Guide code refactoring using Martin Fowler's catalog of behavior-preserving transformations. Use during TDD REFACTOR phase, when code smells are detected (duplication, long methods, feature envy), when discussing structural improvements, or before behavioral changes (Tidy First).
Refactoring Skill
Apply behavior-preserving transformations to improve quality of any codes, including tests.
Core Principle
"Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior." — Martin Fowler
Structural Changes Only
Allowed:
- Renaming for clarity
- Extracting functions/methods
- Removing duplication
- Simplifying expressions
- Moving files/modules between directories
- Reorganizing module boundaries
NOT allowed:
- Adding new functionality
- Fixing bugs (if you find one, write a failing test first)
- Changing observable behavior in any way
See library-application-criteria.md for public API constraints (libraries vs applications).
Refactoring Workflow
- Ensure tests pass (you need a safety net)
- Identify ONE smell to address
- Choose appropriate pattern from
patterns.md - Apply mechanically in small steps
- Run tests after each step
- Commit when green
Safety Rules
- Never refactor with failing tests
- One pattern at a time
- Commit after each successful refactor
- Revert immediately if tests fail
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon