SRA: Skill for Claude Code

.agents/skills/upstash-ratelimit-js/SKILL.md

upstash-ratelimit-js is a skill for Claude Code, Codex from Aniket-a14/SRA. It costs 177 tokens per session (446 once invoked), scanned A, original, Apache-2.0.

A TypeScript and JavaScript tool for limiting how often an API or other web endpoint can be used. It stores the limit data in Upstash Redis, a hosted key-value database, and can be used in serverless and edge applications.

In plain words
What is it for?
Use it to throttle API routes, Next.js middleware, Vercel Edge handlers, Cloudflare Workers, or other HTTP endpoints.
Why use it?
It prevents excessive requests and can return HTTP 429, meaning that the caller has sent too many requests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is Aniket-a14/SRA's own configuration. It tells Claude Code and Codex how to work on SRA itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything SRA configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Aniket-a14/SRA. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Aniket-a14/SRA/main/.agents/skills/upstash-ratelimit-js/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Aniket-a14/SRA

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 upstash-ratelimit-js

README.md
[![agentmods](https://agentmods.dev/badge/skills/aniket-a14/sra/upstash-ratelimit-js/github.svg)](https://agentmods.dev/skills/aniket-a14/sra/upstash-ratelimit-js)
Your own site
<a href="https://agentmods.dev/skills/aniket-a14/sra/upstash-ratelimit-js"><img src="https://agentmods.dev/badge/skills/aniket-a14/sra/upstash-ratelimit-js/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 upstash-ratelimit-js

Your own site · 80×15
<a href="https://agentmods.dev/skills/aniket-a14/sra/upstash-ratelimit-js"><img src="https://agentmods.dev/badge/skills/aniket-a14/sra/upstash-ratelimit-js.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 177 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 446 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.00177 $0.00446
Opus 5.5 $0.00071 $0.00178
Sonnet 5.5 $0.00035 $0.00089
Haiku 4.5 $0.00018 $0.00045

Measured 1mo ago against content hash 2bce4da07ec6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

upstash-ratelimit-js 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 1mo 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.agents/skills/upstash-ratelimit-js/SKILL.md · 36 lines

What it actually says

Rate Limit TS SDK

Quick Start

  • Install the SDK and connect to Redis.
  • Create a rate limiter and apply it to incoming operations.

Example:

import { Ratelimit } from "@upstash/ratelimit";
import { Redis } from "@upstash/redis";

const redis = new Redis({ url: "<url>", token: "<token>" });
const limiter = new Ratelimit({ redis, limiter: Ratelimit.slidingWindow(5, "10s") });

const { success } = await limiter.limit("user-id");
if (!success) {
  // throttled
}

Other Skill Files

  • algorithms.md: Describes all available rate‑limiting algorithms and how they behave.
  • pricing-cost.md: Explains pricing, Redis cost implications, and operational considerations.
  • features.md: Lists SDK features such as prefixes, custom keys, and behavioral options.
  • methods-getting-started.md: Full method reference for the SDK's API and getting started guide.
  • traffic-protection.md: Guidance on applying rate limiting for traffic shaping, abuse prevention, and protection patterns.
Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 36 lines · 177 tokens per session scan A 2bce4da07ec6

Subscribe to this mod's changes

upstash-ratelimit-js is a skill published in the GitHub repository Aniket-a14/SRA (24 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 177 tokens to every session and 446 once invoked, about $0.0007 per session on Opus 5.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-15.

Related

Other skills, from other repositories

using-redis-token-buckets

Use when adding a bucket-like rate limit backed by Redis: a per-caller budget with burst capacity and continuous refill, a refund path for requests that did no work, or a limit whose Retry-After must be a real wait rather than a window edge. posthog/tokenbucket.py provides an atomic Lua token bucket (consume, refund…

PostHog/posthog · 148 tokens

system-design-data-architecture

Choose and scale the data layer: SQL versus NoSQL per access pattern, single data ownership, replication and read scaling, partition key choice, hot partition and celebrity key mitigation. Use when selecting a store, planning sharding, or fixing a data-tier bottleneck.

HoangNguyen0403/agent-skills-standard · 59 tokens

caching

Caching strategies — invalidation, TTL guidelines, cache keys, cache layers, and when not to cache. Use when implementing or reviewing caching logic.

zebbern/termstack · 32 tokens

nextjs-app-router

Full end-to-end tRPC setup for Next.js App Router. Covers route handler with fetchRequestHandler (GET + POST exports), TRPCProvider with QueryClientProvider, createTRPCOptionsProxy for RSC prefetching, HydrateClient/HydrationBoundary for hydration, useSuspenseQuery for Suspense, and server-side callers.

trpc/trpc · 74 tokens

subscriptions

Set up real-time event streams with async generator subscriptions using .subscription(async function() { yield }). SSE via httpSubscriptionLink is recommended over WebSocket. Use tracked(id, data) from @trpc/server for reconnection recovery with lastEventId. WebSocket via wsLink and createWSClient from @trpc/client…

trpc/trpc · 118 tokens

client-setup

Create a vanilla tRPC client with createTRPCClient (), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.

trpc/trpc · 63 tokens