Back to list
Row0902

optimize-codebase

by Row0902

0🍴 0📅 Jan 21, 2026

SKILL.md


name: Optimize Codebase description: Proactive maintenance to reduce complexity and remove dead code.

🧹 Optimize Codebase (The Mechanic)

Context

Entropy increases over time. This skill proactively fights it.

1. Complexity Scan (Cyclomatic Complexity)

  • Tool: ruff (mccabe plugin) or mental check.
  • Rule: If if/else/for nesting is > 3 levels, Refactor.
  • Action: Extract method.

2. Dead Code Removal

  • Unused Imports: Run uv run ruff check --select F401 --fix.
  • Unused Variables: Rename to _ or remove.
  • Commented Out Code: DELETE IT. Git history remembers.

3. Type Health

  • Any: Search for Any. Can we make it a TypedDict or Protocol?
  • Optional: specific types str | None are better than implicit None.

4. Optimization Routine (Run this)

# 1. Sort Imports
uv run ruff check --select I --fix .

# 2. Fix Formatting
uv run ruff format .

# 3. Check for specific complexity (C901)
uv run ruff check --select C901 .

Score

Total Score

35/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
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon