- Home
- Skills
- APIs & Backend
- API Rate Limit & Abuse Review (OTP, AI, Exports)
Works with the AI Agents you already use
API Rate Limit & Abuse Review (OTP, AI, Exports)
Bots do not need to hack your database to ruin your business.
$5
API Rate Limit & Abuse Review (OTP, AI, Exports)
Example session with this skill installed
Our SMS bill tripled this week and someone is hammering the AI chat endpoint. Review our Next.js + Supabase API for abuse.
- Read your context and instructions
- Compiled the api rate limit
Abuse review: Next.js + Supabase
| Endpoint | Tag | Current protection | Risk | Limit to apply |
|---|---|---|---|---|
POST /api/otp/send | SMS | None | SMS pumping: 1,900 OTPs to premium numbers in 6 countries you do not serve | Country allowlist (2), Turnstile before send, 3/10 min per phone, 10/h per IP |
POST /api/otp/verify | Auth | No attempt cap | 6-digit code brute-forceable in hours | 5 attempts per code, 10 min expiry |
POST /api/chat | Expensive | Auth only | One account sent 14k requests/day | 20/min burst, 200/day per user, 4k-token input cap, $30/day global cap |
GET /api/orders?limit= | Bulk read | No cap | limit=100000 full table scan | Server cap 100, cursor pagination |
GET /api/orders/[id] | Read | Uses service role, no owner check | IDOR: any order readable by ID | Use the user's session client so RLS applies |
POST /api/auth/reset | Auth | Different message for unknown email | Email enumeration | Same response for all |
Code added
lib/ratelimit.tswith Upstash limiters and aguard()helper returning 429 + Retry-After- Postgres
private.hit()limiter for the Edge Functions (no Redis needed) - Cloudflare WAF rule:
/api/otp*10/min per IP, block 10 min - Daily spend counter for AI and SMS that disables the feature and alerts at the cap
Monitoring
Alerts on OTP volume per country, AI spend per hour and the 429 rate. Supabase Auth rate limits and CAPTCHA are switched on in the dashboard.
Connects securely to your tools. The creator never sees your data.
About this skill
Bots do not need to hack your database to ruin your business. A simple script hitting an unprotected OTP endpoint can generate thousands of dollars in SMS pumping fraud overnight, while an uncapped AI route can drain your LLM credits in minutes. This skill identifies the high-cost and high-risk endpoints in your backend before they are exploited.
What it does
- Map endpoints by cost and sensitivity, categorizing routes like OTP, Auth, and expensive compute.
- Audit for SMS pumping by checking for country allowlists and per-number cooldowns on OTP services.
- Detect enumeration risks in login and signup flows that leak user existence through timing or response differences.
- Identify unbounded queries that allow attackers to crash databases via massive page limits or "export all" requests.
- Review expensive compute routes like LLMs and image generation for missing per-user quotas and daily spend caps.
- Generate enforcement code providing ready-to-use snippets for rate limiting and server-side validation.
How it works
- Catalog routes and tag them based on their impact, such as Sends SMS, Auth, or Expensive Compute.
- Apply the check list to each route to find missing limits, IDOR vulnerabilities, and brute-force windows.
- Generate implementation code for your specific stack, including Redis or Postgres-based limiters.
- Define monitoring alerts for spend spikes and 429 error rates.
Frameworks & tools
This skill provides implementation patterns for Next.js, Node.js, Express, Supabase, Cloudflare WAF, and Firebase App Check. It includes specific logic for Upstash Ratelimit and Redis backends.
Why this beats prompting it yourself
Generic security prompts often miss the financial side of API abuse, like premium-rate SMS ranges or LLM token draining. This skill uses a structured matrix to ensure no expensive or sensitive route is overlooked, providing the exact 429 logic and Retry-After headers required for professional API design.
Use cases
- Protect an OTP endpoint from SMS pumping fraud.
- Add rate limits to a Next.js API that calls an LLM.
- Audit a backend for enumeration and IDOR before launch.
- Lock down file upload routes against storage and compute abuse.
Known limitations
Does not perform active penetration testing or automated traffic simulation. It is a design and code-level review tool for identifying missing controls.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
- Software
- APIorapp backend
- Optional
- RedisorUpstash
Cloudflare
Permissions
What's inside
Frequently Asked Questions
New in APIs & Backend
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.