GitHub radar

Claude Code Skill: Auto-Refactor AI Generated Code

Claude Code skill to evaluate code complexity of AI-generated code, refactor the worst hotspots, and output a before/after table.

This is a Claude Code plugin that’s optimized for AI-generated code. It evaluates the complexity of every function and locates the worst hotspots for automatic refactoring, simplifying complex conditionals with straightforward logic. At the end of each iteration, this skill creates a table of before-and-after code complexity scores to help you understand which functions have been improved. Supports all languages that complexity analysis tools support and will follow your project’s linter rules if configured.

Why a vibe-coder should care

AI-generated code is functional but as the project scales, it gets more difficult for the AI to understand the code. Use this skill to automate code readability and respond to refactor and review requests to keep the codebase maintainable.

How to install

Copy this and send it to your agent — Claude Code, Codex, any of them:

Install the skill from https://github.com/saurabhkumar8112/cyclomatic-complexity-skill using /plugin marketplace add in Claude Code, run it on the current project, and show a before/after complexity table with what improved.
Open on GitHub