Redis Specialist
FerroxLabs/wayland
Comprehensive Redis expertise covering all data structures (strings, hashes, lists, sets, sorted sets, streams), pub/sub messaging, Lua scripting, Redis Cluster architecture, Sentinel high…
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…
$ npx skills add PostHog/posthog-foss --skill using-redis-token-buckets -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PostHog/posthog-foss using-redis-token-buckets --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/PostHog/posthog-foss.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/using-redis-token-buckets .claude/skills/using-redis-token-buckets && 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 "using-redis-token-buckets" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/using-redis-token-buckets into .claude/skills/using-redis-token-buckets/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-redis-token-buckets", 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/PostHog/posthog-foss/tree/master/.agents/skills/using-redis-token-bucketsType 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 PostHog/posthog-foss --skill using-redis-token-buckets -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PostHog/posthog-foss using-redis-token-buckets --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/using-redis-token-buckets .agents/skills/using-redis-token-buckets && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "using-redis-token-buckets" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/using-redis-token-buckets into .agents/skills/using-redis-token-buckets/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-redis-token-buckets", 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 PostHog/posthog-foss --skill using-redis-token-buckets -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PostHog/posthog-foss using-redis-token-buckets --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/using-redis-token-buckets .cursor/skills/using-redis-token-buckets && 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 "using-redis-token-buckets" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/using-redis-token-buckets into .cursor/skills/using-redis-token-buckets/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-redis-token-buckets", 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/PostHog/posthog-foss.git --path .agents/skills/using-redis-token-buckets--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 PostHog/posthog-foss --skill using-redis-token-buckets -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PostHog/posthog-foss using-redis-token-buckets --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/using-redis-token-buckets .gemini/skills/using-redis-token-buckets && 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 "using-redis-token-buckets" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/using-redis-token-buckets into .gemini/skills/using-redis-token-buckets/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-redis-token-buckets", 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 PostHog/posthog-foss using-redis-token-bucketsInstalls 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 PostHog/posthog-foss --skill using-redis-token-buckets -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/using-redis-token-buckets .github/skills/using-redis-token-buckets && 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 "using-redis-token-buckets" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/using-redis-token-buckets into .github/skills/using-redis-token-buckets/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-redis-token-buckets", 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 PostHog/posthog-foss --skill using-redis-token-buckets -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PostHog/posthog-foss using-redis-token-buckets --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/using-redis-token-buckets .opencode/skills/using-redis-token-buckets && 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 "using-redis-token-buckets" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/using-redis-token-buckets into .opencode/skills/using-redis-token-buckets/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "using-redis-token-buckets", 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.
using-redis-token-bucketsA 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…
Using Redis Token Buckets is an agent skill from PostHog/posthog-foss, published by the product's own GitHub organization. Use 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 whose Retry-After must be a real wait rather than a window edge. posthog/tokenbucket.py provides an atomic Lua token bucket (consume, refund, peek) over posthog.redis.getclient(). Choose it over DRF SimpleRateThrottle/fixed-window cache counters when boundary bursts, top-of-window lockouts, or charge-then-refund semantics matter. Trigger…
Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Databases, covering Rate limiting. It works with Redis, PostHog and Lua. The repository describes itself as: PostHog FOSS is a read-only mirror of PostHog, with all proprietary code removed. NOTE: This repo is synced automatically from the main PostHog repo. Please raise any issues and… The licence is MIT.
Read from SKILL.md and the folder at commit 2c48221. 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 (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
limits.readthedocs.ioFrom 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.
Using Redis Token Buckets loads about 1.6k tokens when it runs. Until then it costs about 162 tokens; SKILL.md has 669 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 PostHog/posthog-foss at commit 2c48221, republished under its MIT licence (© PostHog). 669 words, ~1,628 tokens.
.claude/skills/using-redis-token-buckets/SKILL.md (or your agent's skills folder).posthog/token_bucket.py is the repo's primitive for bucket-like limits in Redis. A bucket holds up to burst tokens and refills continuously at per_hour / 3600 tokens per second. Every operation is atomic (a server-side Lua script), so concurrent web workers cannot double-spend a token.
Retry-After must be the real per-caller wait for the next token, not "seconds until the top of the hour"RateLimit-Limit/Remaining/Reset headers or a quota introspection endpoint (use peek)posthog/rate_limit.py (IPThrottle, UserRateThrottle, PersonalApiKeyRateThrottle). They integrate with DRF's lifecycle and the RATE_LIMIT_ENABLED instance setting.posthog/egress/ and its limits-library sliding-window limiter (posthog/egress/limiter/), which carries priorities and degraded fallbacks. /routing-outbound-api-calls covers the route.posthog/clickhouse/client/limit.py.limits (vendored library) vs this moduleThe repo also vendors the limits library (used by posthog/egress/limiter/backends.py). Pick by the semantics you need, not by familiarity:
limits when a plain window answers the question "no more than N per window" and nothing ever needs to be un-counted. Its MovingWindowRateLimiter/SlidingWindowCounterRateLimiter strategies avoid fixed-window boundary bursts, its RedisStorage runs its own Lua so hits are atomic, and test()/get_window_stats() cover peeking and remaining/reset. For outbound third-party calls specifically, don't use it directly; go through posthog/egress/, which wraps it with priorities and a degraded in-memory fallback.limits cannot express: a token bucket (independent burst capacity and refill rate), a refund path (its API is hit/test/get_window_stats/clear; there is no way to give a hit back), a Retry-After that is the wait for the next token rather than the window edge, or variable per-request cost.A custom script is the de-facto token-bucket implementation on stock Redis (no native rate-limit command; the redis-cell module is not deployed), and limits runs its own Lua anyway, so neither choice avoids Lua.
from posthog.token_bucket import Budget, BucketDecision, BucketUnavailable, consume, peek, refund
BUDGET = Budget(burst=30, per_hour=120) # capacity 30, refills one token every 30s
decision = consume(f"myfeature_rate:{team_id}", BUDGET)
match decision:
case BucketUnavailable():
... # Redis can't answer: usually fail open; fall through to a durable check if you have one
case BucketDecision(allowed=False):
raise Throttled(wait=decision.retry_after) # whole seconds, safe for a Retry-After header
case BucketDecision():
... # proceed; decision.remaining / .limit / .reset back RateLimit-* headers
# The request turned out to do no work (validation error, capability refusal):
refund(f"myfeature_rate:{team_id}", BUDGET)
# Introspection without charging (headers on reads, a /limits endpoint):
peek(f"myfeature_rate:{team_id}", BUDGET)Semantics worth knowing:
consume charges and answers in one atomic step. cost above burst is a programmer error (ValueError), not a denial.refund is capped at capacity and treats a missing key as an already-full bucket. Refund only what you charged; refunding on outcomes the caller controls (e.g. their own 4xxs they can trigger for free) is fine, refunding on outcomes an attacker controls to spin the bucket is not.peek is a plain read plus local refill math, so it can lose a sub-second race to a concurrent charge. Never gate anything on peek; gate on consume.<feature>_rate:), include every identity the budget is scoped to, and never include secrets. The bucket self-expires once it would be full again, so idle keys clean themselves up.BucketUnavailable and the caller decides fail-open vs fall-through. Do not swallow it silently; log or count it so an outage is visible.The agentic provisioning rate limits (ee/api/agentic_provisioning/ratelimits.py) are the canonical consumer: per-partner budgets declared on handlers with @rate_limited, tier multipliers, refund-on-no-work in handle_exception, RateLimit-* headers from the decision, and Prometheus counters around every outcome. Read it before building a second rate-limit layer on top of the bucket.
Under settings.TEST, posthog.redis.get_client() returns fakeredis, which executes the Lua scripts (via lupa). Control time with time_machine.travel(..., tick=False) (the script's clock is passed in from Python), reset between tests with posthog.redis.TEST_clear_clients() + posthog.token_bucket.TEST_reset_scripts(), and see posthog/test/test_token_bucket.py for the pattern.
© PostHog, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/using-redis-token-buckets of PostHog/posthog-foss.
Open the folder on GitHubat commit 2c48221
Using Redis Token Buckets 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 |
|---|---|---|---|---|---|---|
| Using Redis Token Buckets this skillPostHog/posthog-foss | 721 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Redis SpecialistFerroxLabs/wayland | 608 | — | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| Rate Limiter InterviewerPrepLabsAI/InterviewMentor | 112 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Resume Backend Project OptimizerLAIJiangFeng/resume-builder | 247 | — | ~868 | Automated safety check: Pass | None | |
| Redis ExpertRightNow-AI/openfang | 18k | — | ~821 | Automated safety check: Pass | Apache-2.0 | |
| Redis Patternsrohitg00/awesome-claude-code-toolkit | 2.7k | — | ~1.2k | Automated safety check: Pass | Apache-2.0 |
FerroxLabs/wayland
Comprehensive Redis expertise covering all data structures (strings, hashes, lists, sets, sorted sets, streams), pub/sub messaging, Lua scripting, Redis Cluster architecture, Sentinel high…
PrepLabsAI/InterviewMentor
A Staff Infrastructure Engineer interviewer. An agent skill from PrepLabsAI/InterviewMentor.
LAIJiangFeng/resume-builder
将中文后端项目经历改写为高质量、可面试追问、强数据化的简历要点。适用于用户提供“项目经历/主要工作/职责描述”后,要求按统一模板输出“负责xxx功能 + 关键技术细节组合 + 解决问题 + 数据化结果”的场景;适用于 Java 后端求职、简历优化、面试前项目复盘,且需要对齐面试高频考点(Java 集合与并发、MySQL、Redis、Spring、消息队列、系统设计等)时使用。
RightNow-AI/openfang
Redis expert for data structures, caching patterns, Lua scripting, and cluster operations
rohitg00/awesome-claude-code-toolkit
Redis patterns including caching strategies, pub/sub, streams for event processing, Lua scripts, and data structures
ericrisco/rsc-harness
A skill your agent uses when using Redis or any Redis-protocol store (Valkey, ElastiCache, Upstash, Dragonfly, Memorystore) as a cache, queue, rate limiter or distributed lock and it has to be…
PostHog/posthog-foss
Author useful, low-noise log alerts on services in a PostHog project.
PostHog/posthog-foss
Operating procedure for the conflict-autoresolver agent: sweep open PostHog/posthog PRs that conflict with master, resolve the trivial conflicts (generated artifacts deterministically, source…
PostHog/posthog-foss
Help users debug PostHog Error Tracking stack-trace symbolication for any supported platform — JavaScript/TypeScript web, React Native (Hermes), Android (Proguard / R8), or iOS / macOS (dSYM).
PostHog/posthog-foss
Investigates distributed application performance using PostHog APM (OpenTelemetry span) data via MCP.
PostHog/posthog-foss
Debug and inspect LLM/AI agent traces using PostHog's MCP tools.
PostHog/posthog-foss
Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries.
Categories
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…. Using Redis Token Buckets is an agent skill from PostHog/posthog-foss, published by the product's own GitHub organization. Use 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 whose Retry-After must be a real wait rather than a window edge.
Using Redis Token Buckets fits situations like: 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; A limit whose Retry-After must be a real wait rather than a window edge; terms: token bucket.
Run `npx skills add PostHog/posthog-foss --skill using-redis-token-buckets -a claude-code`. Or copy the skill folder (.agents/skills/using-redis-token-buckets in PostHog/posthog-foss) into .claude/skills/using-redis-token-buckets in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PostHog/posthog-foss --skill using-redis-token-buckets -a codex`. Or copy the skill folder (.agents/skills/using-redis-token-buckets in PostHog/posthog-foss) into .agents/skills/using-redis-token-buckets 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 PostHog/posthog-foss --skill using-redis-token-buckets -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/using-redis-token-buckets, .gemini/skills/using-redis-token-buckets, .github/skills/using-redis-token-buckets and .opencode/skills/using-redis-token-buckets in your project.
SKILL.md names no scripts, command-line tools or credentials: Using Redis Token Buckets is instructions for the agent only. Our summary lists: Python 3.
SKILL.md names 1 domain. As links in the text: limits.readthedocs.io. 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.
Using Redis Token Buckets is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Using Redis Token Buckets: Redis Specialist (FerroxLabs/wayland, 608 stars), Rate Limiter Interviewer (PrepLabsAI/InterviewMentor, 112 stars), Resume Backend Project Optimizer (LAIJiangFeng/resume-builder, 247 stars) and Redis Expert (RightNow-AI/openfang, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
PostHog (a GitHub organization, an official publisher) maintains it in PostHog/posthog-foss, which has 721 GitHub stars. The repository holds 213 skills in this directory. The repository was last updated on October 7, 2026.
Source: PostHog/posthog-foss on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.