> database-redis
Optimize Redis caching, key management, and performance. Use when implementing Redis caching strategies, managing key namespaces, or optimizing Redis performance. (triggers: **/*.ts, **/*.js, **/redis.config.ts, redis, cache, ttl, eviction)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/database-redis?format=md"Redis Best Practices
Priority: P0 (CRITICAL)
- Security:
- Access Control: Use Redis 6.0+ ACLs (
ACL SETUSER) to restrict commands by user/role. - Encryption: Always enable TLS for data-in-transit (standard in managed Redis like Azure/AWS).
- Dangerous Commands: Disable or rename
FLUSHALL,KEYS,CONFIG, andSHUTDOWNin production.
- Access Control: Use Redis 6.0+ ACLs (
- Connection Resilience:
- Pooling: Use connection pooling with tuned high/low watermarks to avoid connection churn.
- Timeouts: Set strict
read_timeoutandconnect_retriesto handle transient network saturation.
Guidelines
- Key Design:
- Namespacing: Use colons to namespace keys (e.g.,
app:user:123,rate:limit:ip:1.1.1.1). - Readability vs Size: Keep keys descriptive but compact; avoid keys > 512 bytes.
- Namespacing: Use colons to namespace keys (e.g.,
- Commands & Performance:
- O(N) Avoidance: Use
SCANinstead ofKEYS. UseUNLINKinstead ofDELfor background reclamation of large keys. - Lua Scripting: Prioritize
EVALSHAfor atomic logic; ensure scripts are pre-loaded to save bandwidth. - Massive Range: Limit
ZRANGE,HGETALL, andLRANGEresults with offsets/limits.
- O(N) Avoidance: Use
- Memory Management:
- Eviction Strategy: Use
allkeys-lrufor general caches andvolatile-lrufor mixed persistent/ephemeral data. - Lazy Freeing: Enable
lazyfree-lazy-evictionandlazyfree-lazy-expire(Redis 4.0+) to offload cleanup from the main thread. - Monitoring: Watch
Used Memory RSSvsUsed Memory Dataset. Large fragmentation suggests a need forMEMORY PURGEor scaling.
- Eviction Strategy: Use
Anti-Patterns
- No sole truth in Redis: Always persist critical data to a durable primary database.
- No large blobs: Split values > 100KB into smaller keys or use Hashes for field access.
- No JSON for objects: Use
HSETfor object fields to enable O(1) access without full decode. - No TTL-less keys: Set TTL or eviction policy on all non-permanent keys to prevent unbounded growth.
References
> related_skills --same-repo
> common-store-changelog
Generate user-facing release notes for the Apple App Store and Google Play Store by collecting git history, triaging user-impacting changes, and drafting store-compliant changelogs. Enforces character limits (App Store ≤4000, Google Play ≤500), tone, and bullet format. Use when generating release notes, app store changelog, play store release, what's new, or version release notes for any mobile app. (triggers: generate changelog, app store notes, play store release, what's new, release notes, ve
> golang-tooling
Go developer toolchain — gopls LSP diagnostics, linting, formatting, and vet. Use when setting up Go tooling, running linters, or integrating gopls with Claude Code. (triggers: gopls, golangci-lint, golangci.yml, go vet, goimports, staticcheck, go tooling, go lint)
> common-ui-design
Design distinctive, production-grade frontend UI with bold aesthetic choices. Use when building web components, pages, interfaces, dashboards, or applications in any framework (React, Next.js, Angular, Vue, HTML/CSS). (triggers: build a page, create a component, design a dashboard, landing page, UI for, build a layout, make it look good, improve the design, build UI, create interface, design screen)
> common-owasp
OWASP Top 10 audit checklist for Web Applications (2021) and APIs (2023). Load during any security review, PR review, or codebase audit touching web, mobile backend, or API code. (triggers: security review, OWASP, broken access control, IDOR, BOLA, injection, broken auth, API review, authorization, access control)