agentleFS
reaatechreaatech/mcp-gateway/skills/rate-limiting/skill.md

rate-limiting

Skill0 starsChanged 7 months agoMITView on GitHub

12 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use background-jobs, input-validation and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • YepAPISkill

    background-jobs

    Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

    Also in 3 projects that use this

  • hereshecodesSkill

    input-validation

    Use when processing user input, form data, file uploads, or query parameters

    Also in 3 projects that use this

  • wpankSkill

    caching

    Caching strategies, invalidation, eviction policies, HTTP caching, distributed caching, and anti-patterns. Use when designing cache layers, choosing eviction policies, debugging stale data, or optimizing read-heavy workloads.

    Also in 3 projects that use this

  • SentrySkill

    feature-flags

    Gate a Sentry feature behind a FlagPole feature flag. Use when adding a feature flag, registering a flag in temporary.py, checking a flag from Python or the frontend, enabling a flag in tests, or asking where FlagPole rollout config lives. Trigger on "add a feature flag", "gate this behind a flag", "register a flag", "features.has", "api_expose", "OrganizationFeature", "ProjectFeature", "FlagPole".

    Also in 3 projects that use this

  • xfstudioSkill

    secrets-management

    Implement secure secrets management for CI/CD pipelines using Vault, AWS Secrets Manager, or native platform solutions. Use when handling sensitive credentials, rotating secrets, or securing CI/CD environments.

    Also in 3 projects that use this

  • ElasticSkill

    accessibility

    Accessibility guidance for Kibana. Use this skill when working with or reviewing EUI components, resolving a11y-related (@elastic/eui) ESLint issues, and ensuring proper use of ARIA attributes, focus management, keyboard interactions, and accessible naming conventions.

    Also in 3 projects that use this

The file

We found no rules to list in this file: it reads as prose or reference rather than instructions.

Files
skill.md

Rate Limiting

Capability

Per-tenant rate limiting with token bucket algorithm and Redis-backed distributed state.

Package

@reaatech/mcp-gateway-rate-limit — packages/rate-limit/src/

Components

ComponentPurpose
rate-limiter.tsCore RateLimiter class + createRateLimiter factory
redis-store.tsDistributed rate limiting with Redis Lua scripts
memory-store.tsIn-memory rate limiting for development
quota-manager.tsDaily quota tracking
token-bucket.tsToken bucket algorithm (capacity, refill, consume)
rate-limit.middleware.tsExpress middleware with X-RateLimit-* headers

Rate Limit Headers

HeaderDescription
X-RateLimit-LimitMaximum requests allowed
X-RateLimit-RemainingRemaining requests in window
X-RateLimit-ResetUnix timestamp when limit resets
Retry-AfterSeconds to wait before retrying (on 429)

Error Handling

  • 429 Too Many Requests — JSON-RPC error format with retryAfter
  • Includes current limit status in response body
  • Fallback to memory store if Redis unavailable

Security Considerations

  • Rate limits enforced per-tenant (extracted from auth context)
  • Redis Lua scripts ensure atomic operations
  • Hard limits never exceeded (fail-closed on Redis errors)

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.