agentleFS
metacircu1armetacircu1ar/hive_skills/skills/audit/audit-rate-limiting/SKILL.md

audit-rate-limiting

Skill4 starsChanged 2 months agoMITView on GitHub

Audit API and action routes for rate-limit coverage, identity keys, abuse cost, and policy fit. Use when reviewing public endpoints, authenticated APIs, auth flows, expensive operations, email sends, uploads, AI generation, payment actions, or launch readiness for abuse prevention.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Search for route and throttling terms such as rate, limit, throttle, quota, bucket, Redis, cache, middleware, plug, guard, login, reset, …

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Audit Rate Limiting

Scan every API route and action endpoint for rate-limit coverage and policy fit.

Workflow

  1. Inventory routes:
    • API routers, controllers, server actions, RPC procedures, websocket events, auth endpoints, upload endpoints, webhook receivers, and public pages that trigger server work.
  2. Locate rate-limit mechanisms:
    • Middleware, plugs, guards, reverse proxy config, gateway rules, CDN/WAF rules, queue throttles, per-provider limits, and library calls.
  3. Classify each route:
    • Public anonymous, authenticated user, admin, internal, webhook, or background-triggered.
    • Cheap read, expensive read, mutation, email/SMS send, file upload, AI generation, payment/revenue action, auth attempt, or data export.
  4. Evaluate policy fit:
    • Public unauthenticated routes usually need per-IP or per-device limits.
    • Authenticated user actions usually need per-user limits; some also need per-IP limits.
    • Expensive operations need tighter limits and cost-aware quotas.
    • Login, password reset, magic link, email send, invite, and OTP endpoints need abuse-specific limits.
    • Webhooks should usually authenticate by signature and may need provider/IP or event dedupe controls rather than user limits.
  5. Review test coverage for allowed requests, exceeded limits, identity-key separation, and reset behavior.

Common Findings

  • Route has no rate limit.
  • Limit key is only IP for a logged-in expensive action where per-user quota is required.
  • Limit key is only user for login/reset abuse where IP/device throttling is also needed.
  • Limits are stored in process memory in a horizontally scaled production app.
  • High-cost endpoints share the same loose policy as ordinary reads.
  • Failure response reveals unnecessary account existence information.

Useful Searches

Search for route and throttling terms such as rate, limit, throttle, quota, bucket, Redis, cache, middleware, plug, guard, login, reset, otp, email, invite, upload, generate, export, and webhook.

Output

Produce a route coverage table:

RouteClassificationLimit presentKeyStorePolicy fitTestsFinding
METHOD /pathexpensive mutationyes/noIP/user/etc.memory/Redis/etc.good/weak/missingyes/noissue

Then list prioritized fixes with file and line references, suggested policy, and test cases to add.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.