Using Redis Token Buckets
PostHog/posthog
A skill your agent uses 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…
A Staff Infrastructure Engineer interviewer. An agent skill from PrepLabsAI/InterviewMentor.
$ npx skills add PrepLabsAI/InterviewMentor --skill rate-limiter-interviewer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PrepLabsAI/InterviewMentor rate-limiter-interviewer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/systems-design/rate-limiter-interviewer .claude/skills/rate-limiter-interviewer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "rate-limiter-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/systems-design/rate-limiter-interviewer into .claude/skills/rate-limiter-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rate-limiter-interviewer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/systems-design/rate-limiter-interviewerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add PrepLabsAI/InterviewMentor --skill rate-limiter-interviewer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PrepLabsAI/InterviewMentor rate-limiter-interviewer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agents/systems-design/rate-limiter-interviewer .agents/skills/rate-limiter-interviewer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rate-limiter-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/systems-design/rate-limiter-interviewer into .agents/skills/rate-limiter-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rate-limiter-interviewer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PrepLabsAI/InterviewMentor --skill rate-limiter-interviewer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PrepLabsAI/InterviewMentor rate-limiter-interviewer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agents/systems-design/rate-limiter-interviewer .cursor/skills/rate-limiter-interviewer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rate-limiter-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/systems-design/rate-limiter-interviewer into .cursor/skills/rate-limiter-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rate-limiter-interviewer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/PrepLabsAI/InterviewMentor.git --path agents/systems-design/rate-limiter-interviewer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PrepLabsAI/InterviewMentor --skill rate-limiter-interviewer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PrepLabsAI/InterviewMentor rate-limiter-interviewer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agents/systems-design/rate-limiter-interviewer .gemini/skills/rate-limiter-interviewer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rate-limiter-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/systems-design/rate-limiter-interviewer into .gemini/skills/rate-limiter-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rate-limiter-interviewer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install PrepLabsAI/InterviewMentor rate-limiter-interviewerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add PrepLabsAI/InterviewMentor --skill rate-limiter-interviewer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .github/skills && cp -r skills-src/agents/systems-design/rate-limiter-interviewer .github/skills/rate-limiter-interviewer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rate-limiter-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/systems-design/rate-limiter-interviewer into .github/skills/rate-limiter-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rate-limiter-interviewer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PrepLabsAI/InterviewMentor --skill rate-limiter-interviewer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PrepLabsAI/InterviewMentor rate-limiter-interviewer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agents/systems-design/rate-limiter-interviewer .opencode/skills/rate-limiter-interviewer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rate-limiter-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/systems-design/rate-limiter-interviewer into .opencode/skills/rate-limiter-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rate-limiter-interviewer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rate-limiter-interviewerA Staff Infrastructure Engineer interviewer. An agent skill from PrepLabsAI/InterviewMentor.
Rate Limiter Interviewer is an agent skill from PrepLabsAI/InterviewMentor. A Staff Infrastructure Engineer interviewer. Use this agent to practice designing API Gateways and Rate Limiters. It tests your knowledge of rate-limiting algorithms (Token Bucket, Sliding Window), Redis memory management, and how to handle distributed race conditions using Lua scripts.
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/problems.md` and `references/remotion-components.md`).
It sits in Backend & APIs, covering Async programming, Rate limiting and Microservices. It works with Redis and Lua. The repository describes itself as: AI Based mock interviews for preparing for tech jobs. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 609d311. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Rate Limiter Interviewer loads about 2.1k tokens when it runs, and up to ~3k if it reads all its reference files. Until then it costs about 78 tokens; SKILL.md has 1,009 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from PrepLabsAI/InterviewMentor at commit 609d311, republished under its MIT licence (© PrepLabsAI). 1,009 words, ~2,093 tokens.
.claude/skills/rate-limiter-interviewer/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Target Role: SWE-II / Backend Engineer Topic: System Design - API Rate Limiter Difficulty: Medium
You are a Staff Infrastructure Engineer focused on API gateways and edge services. You care about protecting backend systems from abuse and noisy neighbors. You appreciate simple, elegant algorithms but demand rigor when it comes to distributed systems challenges, particularly around latency and race conditions.
When invoked, immediately begin Phase 1. Do not explain the skill, list your capabilities, or ask if the user is ready. Start the interview with a warm greeting and your first question.
Evaluate the candidate's ability to design a low-latency, high-throughput component that sits in the critical path of every API request. Focus on:
At the end of the final phase, generate a scorecard table using the Evaluation Rubric below. Rate the candidate in each dimension with a brief justification. Provide 3 specific strengths and 3 actionable improvement areas. Recommend 2-3 resources for further study based on identified gaps.
Rate: 3 tokens / second
Capacity: 5 tokens
[ Bucket ]
│ │ │ <-- Tokens added at fixed rate
▼ ▼ ▼
┌─────┐
│ ● ● │ <-- Current tokens (Available capacity)
│ ● ● │
└─────┘
│
▼
[ Request ] --> Takes 1 token to pass. If 0 tokens, return 429 Too Many Requests.Limit: 10 requests / minute
Current Time: 01:00:45 (45 seconds into current minute)
[ Previous Minute (01:00) ] [ Current Minute (01:01) ]
Count: 8 Count: 4
Estimated current count = (Previous Count * Weight) + Current Count
Weight = (60 - 45) / 60 = 0.25 (25% of previous minute overlaps with sliding window)
Estimated count = (8 * 0.25) + 4 = 2 + 4 = 6 requests
6 < 10 -> Allow RequestQuestion: "Which algorithm would you choose for an API rate limiter and why?"
Hints:
tokens_remaining and last_refill_timestamp. When a request comes in, you calculate how many tokens to add based on the time elapsed since last_refill_timestamp."Question: "If two requests for the same user hit two different API gateways at the exact same millisecond, how do you prevent them from reading the same token count and both allowing the request?"
Hints:
Question: "Calling Redis for every single API request adds 2-5ms of latency. How can we optimize this?"
Hints:
| Area | Novice | Intermediate | Expert |
|---|---|---|---|
| Algorithms | Only knows one | Compares pros/cons | Deeply understands memory/CPU trade-offs of each |
| Concurrency | Ignores it | Mentions locks | Uses Lua scripts or Redis INCR/atomic ops |
| Architecture | App server does it | Redis as centralized | Discusses local vs global state, latency optimization |
| Resilience | System crashes | Fail-closed | Fail-open strategy, monitoring, handling DDoS |
For the complete problem bank with solutions and walkthroughs, see references/problems.md. For Remotion animation components, see references/remotion-components.md.
© PrepLabsAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in agents/systems-design/rate-limiter-interviewer of PrepLabsAI/InterviewMentor.
Open the folder on GitHubat commit 609d311
Rate Limiter Interviewer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Rate Limiter Interviewer this skillPrepLabsAI/InterviewMentor | 112 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Using Redis Token BucketsPostHog/posthog | 40k | — | ~1.6k | Automated safety check: Pass | Custom licence | |
| Upstash Ratelimit TSupstash/ratelimit-js | 2k | — | ~313 | Automated safety check: Pass | MIT | |
| Redis Patternsaffaan-m/ECC | 276k | 1 repos | ~3k | Automated safety check: Pass | MIT | |
| Amazon Elasticacheaws/agent-toolkit-for-aws | 2.8k | — | ~4.5k | Automated safety check: Pass | Apache-2.0 | |
| Upstash Redisgithub/awesome-copilot | 40k | — | ~1.7k | Automated safety check: Pass | MIT |
PostHog/posthog
A skill your agent uses 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…
upstash/ratelimit-js
Lightweight guidance for using the Redis Rate Limit TypeScript SDK, including setup steps, basic usage, and pointers to advanced algorithm, features, pricing, and traffic‑protection docs.
affaan-m/ECC
Redis data structure patterns, caching strategies, distributed locks, rate limiting, pub/sub, and connection management for production applications.
aws/agent-toolkit-for-aws
Activate when developers have latent caching needs: slow API responses, database read bottlenecks, DynamoDB throttling or cost, RDS/Aurora scaling pressure, Bedrock latency or cost, or adding a…
github/awesome-copilot
Use Redis over HTTP from serverless and edge runtimes with @upstash/redis, and add rate limiting with @upstash/ratelimit.
rrezartprebreza/spring-boot-skills
A skill your agent uses when implementing caching, session storage, rate limiting, or any Redis integration.
PrepLabsAI/InterviewMentor
A VP of Product interviewer that simulates a product strategy interview focused on AI-native products.
PrepLabsAI/InterviewMentor
A Staff Engineer interviewer specializing in API architecture and developer experience.
PrepLabsAI/InterviewMentor
An entry-level software engineering interviewer specializing in fundamental data structures.
PrepLabsAI/InterviewMentor
An entry-level software engineering interviewer specializing in binary tree data structures.
PrepLabsAI/InterviewMentor
An on-call SRE interviewer who just got paged about a broken checkout API.
PrepLabsAI/InterviewMentor
A Senior Performance Engineer interviewer focused on caching strategies.
Categories
A Staff Infrastructure Engineer interviewer. An agent skill from PrepLabsAI/InterviewMentor. Rate Limiter Interviewer is an agent skill from PrepLabsAI/InterviewMentor. A Staff Infrastructure Engineer interviewer.
Rate Limiter Interviewer fits situations like: tasks that involve Async programming; tasks that involve Rate limiting; tasks that involve Microservices.
Run `npx skills add PrepLabsAI/InterviewMentor --skill rate-limiter-interviewer -a claude-code`. Or copy the skill folder (agents/systems-design/rate-limiter-interviewer in PrepLabsAI/InterviewMentor) into .claude/skills/rate-limiter-interviewer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PrepLabsAI/InterviewMentor --skill rate-limiter-interviewer -a codex`. Or copy the skill folder (agents/systems-design/rate-limiter-interviewer in PrepLabsAI/InterviewMentor) into .agents/skills/rate-limiter-interviewer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PrepLabsAI/InterviewMentor --skill rate-limiter-interviewer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rate-limiter-interviewer, .gemini/skills/rate-limiter-interviewer, .github/skills/rate-limiter-interviewer and .opencode/skills/rate-limiter-interviewer in your project.
SKILL.md names no scripts, command-line tools or credentials: Rate Limiter Interviewer is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Rate Limiter Interviewer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 908 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Rate Limiter Interviewer: Using Redis Token Buckets (PostHog/posthog, 40k stars), Upstash Ratelimit TS (upstash/ratelimit-js, 2k stars), Redis Patterns (affaan-m/ECC, 276k stars) and Amazon Elasticache (aws/agent-toolkit-for-aws, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
PrepLabsAI (a GitHub organization) maintains it in PrepLabsAI/InterviewMentor, which has 112 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 7, 2026.
Source: PrepLabsAI/InterviewMentor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.