By mjtrapani
Generates a version-aware, annotated Redis ACL rule scoped to the minimum permissions your service actually needs. For backend engineers locking down new or existing services — reads the code, infers the access patterns, emits the rule.
Use when working with Redis client code, generating or reviewing Redis ACL rules, or discussing Redis access-control syntax. Provides the Redis ACL DSL primer, OSS-vs-Enterprise fork map, and pointers to detailed reference docs (command-category mappings, version deltas, client-library patterns, key-pattern extraction).
Generate a least-privilege Redis ACL rule for the codebase at the given path. Use when invoked via `/redis-companion:rule <path>` or when the user explicitly asks to scope or generate a Redis ACL rule for a service with a path argument. Orchestrates the `redis-companion:acl-generator` agent across two phases (discovery, synthesis) and gathers user input between them via `AskUserQuestion`.
Modifies files
Hook triggers on file write and edit operations
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A Claude Code plugin for scoping a backend service's Redis access to the minimum permissions it actually needs. Reads the service code, infers the access patterns, and generates a version-aware ACL rule with per-term annotations. Outputs both a concise prompt-ready summary and a full markdown artifact for review. Apply the rule with one shell command.
You point it at a backend service's directory. It detects the Redis client library, infers the access patterns (keys, channels, streams, commands), asks you two targeted questions (target edition and version — plus an optional follow-up if it finds a TODO hinting at planned commands), and emits a Redis ACL rule that grants only what the service actually needs.
For Redis OSS, it emits a full ACL SETUSER command ready to paste into redis-cli. For Redis Enterprise and Redis Cloud, it emits just the ACL Rule body — paste into the admin UI or REST API.
Backend engineers scoping their service's Redis access to the minimum necessary permissions — new or existing services, in any backend language. The pain is well-known:
cache:user:*, publishes to notifications, and writes a stream" into a correct ACL DSL is a real cognitive load.@scripting was split out of @write in 7, module commands joined @read/@write in 8, pub/sub default-deny flipped on.default user because the alternative is too much work.This plugin grew out of Redis ACL Builder — a manual GUI tool built to address the same problem. redis-companion takes the next step: instead of helping you construct a rule by hand, it reads your code and derives the intent automatically.
You need Claude Code installed and authenticated.
In any Claude Code session:
/pluginsmjtrapani/redis-companionThe plugin is now available in every session, no flags needed.
git clone https://github.com/mjtrapani/redis-companion.git
cd redis-companion
claude --plugin-dir .
To verify either install, run /agents in the Claude Code prompt — you should see acl-generator in the list.
You can also confirm the knowledge-base skill is active by asking something Redis-adjacent, like "what does +@read grant in Redis 7?" — the acl-reference skill should auto-load (you won't see it in the slash menu by design — it's a model-invocable knowledge base, not an action command) and inform Claude's answer.
A ~40-line sample service is included at examples/sample-service/. It uses redis-py and exercises strings (SET/GET/MGET/SETEX), pub/sub (PUBLISH), and streams (XADD). Run python3 examples/sample-service/service.py directly to exercise every function once with sample data — the file is both the library AND its own smoke test (see the if __name__ == "__main__": block).
In Claude Code, in the project root:
/redis-companion:rule examples/sample-service
The plugin will:
redis-py from the imports + requirements.txtcache:user:*, session:*), the stream key (activity:events), and the pub/sub channel (notifications)SET, GET, MGET, SETEX, PUBLISH, XADDINFO SERVER when MCP is connected), and (if a TODO is detected near Redis calls) a question about whether to pre-emptively grant the planned commands./acl-rule-sample-service.md to your cwd — comprehensive output with annotations, detected context, and four apply patternsYou can also invoke conversationally:
scope a Redis ACL for examples/sample-service
The strongest validation: apply the rule and watch the service still work under it.
# 1. Apply the rule (inline-sed swaps the placeholder for nopass for local-dev)
sed 's/><changeme>/nopass/' ./acl-rule-sample-service.md | grep -m1 '^ACL SETUSER' | redis-cli
# 2. Verify the rule landed
redis-cli ACL GETUSER sample-service
# 3. Run the service under the locked-down user — should print 6/6 OK
REDIS_URL='redis://sample-service@localhost:6379' python3 examples/sample-service/service.py
npx claudepluginhub mjtrapani/redis-companion --plugin redis-companionGenerates a least-privilege Kubernetes RBAC manifest — a Role/ClusterRole plus a matching binding — scoped to exactly the API groups, resources, and verbs your workload actually uses. For platform and app engineers locking down a workload's ServiceAccount: reads the code, infers the API access patterns, emits annotated YAML.
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Memory compression system for Claude Code - persist context across sessions
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Curate auto-memory, promote learnings to CLAUDE.md and rules, extract proven patterns into reusable skills.
Comprehensive UI/UX design plugin for mobile (iOS, Android, React Native) and web applications with design systems, accessibility, and modern patterns
Standalone image generation plugin using Nano Banana MCP server. Generates and edits images, icons, diagrams, patterns, and visual assets via Gemini image models. No Gemini CLI dependency required.