Optimize Codebase

Community

Reduce complexity and prune dead code.

AuthorRow0902
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Codebases accumulate complexity and dead code over time, hindering maintainability and slowing development. This skill proactively reduces entropy by identifying hotspots, guiding refactors, and enforcing healthier type health.

Core Features & Use Cases

  • Complexity Scan: Detects cyclomatic complexity using Ruff (mccabe) or manual checks; if nesting > 3 levels, triggers refactor recommendations.
  • Dead Code Removal: Finds unused imports/variables and stale code; suggests removal or renaming to underscores.
  • Type Health: Spots Any usage and suggests TypedDict/Protocol alternatives for stricter typing.
  • Optimization Routine (Run this): Executes a routine to sort imports, fix formatting, and reassess complexity with Ruff.

Quick Start

Run the optimization routine to sort imports, fix formatting, and reduce complexity in your codebase.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Optimize Codebase
Download link: https://github.com/Row0902/agents/archive/main.zip#optimize-codebase

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.