complexity-optimizer
/complexity-optimizer
Analyze or improve codebase complexity and performance hotspots without broad rewrites. Use when reviewing nested loops, repeated scans, N+1 queries, rendering churn, excessive recomputation, slow tests, large-input paths, memory pressure, or requests to reduce complexity while preserving behavior and tests.
- Author
- markoblogo ↗
- Repository
- abvx-agent-skills ↗
- Licence
- MIT
- Last repository change
- 14.10.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 14.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Analyze or improve codebase complexity and performance hotspots without broad rewrites. Use when reviewing nested loops, repeated scans, N+1 queries, rendering churn, excessive recomputation, slow tests, large-input paths, memory pressure, or requests to reduce complexity while preserving behavior and tests.
Original author description
Analyze or improve codebase complexity and performance hotspots without broad rewrites. Use when reviewing nested loops, repeated scans, N+1 queries, rendering churn, excessive recomputation, slow tests, large-input paths, memory pressure, or requests to reduce complexity while preserving behavior and tests.
How it works
- Modes
- Workflow
- Safety Checklist
- Final Report
SKILL.md preview
--- name: complexity-optimizer description: Analyze or improve codebase complexity and performance hotspots without broad rewrites. Use when reviewing nested loops, repeated scans, N+1 queries, rendering churn, excessive recomputation, slow tests, large-input paths, memory pressure, or requests to reduce complexity while preserving behavior and tests. license: MIT metadata: abvx_status: experimental abvx_origin: adapted --- # Complexity Optimizer Optimize only when behavior is understood and can be preserved. A small measured improvement beats a clever rewrite. ## Modes - Report mode: rank opportunities and do not edit. - Implementation mode: change scoped code after identifying a repro, test, benchmark, or reviewable invariant. - Audit mode: scan broad areas, then inspect only the highest-impact leads. ## Workflow 1. Establish scope: language, framework, hot paths, data sizes, tests, build command, and user-facing risk. 2. Find leads: nested scans, repeated filtering, loops inside render paths, N+1 database/API calls, redundant serialization, unbounded recursion, cache misses, and avoidable work in hooks or lifecycle methods. 3. Rank by likely impact and blast radius. Treat static findings as leads, not proof. 4. For each serious finding, record: - file and location; - current pattern; - estimated current complexity; - proposed change; - expected complexity after change; - correctness risk; - verification needed. 5. Before editing, preserve behavior with existing tests, a focused regression test, a fixture, or a clear invariant. 6. Optimize conservatively: - replace repeated linear lookup with maps or sets when equality is stable; - pre-index or group data before joins; - batch database/API access while preserving tenant, permission, filtering, ordering, and pagination; - memoize derived UI data only when inputs are stable; - virtualize or paginate large rendered collections; - avoid caches without invalidation strategy. 7. Run narrow checks first, then broader relevant checks. ## Safety Checklist Before finalizing: - output ordering is preserved or intentionally changed; - duplicates and null/missing values are handled; - mutation and object identity assumptions are not broken; - authorization and tenant filters survive batching; - cache invalidation is explicit; - the original performance or failure signal was rerun. ## Final Report Include: - top findings or changed files; - before/after complexity estimates; - verification commands and results; - residual risks and missing measurement gaps.
Files in this package (3)
- SKILL.md 3 KB
- SKILL_CARD.md 1 KB
- agents/openai.yaml 1 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · markoblogo/abvx-agent-skills | 100 | MIT |
| sebastianbreguel/agent-complexity-optimizer | 100 | MIT |
| pproenca/dot-skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version e7fd8d62852f (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100time-complexity
Estimate Big-O time complexity of code via static analysis (tree-sitter MCP). Use when: complexity, big-o, performance, hotspot, time complexity, analyze complexity. - 100algorithmic-complexity-review
Algorithmic complexity (Big-O) review — finding nested loops, N+1 queries, exponential recursion, quadratic string builds, and other accidental complexity blowups. Covers Python, JavaScript/TypeScript, Java, Go, and similar languages. Use whenever writing, reviewing, or… - 100code-complexity-analysis
Analyzes source code to assess performance using algorithmic complexity (time and space) plus a machine-aware cost model (memory hierarchy, branches, ILP, SIMD, parallelism). Identifies bottlenecks and recommends algorithmic, data-structure, and constant-factor optimizations.… - 95swiftui-performance
Audit and improve SwiftUI runtime performance. Use when diagnosing slow rendering, janky scrolling, high CPU, memory usage, excessive view updates, layout thrash, body evaluation cost, identity churn, view lifetime issues, lazy loading, Instruments profiling guidance, and performance audit requests. - 100database-optimizer
Use this agent when you need to analyze slow queries, optimize database performance across multiple systems, or implement indexing strategies to improve query execution. - 100database-optimizer
Use this agent when you need to analyze slow queries, optimize database performance across multiple systems, or implement indexing strategies to improve query execution.