complexity-optimizer

Scan code repositories for algorithmic complexity hotspots and safe optimizations.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/materkey/cc-plugins --skill complexity-optimizer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: complexity-optimizer
Source: https://github.com/materkey/cc-plugins/tree/main/plugins/complexity-optimizer/skills/complexity-optimizer
Command: npx skills add https://github.com/materkey/cc-plugins --skill complexity-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you identify algorithmic complexity problems and performance hotspots in a codebase, then turn them into safe, behavior-preserving improvements instead of risky rewrites.

Core Features & Use Cases

  • Repository hotspot scanning: Detects likely nested loops, repeated membership checks, sorting inside loops, render-path recomputation, and possible N+1 query patterns across multiple languages.
  • Conservative optimization workflow: Separates reporting from implementation, ranks findings by likely impact, and emphasizes preserving tests, APIs, ordering, and observable behavior.
  • Practical engineering guidance: Supports code audits, performance reviews, large-repo scans, and targeted optimization work where you need clear complexity before/after reasoning and focused verification.

Quick Start

Ask the complexity-optimizer skill to scan your repository for algorithmic complexity hotspots and propose the safest high-impact fixes without changing behavior.

Frequently Asked Questions about complexity-optimizer

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

FAQPage Schema
How do I find algorithmic complexity hotspots and N+1 queries in my codebase?▼

Algorithmic complexity hotspots like nested loops and N+1 queries are found by scanning multi-file repositories to detect repeated scans, unnecessary sorting, and render-path recomputation across supported languages.

What is the safest way to optimize code performance without changing application behavior?▼

Safe performance optimization requires a conservative workflow that separates reporting from implementation, ranks findings by impact, and preserves existing tests, APIs, ordering, and observable behavior during refactoring.

Can I scan for nested iteration and performance issues across multiple programming languages?▼

Yes, complexity analysis can scan for nested iteration, repeated membership checks, and N+1 query patterns across Python, JavaScript, TypeScript, Java, Go, C-family, Ruby, PHP, and Swift codebases simultaneously.

How do I rank performance issues by impact during a code review?▼

Code review performance issues are ranked by likely impact through behavior-preserving analysis, which evaluates algorithmic complexity before and after proposed refactoring to prioritize the safest high-impact fixes.

What types of performance problems can static analysis detect in a large repository?▼

Static analysis in large repositories detects algorithmic complexity problems including nested loops, repeated scans, sorting inside loops, render-path recomputation, and possible N+1 query patterns across multiple files.

Does complexity optimization output structured reports for performance audits?▼

Yes, performance audits output structured markdown or JSON reports containing ranked findings, algorithmic complexity reasoning, and focused verification results for identified optimization opportunities.