Smithery Logo
MCPsSkillsDocsPricing
Login
Smithery Logo

Accelerating the Agent Economy

Resources

DocumentationPrivacy PolicySystem Status

Company

PricingAboutBlog

Connect

© 2026 Smithery. All rights reserved.

    row0902

    optimize-codebase

    row0902/optimize-codebase
    Coding
    1 installs

    About

    SKILL.md

    Install

    Install via Skills CLI

    or add to your agent
    • Claude Code
      Claude Code
    • Codex
      Codex
    • OpenClaw
      OpenClaw
    • Cursor
      Cursor
    • Amp
      Amp
    • GitHub Copilot
      GitHub Copilot
    • Gemini CLI
      Gemini CLI
    • Kilo Code
      Kilo Code
    • Junie
      Junie
    • Replit
      Replit
    • Windsurf
      Windsurf
    • Cline
      Cline
    • Continue
      Continue
    • OpenCode
      OpenCode
    • OpenHands
      OpenHands
    • Roo Code
      Roo Code
    • Augment
      Augment
    • Goose
      Goose
    • Trae
      Trae
    • Zencoder
      Zencoder
    • Antigravity
      Antigravity
    ├─
    ├─
    └─

    About

    Proactive maintenance to reduce complexity and remove dead code.

    SKILL.md

    🧹 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 .
    
    Repository
    row0902/agents
    Files