LaunchKit · 2026
Back to Skills

rate-limit-pro

Advanced rate limiting with tiered controls and quota management.

0
419 downloads
by @raghulpasupathi

Setup & Installation

openclaw skills install @raghulpasupathi/rate-limit-pro

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install rate-limit-pro

What This Skill Does

Rate Limit Pro is a JavaScript class that enforces per-user request quotas using sliding time windows and configurable tiers. It tracks request timestamps in memory and returns remaining quota, reset timing, and denial reasons on each check.

It handles sliding window tracking and multi-tier quota management in a single in-memory class with no external dependencies like Redis.

When to use it

  • Enforcing free-tier request caps in a multi-tenant API
  • Blocking abusive users before they exhaust shared resources
  • Differentiating access between free and paid plan users
  • Preventing burst traffic from a single user ID
  • Testing rate limit logic in a local dev environment

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: check if user123 can make another request on the free tier

AGENT
  1. 1Instantiate RateLimiter with free tier set to 10 requests per 60 seconds
  2. 2Call checkLimit('user123', 'free') to evaluate the current request count
  3. 3Filter out timestamps older than the 60-second window
  4. 4Return allowed status with remaining count, or denial reason with resetIn seconds
OUTPUT

{ allowed: true, limit: 10, remaining: 7, resetIn: 60 } or { allowed: false, reason: 'rate_limit_exceeded', resetIn: 23 }