U
upstash-ratelimit-js
by @upstashv
4.6(120)
提供使用 Upstash Redis RateLimit TypeScript/JavaScript SDK 的轻量级指导,包括安装、创建速率限制器、应用滑动窗口等算法。帮助开发者快速为应用添加可靠的速率限制功能,防止滥用和过载,简化开发流程。
安装方式
npx skills add https://github.com/upstash/skills --skill upstash-ratelimit-jscompare_arrows
Before / After 效果对比
1 组使用前
开发者需要手动编写 Redis Lua 脚本实现速率限制逻辑,并反复调试和验证正确性,常常花费大量时间。
使用后
此技能提供了清晰的 SDK 文档和示例代码,开发者只需数行代码即可集成,大幅降低实现门槛。
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.
用户评价 (0)
发表评价
效果
易用性
文档
兼容性
暂无评价
统计数据
安装量21.3K
评分4.6 / 5.0
版本
更新日期2026年10月23日
对比案例1 组
用户评分
4.6(120)
5
37%
4
43%
3
13%
2
5%
1
2%
为此 Skill 评分
0.0
兼容平台
🤖claude-code
时间线
创建2026年7月19日
最后更新2026年10月23日