[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76W36HTYA4BR5FKCWMX1RFR":3,"skill-same:01M76W36HTYA4BR5FKCWMX1RFR":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M76W36HTYA4BR5FKCWMX1RFR","upstash-ratelimit",null,"Rules, standards, and references for rate limiting in serverless environments using Upstash Ratelimit. Use when implementing rate limiting, configuring Upstash Redis, or handling request blocking.","ngxccc\u002Fagent-skills-kit","ngxccc","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F163379246?v=4","01M758XVG64QK26AGK0WKB26TB","Ngoc Tran","01M758XVHB8J6MHV0YTBVDBXCA",0,"MIT","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fupstash-ratelimit\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: upstash-ratelimit\ndescription: Rules, standards, and references for rate limiting in serverless environments using Upstash Ratelimit. Use when implementing rate limiting, configuring Upstash Redis, or handling request blocking.\nlicense: MIT\nargument-hint: \"[--limit \u003Cnumber>] [--window \u003Cstring>]\"\nmetadata:\n  author: ngxc\n  version: 1.0.0\n---\n\n# Upstash Rate Limiting Guide\n\nComprehensive guide for rate limiting in stateless, serverless, and edge environments using `@upstash\u002Fratelimit`.\n\n## Core Principles\n\n1. **Stateless Compliance**: Never use in-memory rate limiting (`RateLimiterMemory`) in serverless environments (Vercel, AWS Lambda, Cloudflare Workers). Use `@upstash\u002Fratelimit` with Redis REST connections.\n2. **Graceful Fallback**: Handle Redis timeouts and missing credentials gracefully so that infrastructure issues do not crash the application or block legitimate users.\n3. **Identifier Granularity**: Rate limit based on the narrowest specific identifier (e.g., user ID, API key, or hashed client IP) to avoid blanket blocking.\n4. **Asynchronous Chores**: Wait for background analytics or MultiRegion synchronization promises (`pending`) to resolve before returning responses in serverless contexts.\n\n## When to Apply\n\nReference these guidelines when:\n\n- Enforcing rate limits on public or sensitive API routes and Server Actions.\n- Configuring Upstash Redis connection clients.\n- Implementing IP-based deny lists or traffic protection.\n- Optimizing rate limiting performance and costs in Cloudflare Workers or Vercel Edge.\n\n## Rule Categories by Priority\n\n| Priority | Category                | Impact   | Prefix   | Rules |\n| -------- | ----------------------- | -------- | -------- | ----- |\n| 1        | Connection & Setup      | CRITICAL | `setup-` | 2     |\n| 2        | Algorithm Selection     | HIGH     | `algo-`  | 1     |\n| 3        | Features & Optimization | HIGH     | `feat-`  | 3     |\n\n## Quick Reference\n\n### 1. Connection & Setup (CRITICAL)\n\n- [setup-lazy-initialization](references\u002Fsetup-lazy-initialization.md) - Lazily initialize connection clients.\n- [setup-await-pending-promises](references\u002Fsetup-await-pending-promises.md) - Await pending promises in serverless.\n\n### 2. Algorithm Selection (HIGH)\n\n- [algo-sliding-window-over-fixed](references\u002Falgo-sliding-window-over-fixed.md) - Prefer sliding window for boundary accuracy.\n\n### 3. Features & Optimization (HIGH)\n\n- [feat-ephemeral-cache](references\u002Ffeat-ephemeral-cache.md) - Enable ephemeral caching for hot containers.\n- [feat-graceful-timeout](references\u002Ffeat-graceful-timeout.md) - Configure client-side timeouts for fallback.\n- [feat-deny-list-protection](references\u002Ffeat-deny-list-protection.md) - Enable protection deny lists.\n\n## How to Use\n\nRead individual reference files for detailed guidelines, configurations, and code examples:\n\n- [setup-lazy-initialization](references\u002Fsetup-lazy-initialization.md)\n- [setup-await-pending-promises](references\u002Fsetup-await-pending-promises.md)\n- [algo-sliding-window-over-fixed](references\u002Falgo-sliding-window-over-fixed.md)\n- [feat-ephemeral-cache](references\u002Ffeat-ephemeral-cache.md)\n- [feat-graceful-timeout](references\u002Ffeat-graceful-timeout.md)\n- [feat-deny-list-protection](references\u002Ffeat-deny-list-protection.md)\n\n## Full Compiled Document\n\nFor the complete guide with all rules expanded: [AGENTS.md](AGENTS.md)\n\n## References\n\n- [Upstash Ratelimit Documentation](https:\u002F\u002Fupstash.com\u002Fdocs\u002Fredis\u002Fsdks\u002Fratelimit-ts\u002Foverview)\n- [Upstash Console](https:\u002F\u002Fconsole.upstash.com\u002F)\n","# Upstash Rate Limiting Guide\n\nComprehensive guide for rate limiting in stateless, serverless, and edge environments using `@upstash\u002Fratelimit`.\n\n## Core Principles\n\n1. **Stateless Compliance**: Never use in-memory rate limiting (`RateLimiterMemory`) in serverless environments (Vercel, AWS Lambda, Cloudflare Workers). Use `@upstash\u002Fratelimit` with Redis REST connections.\n2. **Graceful Fallback**: Handle Redis timeouts and missing credentials gracefully so that infrastructure issues do not crash the application or block legitimate users.\n3. **Identifier Granularity**: Rate limit based on the narrowest specific identifier (e.g., user ID, API key, or hashed client IP) to avoid blanket blocking.\n4. **Asynchronous Chores**: Wait for background analytics or MultiRegion synchronization promises (`pending`) to resolve before returning responses in serverless contexts.\n\n## When to Apply\n\nReference these guidelines when:\n\n- Enforcing rate limits on public or sensitive API routes and Server Actions.\n- Configuring Upstash Redis connection clients.\n- Implementing IP-based deny lists or traffic protection.\n- Optimizing rate limiting performance and costs in Cloudflare Workers or Vercel Edge.\n\n## Rule Categories by Priority\n\n| Priority | Category                | Impact   | Prefix   | Rules |\n| -------- | ----------------------- | -------- | -------- | ----- |\n| 1        | Connection & Setup      | CRITICAL | `setup-` | 2     |\n| 2        | Algorithm Selection     | HIGH     | `algo-`  | 1     |\n| 3        | Features & Optimization | HIGH     | `feat-`  | 3     |\n\n## Quick Reference\n\n### 1. Connection & Setup (CRITICAL)\n\n- [setup-lazy-initialization](references\u002Fsetup-lazy-initialization.md) - Lazily initialize connection clients.\n- [setup-await-pending-promises](references\u002Fsetup-await-pending-promises.md) - Await pending promises in serverless.\n\n### 2. Algorithm Selection (HIGH)\n\n- [algo-sliding-window-over-fixed](references\u002Falgo-sliding-window-over-fixed.md) - Prefer sliding window for boundary accuracy.\n\n### 3. Features & Optimization (HIGH)\n\n- [feat-ephemeral-cache](references\u002Ffeat-ephemeral-cache.md) - Enable ephemeral caching for hot containers.\n- [feat-graceful-timeout](references\u002Ffeat-graceful-timeout.md) - Configure client-side timeouts for fallback.\n- [feat-deny-list-protection](references\u002Ffeat-deny-list-protection.md) - Enable protection deny lists.\n\n## How to Use\n\nRead individual reference files for detailed guidelines, configurations, and code examples:\n\n- [setup-lazy-initialization](references\u002Fsetup-lazy-initialization.md)\n- [setup-await-pending-promises](references\u002Fsetup-await-pending-promises.md)\n- [algo-sliding-window-over-fixed](references\u002Falgo-sliding-window-over-fixed.md)\n- [feat-ephemeral-cache](references\u002Ffeat-ephemeral-cache.md)\n- [feat-graceful-timeout](references\u002Ffeat-graceful-timeout.md)\n- [feat-deny-list-protection](references\u002Ffeat-deny-list-protection.md)\n\n## Full Compiled Document\n\nFor the complete guide with all rules expanded: [AGENTS.md](AGENTS.md)\n\n## References\n\n- [Upstash Ratelimit Documentation](https:\u002F\u002Fupstash.com\u002Fdocs\u002Fredis\u002Fsdks\u002Fratelimit-ts\u002Foverview)\n- [Upstash Console](https:\u002F\u002Fconsole.upstash.com\u002F)\n",{"name":5,"license":15,"metadata":24,"description":7,"argument-hint":27},{"author":25,"version":26},"ngxc","1.0.0","[--limit \u003Cnumber>] [--window \u003Cstring>]","main","1ef0dcd00fe806a8dc4e0b7173b9db967c3ab274","skills\u002F.curated\u002Fupstash-ratelimit","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit","https:\u002F\u002Fgithub.com\u002Fngxccc","https:\u002F\u002Fngxccc.github.io","Make it work, make it right, make it fast.","2026-08-02 20:59:07",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add ngxccc\u002Fagent-skills-kit --skill upstash-ratelimit",{"tool":42,"command":43},"bunx","bunx skills add ngxccc\u002Fagent-skills-kit --skill upstash-ratelimit",{"tool":45,"command":46},"pnpm","pnpm dlx skills add ngxccc\u002Fagent-skills-kit --skill upstash-ratelimit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fupstash-ratelimit\u002FSKILL.md",true,[50,56,60,64,68,72,76],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"AGENTS.md","REFERENCE","参考文档",4159,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fupstash-ratelimit\u002FAGENTS.md",{"path":57,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Falgo-sliding-window-over-fixed.md",1728,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fupstash-ratelimit\u002Freferences\u002Falgo-sliding-window-over-fixed.md",{"path":61,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Ffeat-deny-list-protection.md",2558,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fupstash-ratelimit\u002Freferences\u002Ffeat-deny-list-protection.md",{"path":65,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Ffeat-ephemeral-cache.md",2433,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fupstash-ratelimit\u002Freferences\u002Ffeat-ephemeral-cache.md",{"path":69,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Ffeat-graceful-timeout.md",2116,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fupstash-ratelimit\u002Freferences\u002Ffeat-graceful-timeout.md",{"path":73,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fsetup-await-pending-promises.md",2620,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fupstash-ratelimit\u002Freferences\u002Fsetup-await-pending-promises.md",{"path":77,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fsetup-lazy-initialization.md",3273,"https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fupstash-ratelimit\u002Freferences\u002Fsetup-lazy-initialization.md",[81,88,95,102,109,116],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M76W3C8X6Q5DS0364KQT7W7A","zustand","Rules and standards for state management using Zustand in React and Next.js. Use when implementing client-side stores, persistence with localStorage, or preventing SSR hydration mismatch.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fzustand\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M76W39FJGES309VAH7SFWA9Y","zod","Zod v4 schema validation best practices. Use when defining schemas, utilizing safeParse, or customizing error messages.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fzod\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M76W32H4PS01WFRS7FNPK2G1","ui-design","UI\u002FUX and frontend design best practices guidelines (formerly frontend-design). This skill should be used when writing, reviewing, or designing frontend code to ensure accessibility, performance, and usability. Triggers on tasks involving HTML structure, CSS styling, responsive layouts, form design, animations, or accessibility improvements.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Fui-design\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M76W2YAP6RK8N0EVWFG54VD7","typescript","TypeScript performance, tsconfig, type errors, async patterns — triggered when the user asks to \"optimize TypeScript performance\", \"speed up tsc compilation\", \"configure tsconfig.json\", \"fix type errors\", \"improve async patterns\", or encounters TS errors (TS2322, TS2339, \"is not assignable to\"). Also triggers on .ts, .tsx, .d.ts file work involving type definitions, module organization, or memory management. Does NOT cover TypeScript basics, framework-specific patterns, or testing.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Ftypescript\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":19},"01M76W2RMAZNNJQ2HECH3X6ZSH","typescript-refactor","TypeScript and TSX refactoring and modernization guidelines from a principal specialist perspective, current to TypeScript 6.0 and React 19. This skill should be used when refactoring, reviewing, or modernizing TypeScript or React\u002FTSX code for type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving type architecture, narrowing, generics, discriminated unions, error handling, React component and hook typing, or migration to modern TypeScript features (satisfies, using, const type parameters, inferred type predicates, isolatedDeclarations, erasable syntax, import attributes).","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Ftypescript-refactor\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":19},"01M76W2J9TYYX02M823ST9MR7Q","typescript-advanced-patterns","Advanced TypeScript — type-level programming, library\u002FDSL APIs, declaration merging, modern language features at depth (decorators, using, const T, NoInfer, variance), and feature implementation patterns built on advanced types. Trigger on tasks involving recursive conditional types, infer patterns, mapped-type key remapping, variadic tuples, fluent builders with phantom state, schema-first inference (Zod\u002FValibot), end-to-end-typed API clients, finite state machines, module augmentation, and library-publishing concerns. Trigger even when the user does not say \"advanced\" — if the work involves type-level algorithms, library-author API design, or going beyond surface-level uses of TS 5.x features, this is the skill. Assumes the reader has absorbed the `typescript-refactor` skill — this one extends those patterns at depth, never restates them.","https:\u002F\u002Fgithub.com\u002Fngxccc\u002Fagent-skills-kit\u002Fblob\u002Fmain\u002Fskills\u002F.curated\u002Ftypescript-advanced-patterns\u002FSKILL.md",[],[]]