complexity-mitigator

Analyze code complexity and produce a minimal flatten, rename, and extract plan.

66|2|Updated Feb 18, 2015
One-click install
npx skills add https://github.com/tkersey/dotfiles --skill complexity-mitigator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: complexity-mitigator
Source: https://github.com/tkersey/dotfiles/tree/main/codex/skills/complexity-mitigator
Command: npx skills add https://github.com/tkersey/dotfiles --skill complexity-mitigator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams reduce incidental cognitive load from tangled control flow, deep nesting, and opaque naming during code reviews and refactoring decisions, preserving essential domain meaning.

Core Features & Use Cases

  • Guided analysis: provide structured verdicts on essential vs incidental complexity without applying code edits.
  • TRACE-based assessment: produce a clear heat-read, hotspots, and actionable steps to flatten, rename, and extract.
  • Use Case: during a review of a legacy module, apply the complexity-mitigator to surface the minimal changes that improve readability while preserving behavior.

Quick Start

Use the complexity-mitigator skill to analyze a tangled function and produce a plan for simplification.

Frequently Asked Questions about complexity-mitigator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify incidental complexity vs essential complexity during a code review?

To identify incidental complexity during a code review, analyze tangled control flow and deep nesting to distinguish unnecessary cognitive load from essential domain logic. This approach provides structured verdicts and a heat-read without applying code edits.

What is the best way to refactor deeply nested code without altering its behavior?

The best way to refactor deeply nested code without altering behavior is to generate a minimal plan to flatten, rename, and extract logic. This produces a TRACE mapping and actionable steps that preserve essential domain meaning while improving readability.

How do I trace cross-file dependencies when refactoring a legacy module?

To trace cross-file dependencies when refactoring a legacy module, you need to map intricate algorithms and control flow across files. This process generates a TRACE mapping assessment that highlights hotspots and guides minimal structural changes.

Can I get a complexity analysis of tangled functions without automatically applying code edits?

Yes, you can get a complexity analysis of tangled functions without applying code edits. This analysis-only approach identifies hotspots and provides a recommended flatten, rename, and extract plan while strictly preserving the original codebase.

When should I use a heat-read assessment to improve code readability?

You should use a heat-read assessment to improve code readability when dealing with opaque naming and tangled control flow in legacy modules. It surfaces hotspots and incidental cognitive load, guiding actionable refactoring decisions during reviews.

Does complexity-mitigator apply automated refactoring edits to intricate algorithms?

No, complexity-mitigator does not apply automated refactoring edits to intricate algorithms. It satisfies an analysis-only requirement by identifying essential versus incidental complexity and providing a minimal recommended plan to flatten, rename, and extract structures.