rate-limiting

rate-limiting is a skill for Claude Code, Codex from LuuOW/meridian-mcp. It costs 36 tokens per session (1,374 once invoked), scanned A, original, MIT.

Configuration examples for limiting how many network or application requests a service accepts. They cover Nginx request and connection limits, iptables rules, and fail2ban thresholds.

In plain words
What is it for?
Use it to throttle API requests, limit concurrent connections, return HTTP 429 responses, add retry guidance, and block repeated abusive traffic.
Why use it?
It helps prevent one IP address or client from overwhelming an API or web service, especially on login and other sensitive routes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to throttle API requests, limit concurrent connections, return HTTP 429 responses, add retry guidance, and block repeated abusive traffic.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/luuow/meridian-mcp/rate-limiting
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LuuOW/meridian-mcp --skill rate-limiting
Clone the repo
git clone --depth 1 https://github.com/LuuOW/meridian-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rate-limiting

README.md
[![agentmods](https://agentmods.dev/badge/skills/luuow/meridian-mcp/rate-limiting/github.svg)](https://agentmods.dev/skills/luuow/meridian-mcp/rate-limiting)
Your own site
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/rate-limiting"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/rate-limiting/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rate-limiting

Your own site · 80×15
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/rate-limiting"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/rate-limiting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,374 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.01374
Opus 5 $0.00018 $0.00687
Sonnet 5 $0.00007 $0.00275
Haiku 4.5 $0.00004 $0.00137

Measured 8d ago against content hash 96b4e7f45f34, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

rate-limiting scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/rate-limiting/SKILL.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

rate-limiting

Configuration fragments for rate limiting at the network and application layers. These are composable patterns — pick the layer that fits your architecture.

Nginx — Request Rate Limiting

# nginx.conf or /etc/nginx/conf.d/rate-limit.conf

# Define zones in http block
http {
    # 10MB zone = ~160,000 IP addresses tracked
    limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;
    limit_req_zone $binary_remote_addr zone=login:10m rate=5r/m;
    limit_req_zone $http_x_forwarded_for zone=api_proxy:10m rate=10r/s;

    # Response on limit exceeded
    limit_req_status 429;
}
# server block — apply zones to routes
server {
    location /api/ {
        limit_req zone=api burst=20 nodelay;
        # burst=20: allows up to 20 queued requests above rate
        # nodelay: process burst immediately (no queuing delay)
        proxy_pass http://127.0.0.1:9002;
    }

    location /api/auth/login {
        limit_req zone=login burst=3 nodelay;
        proxy_pass http://127.0.0.1:9002;
    }

    # Add Retry-After header to 429 responses
    add_header Retry-After 60 always;
}

Nginx — Connection Limiting

http {
    # Track concurrent connections per IP
    limit_conn_zone $binary_remote_addr zone=conn_limit:10m;
    limit_conn_status 429;
}

server {
    location / {
        limit_conn conn_limit 20;    # max 20 concurrent connections per IP
        proxy_pass http://127.0.0.1:8080;
    }
}

iptables — Connection Rate Rules

# Limit new SSH connections: max 3 per minute per IP
iptables -A INPUT -p tcp --dport 22 -m state --state NEW \
  -m recent --set --name SSH
iptables -A INPUT -p tcp --dport 22 -m state --state NEW \
  -m recent --update --seconds 60 --hitcount 4 --name SSH -j DROP

# Limit new HTTP connections per IP (protect against slow-loris)
iptables -A INPUT -p tcp --dport 80 -m state --state NEW \
  -m limit --limit 50/min --limit-burst 100 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -j DROP

# Log before dropping (for monitoring)
iptables -A INPUT -p tcp --dport 80 -m state --state NEW \
  -m limit --limit 50/min --limit-burst 100 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 \
  -j LOG --log-prefix "RATE-LIMIT-DROP: "
iptables -A INPUT -p tcp --dport 80 -j DROP

Read the full file on GitHub · 156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 156 lines · 36 tokens per session scan A 96b4e7f45f34

Subscribe to this mod's changes

rate-limiting is a skill published in the GitHub repository LuuOW/meridian-mcp (0 stars, last pushed yesterday), licensed MIT. It adds 36 tokens to every session and 1,374 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

fastapi-guard

Production-ready security middleware for FastAPI. Use when adding IP filtering, rate limiting, per-route security decorators, route-resolution strict mode, global behavior rules, passive/log-only mode, or Guard Agent SaaS telemetry to a FastAPI app. Covers SecurityMiddleware setup, SecurityConfig tuning, and the…

rennf93/fastapi-guard · 72 tokens

API Rate Limiting Testing

Testing API rate limiting implementations including throttling behavior, burst handling, rate limit headers, and distributed rate limiting patterns.

PramodDutta/qaskills · 29 tokens

http_skill

HTTP request operations, supports GET/POST with timeout, SSRF protection and error handling.

sunchaokun/zensers · 20 tokens

http-client

An HTTP client for sending requests to web services. It supports common request methods, custom headers, authentication, and formatted responses.

chainlesschain/chainlesschain · 24 tokens

nextjs-pages-router

Set up tRPC in Next.js Pages Router with createNextApiHandler, createTRPCNext, withTRPC HOC, SSR via ssr option and ssrPrepass, SSG via createServerSideHelpers with getStaticProps, and server-side helpers for getServerSideProps prefetching.

trpc/trpc · 67 tokens

non-json-content-types

Handle FormData, file uploads, Blob, Uint8Array, and ReadableStream inputs in tRPC mutations. Use octetInputParser from @trpc/server/http for binary data. Route non-JSON requests with splitLink and isNonJsonSerializable() from @trpc/client. FormData and binary inputs only work with mutations (POST).

trpc/trpc · 75 tokens