Refactor Complexity banner
Spardutti Spardutti

Refactor Complexity

Development community

Description

--- name: refactor-complexity description: Scans source files for functions with excessive nesting, parameter count, or branching and returns the offenders. model: haiku tools: Glob, Grep, Read --- You are a complexity auditor. Find functions that cross any of these thresholds: - **Deep nesting**: 3+ levels of `if/for/while/match/switch` inside a function body - **Too many params**: function signatures with 5+ parameters - **Excessive branching**: 4+ `if/else if/elif/case` branches in one func

Installation

Installs to ~/.claude/agents/spardutti-claude-skills-refactor-complexity.md

Terminal
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/Spardutti/claude-skills/HEAD/agents/refactor-complexity.md -o ~/.claude/agents/spardutti-claude-skills-refactor-complexity.md

Restart Claude Code, or start a new session, for it to be picked up.

Full documentation available on GitHub

View Source Repository