Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add fcsouza/agent-skills --skill redis-game-patternsgit clone --depth 1 https://github.com/fcsouza/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/fcsouza/agent-skills/redis-game-patterns)<a href="https://agentmods.dev/skills/fcsouza/agent-skills/redis-game-patterns"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/redis-game-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/redis-game-patterns"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/redis-game-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00088 | $0.01674 |
| Opus 5.5 | $0.00035 | $0.00670 |
| Sonnet 5.5 | $0.00018 | $0.00335 |
| Haiku 4.5 | $0.00009 | $0.00167 |
Grade A, and why
redis-game-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Redis Game Patterns
Redis holds hot, disposable game state. The database holds outcomes. If Redis restarts empty, players should lose nothing that matters: match results, rewards and currency are written to the database first.
Client choice
The code here uses ioredis 6, because BullMQ 6 creates its Redis connections
with ioredis by default and most game servers in this bundle already run
BullMQ (bullmq-game-queues). The ioredis README says that for new projects
node-redis is the recommended client; if the project has no BullMQ and no
ioredis yet, consider node-redis and port the commands. BullMQ 6 marks ioredis
as an optional peer, so install it explicitly: bun add ioredis.
Every file takes the client as a parameter typed Redis from ioredis.
Create the client once in the server and pass it in. Keep the default
replyMapping: "legacy": the parsers expect WITHSCORES replies as flat
[member, score, ...] string arrays. The code needs Redis 6.2 or newer
(ZRANGE ... REV).
Pattern 1: leaderboard
Copy boilerplate/leaderboard.ts when the game ranks players by score.
- One sorted set per board and period:
lb:weekly:2026-W46,lb:season:3. A new period is a new key; snapshot the old one, then delete it. ZADDoverwrites the score. For "best score counts", decide on purpose:ZADD ... GTkeeps the higher value;ZINCRBYadds points.- Ties: equal scores sort by member ID bytes (reverse order under
REV), not by who reached the score first. If first-to-score must win, encode the tie break into the score, and keep the whole score inside the exact integer range of a double (2^53). - Rank from
ZREVRANKis zero-based; the boilerplate returns rank 1 for the top player. - At season end, call
snapshot()with a function that writes the rows to Postgres (postgres-game-schema), then reset the board.
Pattern 2: presence and ephemeral state
Copy templates/ephemeral-state.ts when the game shows who is online, keeps
live match state outside the database, or applies timed buffs.
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 19d ago Changed · -9 lines · +36 tokens per session 815fbd78f6ab
- 3mo ago First seen · 149 lines · 52 tokens per session scan A 111b1d1a7c28
redis-game-patterns is a skill published in the GitHub repository fcsouza/agent-skills (29 stars, last pushed today), licensed MIT. It adds 88 tokens to every session and 1,674 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
redis-game-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| redis-game-patternsfcsouza/agent-skills | Skill | 29 | today | MIT | A | 88 | Claude Code |
| bex-keyvaluebex-co/bex | Skill | 1.6k | today | Apache-2.0 | A | 117 | Claude Code, Codex |
| redis-jsupstash/redis-js | Skill | 989 | 6d ago | MIT | A | 93 | Claude Code, Codex |
| bun-redissecondsky/claude-skills | Skill | 257 | 3d ago | MIT | A | 32 | Claude Code |
| database-redisHoangNguyen0403/agent-skills-standard | Skill | 597 | yesterday | MIT | A | 37 | Claude Code, Codex |
| nw-database-technology-selectionnWave-ai/nWave | Skill | 638 | 14d ago | MIT | A | 38 | Claude Code |
| architecture-paradigm-space-basedathola/claude-night-market | Skill | 358 | today | MIT | A | 32 | Claude Code |