/be:redis-audit [phase] [path]from Backend Skills
Manually invoked. Redis audit — one client with a short timeout, keys from builders with a TTL on every write, a failure direction per primitive (caches open, locks and claims closed, rate limits by tier, timeouts as failures), caches parsed on every hit with group invalidation, owned locks and short claims released on failure, rate-limit layers and the client IP, eviction and tiers, and tests that prove each direction. Only for apps that use Redis.
Ships in Backend Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Run this only when the user asks for it by name. It writes a report and changes no code; fixing a finding is a separate request.
A manually-invoked, red-team Redis audit of an app or a specific diff/PR. It is self-contained — every check is spelled out inline, so it runs a full review with zero other skills installed — and each finding is verified against the real code before it lands in a phase-aware, scored report at _reports/redis-audit.md.
Self-contained — this checklist is comprehensive on its own and needs no other skill installed. Where
redis,rate-limitingandapi-architectureare installed, apply their house rules too.
Before applying this skill, read the project's root AGENTS.md, the AGENTS.md closest to the files in question, and any doc they link for this skill's topic. Names, values and choices — budgets, tiers, tokens, voice, paths — come from those files, never from this skill.
[phase] — development | production; sets the action-item tiers. Omitted → the audit phase the project's AGENTS.md records, else production (assume the app is live until told otherwise — the safer default).[path] — a file, directory, or PR/diff to scope the audit to; omitted → the whole repo.Mindset — reviewer/attacker first. Don't assume code is fine because it looks careful; find the sequence that breaks it. Report only findings you can justify as real, each verified before it lands.
development | production) if given; else the audit phase the project's AGENTS.md records; else production — assume the app is live with real users until told otherwise, so a CRITICAL finding gets Fix-Now urgency instead of a pre-launch discount. Phase sets the action-item tiers._reports/redis-audit.md exists, read it, but still run every check against the source. Use it only to keep the ID of each finding still present (status UNRESOLVED), carry its WON'T FIX findings forward unchanged — never re-raised as new findings — drop its FIXED findings and any no longer present, continue ID numbering from its highest ID, and take its scores for the score-change row. First run → mark all NEW.file:line evidence.AGENTS.md or a doc it links._reports/redis-audit.md — overwriting the whole file, so no resolved history accumulates — and post the chat summary (see Output). Recommend fixes in the report; never modify code. Never commit or push without explicit approval.Findings are ordered worst-first in the report.
Write to _reports/redis-audit.md, with one Overall row in the score change:
# Redis audit — <app/scope>
**Date:** <YYYY-MM-DD> · **Phase:** <phase> · **Mode:** Report-only · **Branch:** `<branch>` · **Scope:** <what was audited> · **Overall:** <X>/10
## Score change (previous → current)
| Metric | Previous | Current | Δ | Trend |
| --- | --- | --- | --- | --- |
| Overall | <prev/10 or N/A> | <cur/10> | <+N / -N / 0> | <▲ / ▼ / ■ / N/A> |
## Findings
| ID | Severity | Category | Status | Issue | Location |
| --- | --- | --- | --- | --- | --- |
| 1 | HIGH | <category> | NEW | <one-line issue> | `file/path:line` |
**Status:** `NEW` — found this run for the first time · `UNRESOLVED` — still present from an earlier run · `FIXED` — fixed after the audit; the note names the commit · `WON'T FIX` — the owner ruled it not a defect, intended, or accepted as it is; the note gives their reason
### F1 — <title>
- **What:** <the defect, and the concrete evidence that proves it real>
- **Why it matters:** <impact / who it affects> <· optional ref, e.g. Upstash docs / OWASP API4>
- **Fix:** <the specific remediation>
- **Note:** <only once `FIXED` (the commit and what changed) or `WON'T FIX` (the owner's reason)>
## Scorecard
| Category | Score | Notes |
| --- | --- | --- |
| Client | <X>/10 | <one-line justification> |
| Keys and TTLs | <X>/10 | <one-line justification> |
| Failure direction | <X>/10 | <one-line justification> |
| Caching | <X>/10 | <one-line justification> |
| Locks and claims | <X>/10 | <one-line justification> |
| Rate limits | <X>/10 | <one-line justification> |
| Storage settings | <X>/10 | <one-line justification> |
| Tests | <X>/10 | <one-line justification> |
## Action items
Tiers by phase — `development` → **Fix Now / Before Launch / Post-Launch**; `production` → **Fix Now / Next Release / Backlog**. Each task references a finding ID.
### <Tier>
| # | Priority | Task (finding ID) | Effort |
| --- | --- | --- | --- |
Every run produces two things:
_reports/redis-audit.md, in the format above, overwriting the prior run.<X>/10 (with Δ vs last run), a severity count (Critical / High / Medium / Low, i.e. C / H / M / L), the top findings worst-first (id · severity · one-line · file:line), and the report path. Note any "needs confirmation" items.Report-only — this audit recommends fixes in the report; it never modifies code.
First confirm the app uses Redis (a client, config or dependency). Then find the surface — the client module, the keys module, the cache, lock, claim and rate-limit helpers — and grep the call sites. The fix targets are redis and rate-limiting.
signal: () => AbortSignal.timeout(…), one or two retries). The SDK's default of five retries with backoff stalls a cache that should fail open for seconds. Flag a plain AbortSignal passed as signal: the SDK then resolves an aborted command as null instead of throwing, and every command after it too. A TimeoutError is transient; an UpstashError such as WRONGTYPE is a bug no retry fixes, so retrying it is a finding.mget over many gets, pipelining for concurrent commands; flag an awaited command inside a loop.JSON.stringify on write, or two writers of one key using different codecs.domain:action grammar, with user-supplied segments encoded; flag a template string at a call site.ex, px, exat, pxat); flag a separate expire call a crash can skip, and a key without a TTL and no comment saying what bounds it — a cache group's generation key is the expected exception, with its comment. TTLs come from shared presets and fit their purpose: a lock at 2–3× the work's p99, a claim covering the work.try, and a failure falls back to the source. Flag a cache error reaching the response.@upstash/ratelimit resolves a timeout as a success with reason: "timeout", which a closed tier must read as a denial.@upstash/ratelimit's own timeout is set short, never left at its 5-second default.Dates or Firestore Timestamps.SCAN and delete on a request path.set(key, token, { nx: true, ex }) and a random token, released by an owner-checked compare-and-delete script, and sized above the work; contention throws a typed error, never a spin-wait; ordered writes carry a fencing token. A lock is never used as deduplication.set nx ex with a short TTL and are released when the work fails, so a retry runs. Dedup that must last — a webhook event, a payment — is a database record, and a public API's Idempotency-Key replay is stored in the database. Flag a claim not released when its work fails, and a long-lived dedup key in Redis. A claim left to expire after the work succeeds is correct.x-forwarded-for, skipping only your own proxies; IPv6 is keyed by its /64 after unmapping ::ffff:; no usable IP shares an unknown bucket. A frontend server forwards the visitor's IP only with a verified platform identity token, and a high-volume browser call goes straight to the API.Retry-After with capped, jittered retries, and bulk sends go through a queue.noeviction, with allkeys-lru only on a cache-only database. One database per tier, with its own credentials — "429 never fires" is the sign of an app pointed at another tier. Both are console settings: infer what the env and config show, else "needs confirmation".KEYS, FLUSHALL or unbounded SMEMBERS, HGETALL or LRANGE 0 -1 on a request path.auth keeps here are state Redis owns, not a finding.Fixing is a separate request, after the report is written, and covers only the findings the owner chose. Then update the report in place — never re-run the audit to update it: a re-run re-checks the whole codebase, costs a full audit and raises new findings mid-fix. Mark each fixed finding FIXED with its commit and a one-line note of what changed, mark a finding the owner rules out WON'T FIX with their reason, and leave everything else as it stands. Recompute the scorecard categories the fixes touched and the Overall, and rewrite the one score-change row (previous → current) — never add a second row.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub timonwa/engineering-skills --plugin be22 skills in this plugin
/access-controlAccess control for a Next.js API on Firebase — roles, relationships and attributes (RBAC, ReBAC, ABAC) behind permission verbs and one pure can(); guards as the only gate, 404 before 403; tenant scoping; invitations; escalation limits; two-person approval and access reviews; stale claims; API-key scopes; share links and passcodes; where plan and flag checks sit; UI gates that only hide; and tests. Use when adding a permission, role, guarded route, API key, share link, or a control only some people see./access-control-auditManually invoked. Access-control audit — guards on every route and Server Action (BFLA), 404 before 403 and tenant scoping (BOLA), allowlisted writes and projected reads (BOPLA), verbs never role names, roles that add up, escalation and invitations, claims and revocation, sessions and sign-in, API keys and share links, the plan and flag order, UI gates, data rules and the tests. Verifies each finding and writes a prioritised report./api-architectureHow an API route is built in a Next.js API — the fixed order of rate limit, authorise, validate, delegate, audit, respond; thin routes over services; the response envelope and typed errors; caching headers; concurrent edits; long-running work; cursor pagination and allowlisted sorts; resource paths, versions, deprecation and state-transition sub-routes; and what every new route ships with. Cron, webhooks and audit logs are references. Use when adding, changing or reviewing a route handler or the API layer's structure.Other plugins' skills for the same job