Agent Native

upstash-ratelimit-js

This skill adds rate limiting to serverless and edge applications using the Upstash Rate Limit TypeScript SDK backed by Upstash Redis.

by upstashCommunityNot reviewed

Community author

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
MIT (permissive)
Pin
b0850d0pinned Oct 9, 2026
Context cost
about 250 tokenswhen the skill loads
GitHub stars
30on upstash/skills
Scripts
None found

What it does

“Rate limiting for serverless and edge apps with the @upstash/ratelimit TypeScript/JavaScript SDK backed by Upstash Redis. Use when adding a rate limiter or throttling to an API route, Next.js middleware, Vercel Edge, Cloudflare Workers, or any HTTP endpoint; returning 429 Too Many Requests; choosing between fixed window, sliding window, and token bucket algorithms; limiting per user, IP, API key, or tenant with prefixes and custom keys; protecting login, signup, form, or AI endpoints from abuse, bots, and brute force; using deny lists, ephemeral caching, analytics, timeouts, and multi-region rate limits; or estimating the Redis command cost of rate limiting. Also use when the user says rate limit, rate-limiting, throttle, quota, request limits, or traffic protection.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill adds rate limiting to serverless and edge applications using the Upstash Rate Limit TypeScript SDK backed by Upstash Redis. It lets agents implement request throttling on API routes, middleware, and HTTP endpoints, selecting from fixed window, sliding window, and token bucket algorithms to protect against abuse and brute force attacks.

When to use it

  • Protecting login, signup, form, or API endpoints from abuse
  • Implementing per-user, per-IP, or per-API-key rate limits
  • Throttling requests in serverless or edge environments
  • Choosing between fixed window, sliding window, or token bucket strategies

When not to

  • Rate limiting is not needed for internal, trusted requests
  • Simpler in-memory throttling suffices for single-server applications

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add upstash/skills --skill upstash-ratelimit-js

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install upstash/skills upstash-ratelimit-js@b0850d0abedb81269e2ea07e755e9488c3d65d39

Installs the commit we checked (b0850d0).

Copy by hand

Download the folder at b0850d0 and put it in .claude/skills/upstash-ratelimit-js for Claude Code and in .agents/skills/upstash-ratelimit-js for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at b0850d0

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "upstash-ratelimit-js" by upstash.

Source, pinned to commit b0850d0abedb81269e2ea07e755e9488c3d65d39:
https://github.com/upstash/skills/tree/b0850d0abedb81269e2ea07e755e9488c3d65d39/skills/upstash-ratelimit-js

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/upstash-ratelimit-js/ for Claude Code and .agents/skills/upstash-ratelimit-js/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/upstash/upstash-ratelimit-js

SKILL.md at the pin

---
name: upstash-ratelimit-js
description: Rate limiting for serverless and edge apps with the @upstash/ratelimit TypeScript/JavaScript SDK backed by Upstash Redis. Use when adding a rate limiter or throttling to an API route, Next.js middleware, Vercel Edge, Cloudflare Workers, or any HTTP endpoint; returning 429 Too Many Requests; choosing between fixed window, sliding window, and token bucket algorithms; limiting per user, IP, API key, or tenant with prefixes and custom keys; protecting login, signup, form, or AI endpoints from abuse, bots, and brute force; using deny lists, ephemeral caching, analytics, timeouts, and multi-region rate limits; or estimating the Redis command cost of rate limiting. Also use when the user says rate limit, rate-limiting, throttle, quota, request limits, or traffic protection.
license: MIT
metadata:
  author: Upstash
  homepage: https://upstash.com
---

# Rate Limit TS SDK

## Quick Start
- Install the SDK and connect to Redis.
- Create a rate limiter and apply it to incoming operations.

Example:
```ts
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.

From upstash/skills at b0850d0, shown as plain text under its license: MIT (permissive). The license text is in skills/upstash-ratelimit-js/SKILL.md.

View SKILL.md on GitHub at b0850d0

Files

6 files, 17 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at b0850d0
All 2 skills from upstash

More from upstash

  • context7-cli

    This skill provides a CLI tool to fetch current library documentation from Context7 and configure Context7 MCP for AI coding editors.

    Claude Code, Codex, Cursor +4 · about 440 tokens · pinned 6 days ago

All Backend and APIs skills
  • auth

    This skill guides implementing user authentication in Next.js applications using Clerk, Better Auth, Descope, Auth0, or Vercel's own identity primitives like…

    by VercelOfficial publisher

    Claude Code, Codex, Cursor +3 · about 5K tokens · pinned 6 days ago

  • flags-sdk

    The Flags SDK is a feature flags toolkit for Next.js and SvelteKit that declares flags as functions and evaluates them server-side.

    by VercelOfficial publisher

    Claude Code, Codex, Cursor +3 · about 5.8K tokens · pinned 6 days ago

  • queues

    Vercel Queues enables agents to publish JSON messages to durable topics using @vercel/queue (JavaScript) or vercel-queue (Python), with consumer functions…

    by VercelOfficial publisher

    Claude Code, Codex, Cursor +3 · about 1.6K tokens · pinned 6 days ago

  • vercel-connect

    Vercel Connect lets applications obtain short-lived scoped credentials from third-party services like Slack, GitHub, and Linear without storing API keys in…

    by VercelOfficial publisher

    Claude Code, Codex, Cursor +3 · about 4.4K tokens · pinned 6 days ago

  • inngest-setup

    This skill sets up Inngest, a durable execution platform, in TypeScript projects for building retry-safe webhook handlers, background jobs, and scheduled tasks.

    by InngestOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.9K tokens · pinned 6 days ago

  • cloudflare-email-service

    This skill enables agents to send transactional emails and route incoming emails using Cloudflare's Email Service platform.

    by CloudflareOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.6K tokens · pinned 6 days ago

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use