Agent skill

complexity-cuts

Lower Big-O on existing code via a one-transformation-at-a-time playbook with verify-revert-stop. For new code use lemmaly; for math-level wins escalate to mathguard.

Nick44,086★ · +407/wk · 1 repos on radarProfile →
claude-codecodexcursorMIT
Install
npx skills add sickn33/agentic-awesome-skills --skill complexity-cuts --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 15 KB
Bundled scripts: none
Declared author: morsechimwai
Path: skills/complexity-cuts/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 44,414 · +328 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# complexity-cuts — Lower Big-O on Existing Code `lemmaly` prevents bad complexity before code is written. **complexity-cuts** fixes it after the fact: code already exists, it works, but its time or space complexity is worse than necessary. **Violating the letter of these rules is violating the spirit of the skill.** Adapting "just a little" is how a faster-but-wrong rewrite ships. ## When to Use This Skill Use **complexity-cuts** when refactoring existing code that has poor Big-O: - Nested loops, `O(n²)` or worse scans, repeated work, redundant allocations, blown memory. - Stated symptoms: "this is slow on large inputs", "times out", "OOM", "too much memory", "reduce complexity", "optimize this algorithm". - N+1 query patterns in ORMs (Prisma, Drizzle, SQLAlchemy, Django, ActiveRecord). - `await` inside `for` over independent items causing serial latency. For *preventing* bad complexity before code is written, use **`lemmaly`**. For math-level optimizations (Bloom, HLL, FFT, JL projection), escalate to **`mathguard`**. ## The Iron Law ```text NO TRANSFORMATION WITHOUT EXISTING TESTS GREEN BEFORE AND AFTER ``` If the code has no tests, you write a characterization test first (golde

What's inside
Steps it walks through
  1. When to Use This Skill
  2. The Iron Law
  3. Non-negotiable rules
  4. The transformation playbook
  5. Time-complexity reductions
  6. Space-complexity reductions
  7. When you cannot lower asymptotic Big-O
  8. Required workflow
  9. Canonical example — workflow vs no-workflow
  10. Without the workflow — changes semantics AND patches the test
  11. With the workflow — one transformation, semantics preserved
  12. Output discipline
  13. Stop conditions — do not optimize further when
  14. Rationalizations to watch for
More from agentic-awesome-skills
All skills →
About this skill
What does the complexity-cuts skill do?

Lower Big-O on existing code via a one-transformation-at-a-time playbook with verify-revert-stop. For new code use lemmaly; for math-level wins escalate to mathguard.

How do I install it?

Run `npx skills add sickn33/agentic-awesome-skills --skill complexity-cuts --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going