Back to list
Shiminize

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 TypeDetected PatternThe "Pro" Fix
Type Safetyany, FunctionUse unknown, generics, or specific Interfaces.
Debug Noiseconsole.log()Remove or use logger.info() (only if necessary).
ComplexityFile > 300 linesExtract sub-components to ./components/<Name>/.
ExportsUnused exportDelete it. Dead code is technical debt.

2. Manual Cleanup Checklist

  • Comments: Delete "What" comments. Keep "Why" comments.
  • Naming: do variables explain themselves? (d vs durationInMs).
  • Imports: Are imports organized? (Absolute vs Relative).

🚀 Workflows

Workflow A: The "Boy Scout" Pattern

Use this when you are just passing through a file.

  1. Scan: visually checks for any or console.log.
  2. Fix: Apply the "Pro" fix immediately.
  3. Leave: Do not start a massive refactor unless requested.

Workflow B: The "Deep Clean"

Use this when assigned a refactoring task.

  1. Measure: Run scan-quality-metrics.js to get a baseline.
  2. Plan: Identify the top 3 "God Components" to break down.
  3. Execute: Break them down one by one.
  4. Verify: Ensure functionality is unchanged (Run Smoke Tests).

🧠 Philosophy

"If you can't type it, you don't understand it." Avoid shortcuts. any is 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