← スキル一覧に戻る

code-refactoring
by dasien
Multi-agent development system template for Claude Code with specialized agents, task queue management, and automated workflows
⭐ 3🍴 1📅 2026年1月24日
SKILL.md
name: "Code Refactoring" description: "Improve code structure, readability, and maintainability without changing external behavior through systematic refactoring" category: "implementation" required_tools: ["Read", "Write", "Edit", "MultiEdit", "Grep", "Glob"]
Code Refactoring
Purpose
Improve code structure, readability, and maintainability without changing its external behavior or functionality.
When to Use
- Code is hard to understand or modify
- Duplicated code exists
- Functions are too long or complex
- Code smells are present
- Preparing for new features
Key Capabilities
- Extract Method - Break long functions into smaller pieces
- Rename - Improve variable/function names for clarity
- Remove Duplication - Consolidate repeated code
Approach
- Identify code that needs improvement
- Ensure tests exist before refactoring
- Make small, incremental changes
- Run tests after each change
- Commit working states frequently
Example
Before:
def process(data):
result = []
for item in data:
if item > 0 and item < 100 and item % 2 == 0:
result.append(item * 2)
return result
After:
def is_valid_even_number(n):
return 0 < n < 100 and n % 2 == 0
def process(data):
valid_numbers = filter(is_valid_even_number, data)
return [n * 2 for n in valid_numbers]
Best Practices
- ✅ Always have tests before refactoring
- ✅ Make small, incremental changes
- ✅ Run tests after each change
- ❌ Avoid: Refactoring and adding features simultaneously
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です