upstash-ratelimit-ts
Installation
SKILL.md
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.
Related skills
More from thedaviddias/ux-patterns-for-developers
ux-patterns
Use when choosing, comparing, or implementing UX patterns across the UX Patterns for Developers corpus.
8button
Use when you need to trigger actions and submit forms.
5toggle
Use when you need to switch between two states.
4autocomplete
Use when implementing suggest options as users type.
4notification
Use when you need to inform users about important updates.
3accordion
Use when implementing expand and collapse content sections.
3