/uitkit:refactor:reduce-complexity [file] [function name or line number, optional]from uitkit
Reduces cyclomatic complexity and nesting depth in a function or file by applying early returns, extracting sub-functions, replacing conditionals with lookup tables, flattening loops, and simplifying boolean logic.
Ships in uitkit. Installing the plugin adds it to Claude Code.
Reduce the complexity of the code in $ARGUMENTS.
Read the target. If a specific function or line is given, focus there. Otherwise, identify the highest-complexity regions: deeply nested conditionals, long functions with many branches, guard chains that obscure the happy path.
Measure complexity signals:
if, else if, for, while, case, catch, &&, || branches)Apply targeted reductions:
Early returns / guard clauses:
Extract sub-functions:
isEligible(), hasPermission())Replace conditionals with data:
if/else or switch maps input values to output values, replace with a lookup table / mapFlatten nested loops:
.flatMap(), generators, or helper functions to avoid triple-nested loopsSimplify boolean logic:
const isExpired = date < now && !renewed)Do not reduce complexity by hiding it (e.g., moving a complex branch into a lambda that is immediately invoked). The goal is genuine simplification, not relocation.
Preserve all behavior exactly. Run a mental diff: every input that produced output X must still produce output X.
Output: original complexity estimate, new estimate, and a summary of each transformation applied.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
500 commands in this plugin
/ai-engineering:agent-scaffoldAgent ScaffoldScaffold a multi-step Claude agent with tool use, memory, and a defined stopping condition/ai-engineering:de:agent-scaffoldAgent ScaffoldEinen mehrstufigen Claude-Agent mit Tool-Use, Memory und einer definierten Stoppbedingung aufbauen/ai-engineering:de:eval-harnessEval HarnessGenerieren Sie ein Test-Harness zur Evaluierung eines LLM-Prompts oder einer Chain anhand eines Datensatzes/ai-engineering:de:mcp-server-genMcp Server GenGeneriere einen vollständig konfigurierten MCP-Server, der Tools, Ressourcen oder Prompts für eine bestimmte Domäne verfügbar macht/ai-engineering:de:prompt-improveGefundene ProblemeKritik und Umformulierung eines Prompts für Klarheit, Spezifität und Token-Effizienz/ai-engineering:de:rag-setupRag SetupScaffold a production-ready RAG pipeline for a given data source and stackClaude Code refuses to install this plugin
.claude-plugin/plugin.json: agents: Invalid input, skills: Invalid input
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
Other plugins' commands for the same job