AI Blocks

Putting the blocks together

This is taking longer than expected.

Try againBrowse the library
AI Blocks · All skills by job · Minds · Mini tools · How it works · From a source · Apps

AI Blocks › Keep your code secure

API rate limit adder

Point it at your API. Get rate limiting added with Upstash, using the right window type for each route.

API rate limit adder is a free AI skill for the job "Keep your code secure". 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

Made by sickn33. See the original on GitHub; we copied it as it is, with its licence.

What it does

Your API gets a request limit that works across every server instance, so one bad actor cannot flood your login or sign-up routes. You get the code in place and a clear reason for each choice. The skill uses the Upstash rate limit library with Upstash Redis, so all instances share the same counters. You need an Upstash account and two keys set in your environment. It picks a window type for each route: sliding window for smooth limits, fixed window for simple ones, and token bucket where short bursts are fine. The limiter is built once, outside the handler, so blocked callers are turned away without a database call. Over-limit callers get a 429 reply.

You give it

You get

Use it when

How to use it

  1. Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
  2. Ask for the job in your own words. Your AI opens the skill when it fits.
  3. It works best when your AI can edit your project files.

More for Keep your code secure

Every keep your code secure skill