56 results available
Sign in
Skills directory

redis-core

redis

·

Last changed
Hardened

This skill has been hardened by Chainguard

Last changed

This version passed the hardening gate. The skill content was retained without changes. Classified findings before hardening: 1. Classified findings closed: 0. Classified findings remaining: 1. Unclassified scanner findings remaining: 0. Review findings closed: 0. Review findings remaining: 9.


Open before hardening

1

Low
Open after hardening

1

Low

Expand
File
Group
Subtype
Severity
Status
references/key-naming.md

Prompt Injection

Third-party content as instructions

Low
Open

1 finding


SKILL.md

Redis Core

Foundational guidance for modeling data in Redis. Covers data-type selection and key-name conventions — the two decisions that most directly drive memory, performance, and maintainability.

When to apply

  • Caching objects, sessions, or per-user state.
  • Counters, leaderboards, recent-items lists, unique-membership sets.
  • Reviewing or refactoring Redis key names.
  • Deciding between a Redis Hash and a JSON document for an entity.

1. Choose the right data structure

Pick the type that matches the access pattern, not just the shape of the data.

Use caseRecommended typeWhy

Simple values, counters

String

Atomic INCR/DECR, SET/GET

Object with independently updated fields

Hash

Per-field reads/writes, no whole-object rewrite

Queue, recent-N items

List

O(1) push/pop at ends

Unique items, membership checks

Set

O(1) SADD/SISMEMBER/SCARD

Rankings, score-based ranges

Sorted Set

Score-ordered; ZADD/ZRANGE/ZRANK

Nested / hierarchical data

JSON

Path-level updates, nested arrays, RQE indexing

Event log, fan-out messaging

Stream

Persistent, consumer groups

Vector similarity

Vector Set

Native vector storage with HNSW

Common anti-pattern: stuffing a flat object into a serialized string. Updating one field means fetch + parse + mutate + rewrite. Use a Hash instead.

See references/choose-data-structure.md for full rationale and Python/Java examples.

2. Use consistent key names

Use colon-separated segments with a stable hierarchy:

{entity}:{id}:{attribute}
user:1001:profile
user:1001:settings
order:2024:items
session:abc123
article:987:likes
game:space-invaders:leaderboard

Rules of thumb:

  • Lowercase, colon-separated. No spaces, no mixed casing (User_1001_Profile is bad).
  • Keep keys short but readable — keys live in memory and appear in every command.
  • Don't use full URLs or long strings as keys. Extract a short identifier, or use a hash digest of the URL.
  • Prefix for multi-tenancy (tenant:42:user:7:cart) so scans and ACLs can target a tenant cleanly.
  • Be consistent. Pick one convention per service and apply it across all keys.

See references/key-naming.md for cleanup examples and edge cases.

References

Install

Install with chainctl
chainctl skill install public/redis/redis-core:latest
Get started with chainctl
View source

Harden your own skills

Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.

Provenance

Upstream sourcehttps://github.com/redis/agent-skills
Upstream commita2c48c0055a1f23ba15ef5e92c6d7f6ee508a348
OCI reference

skills.cgr.dev/public/github.com/redis/skills/redis-core:latest

License

MIT

Files

HARDENING.md

LICENSE

SKILL.md

evals/core/baselines/README.md

evals/core/baselines/aggregate-benchmark.json

evals/core/baselines/aggregate-benchmark.md

evals/core/baselines/baseline.json

evals/core/baselines/model-matrix.json

evals/core/evals.json

evals/core/model-matrix.json

references/choose-data-structure.md

references/key-naming.md


The trusted source for open source

Talk to an expert
PrivacyTerms

Product

Chainguard ContainersChainguard LibrariesChainguard VMsChainguard OS PackagesChainguard ActionsChainguard Agent SkillsIntegrationsPricing
© 2026 Chainguard, Inc. All Rights Reserved.
Chainguard® and the Chainguard logo are registered trademarks of Chainguard, Inc. in the United States and/or other countries.
The other respective trademarks mentioned on this page are owned by the respective companies and use of them does not imply any affiliation or endorsement.