← Back to list

code-quality-refactoring
by Shiminize
⭐ 0🍴 0📅 Jan 26, 2026
SKILL.md
name: Code Quality & Refactoring description: Tools to enforce code cleanliness, reduce technical debt, and maintain architectural standards.
🧹 Code Quality & Refactoring Skill
This skill enforces the standards of the Code Reviewer and JavaScript Pro agents. It is the Health Monitor for your codebase.
🎯 When to Use
- After every Feature Implementation: Clean up the "construction site".
- Refactoring Legacy Code: When touching a file > 3 months old.
- Before
gated-commit: Ensure no blockers exist.
🛠️ Toolbelt
1. The Quality Scanner (Automated)
Detects "God Components", type safety violations, and leftover debug noise.
node .agent/skills/code-quality/scripts/scan-quality-metrics.js <target_directory>
Common Violations & Fixes:
| Violation Type | Detected Pattern | The "Pro" Fix |
|---|---|---|
| Type Safety | any, Function | Use unknown, generics, or specific Interfaces. |
| Debug Noise | console.log() | Remove or use logger.info() (only if necessary). |
| Complexity | File > 300 lines | Extract sub-components to ./components/<Name>/. |
| Exports | Unused export | Delete it. Dead code is technical debt. |
2. Manual Cleanup Checklist
- Comments: Delete "What" comments. Keep "Why" comments.
- Naming: do variables explain themselves? (
dvsdurationInMs). - Imports: Are imports organized? (Absolute vs Relative).
🚀 Workflows
Workflow A: The "Boy Scout" Pattern
Use this when you are just passing through a file.
- Scan: visually checks for
anyorconsole.log. - Fix: Apply the "Pro" fix immediately.
- Leave: Do not start a massive refactor unless requested.
Workflow B: The "Deep Clean"
Use this when assigned a refactoring task.
- Measure: Run
scan-quality-metrics.jsto get a baseline. - Plan: Identify the top 3 "God Components" to break down.
- Execute: Break them down one by one.
- Verify: Ensure functionality is unchanged (Run Smoke Tests).
🧠 Philosophy
"If you can't type it, you don't understand it." Avoid shortcuts.
anyis a virus that spreads. Kill it early.
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/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