algorithmic-complexity-review
Installation
SKILL.md
dot-skills Algorithmic Complexity (Big-O) Best Practices
Find, classify, and fix algorithmic complexity (Big-O) problems in code — language-agnostic. The 39 rules across 8 categories cover the patterns responsible for the vast majority of accidental quadratic, exponential, and N+1 blowups in production code: nested iteration, loop-invariant I/O, data-structure mismatch, recursion explosions, redundant computation, collection-building anti-patterns, search/sort selection, and space traps.
When to Apply
Use this skill when:
- Reviewing a pull request or function for performance regressions
- Asked "why is this slow?" or "can we make this faster?"
- Refactoring a hot path or a function that handles user-scaled input
- Reading code that contains: nested loops,
.includes/.find/x in listinside iteration, ORM access in a loop, recursion without memoization, string/array building via+=or spread, file/database I/O inside iteration - Reviewing code that processes lists, trees, or streams whose size will grow
Workflow: Find, Classify, Fix
The skill is structured for a three-step workflow on any code under review: