AI Blocks › Build and ship software
Code speed planner
Before it writes loops or queries, it states the best approach and cost. Get code that avoids slow patterns.
Code speed planner is a free AI skill for the job "Build and ship software". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · CC BY 4.0 licence · Made by sickn33 · Level: advanced · Thinking: high
Made by sickn33. See the original on GitHub; we copied it as it is, with its licence.
What it does
Code that avoids slow patterns from the start. Before it writes a loop or a query, it states the best approach and what it will cost, so O(n squared) work and N+1 queries do not reach production. It acts as a gate for anything that touches many items: loops inside loops, a search inside a loop, an await inside a map over independent items, or one query per row. For each, it names a better structure, like a hash lookup, a sort once, a batch or a join. It can also audit existing code or a pull request for these known traps, including AI-written code that looks neat but hides slow steps.
You give it
- The task or the code to review
- Typical data size (optional)
- The language and database (optional)
- Codebase (optional)
You get
- The best approach with its cost
- Slow patterns found
- Faster replacements
- Code that avoids those patterns
Use it when
- A page gets slower as your data grows.
- Your code runs one database query per item.
- You are reviewing code that has a loop inside a loop.
- You want speed checked before code is written.
How to use it
- Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
- Ask for the job in your own words. Your AI opens the skill when it fits.
- It works best when your AI can read your project files.