Borrowing it
Nothing to install: this file belongs to zwl467135974/lumina. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/zwl467135974/lumina/master/.agents/skills/lumina_redis/SKILL.mdgit clone --depth 1 https://github.com/zwl467135974/luminaWrote 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/zwl467135974/lumina/lumina_redis)<a href="https://agentmods.dev/skills/zwl467135974/lumina/lumina_redis"><img src="https://agentmods.dev/badge/skills/zwl467135974/lumina/lumina_redis/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/zwl467135974/lumina/lumina_redis"><img src="https://agentmods.dev/badge/skills/zwl467135974/lumina/lumina_redis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00000 | $0.00868 |
| Opus 5 | $0.00000 | $0.00434 |
| Sonnet 5 | $0.00000 | $0.00174 |
| Haiku 4.5 | $0.00000 | $0.00087 |
Grade A, and why
lumina_redis 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 12d 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 — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lumina Redis 操作规范
核心原则
所有 Redis 操作必须通过 RedisCacheManager 统一封装,禁止在业务代码中直接注入 RedisTemplate 或 RedissonClient。
为什么
项目使用 Redisson 作为 Redis 客户端,RedisConfig 中配置了 RedisTemplate 使用 Jackson 序列化器。如果业务代码直接用 RedisTemplate,会导致:
- 序列化器不兼容 — RedisTemplate 的 Jackson 序列化器与 Redisson 原生编码器格式不同,跨服务读写失败
- 操作分散 — 同一个 Redis 操作逻辑散落在各 Service 中,无法统一管理(过期策略、key 命名、日志)
- 测试困难 — 直接依赖底层客户端,Mock 困难
RedisCacheManager 位置
lumina-framework/src/main/java/io/lumina/framework/cache/RedisCacheManager.java
支持的操作
| 方法 | 用途 | 示例 |
|---|---|---|
set(key, value, ttl) |
KV 缓存 | 权限缓存、配置缓存 |
get(key) |
KV 读取 | |
delete(key) |
KV 删除 | |
exists(key) |
判断存在 | |
expire(key, ttl) |
设置过期 | |
zAdd(key, score, member) |
ZSET 添加 | 在线用户记录 |
zRemove(key, member) |
ZSET 删除 | 强制下线 |
zRange(key) |
ZSET 查询 | 在线用户列表 |
zScore(key, member) |
ZSET 分数 | 登录时间 |
cacheUserPermissions(userId, perms) |
业务专用 | 权限缓存 |
addTokenToBlacklist(token, ttl) |
业务专用 | Token 黑名单 |
正确用法
// ✅ 正确:通过 RedisCacheManager
@RequiredArgsConstructor
public class OnlineUserServiceImpl {
private final RedisCacheManager redisCacheManager;
public void recordLogin(Long userId, String username) {
redisCacheManager.zAdd("online:users", System.currentTimeMillis(),
userId + ":" + username);
}
}
错误用法
// ❌ 错误:直接用 RedisTemplate(序列化器不兼容)
@Autowired
private RedisTemplate<String, Object> redisTemplate;
// ❌ 错误:直接用 RedissonClient(绕过封装层)
@Autowired
private RedissonClient redissonClient;
扩展 RedisCacheManager
如果 RedisCacheManager 没有你需要的数据结构操作(如 Hash、List、Set),先扩展 RedisCacheManager,再在业务代码中调用:
// 在 RedisCacheManager 中添加
public void hSet(String key, String field, String value) {
RMap<String, String> map = redissonClient.getMap(key);
map.put(field, value);
}
Key 命名规范
| 模式 | 示例 | 说明 |
|---|---|---|
{domain}:{entity}:{id} |
user:permissions:1 |
实体缓存 |
{domain}:{action} |
online:users |
操作状态 |
token:blacklist:{token} |
— | 安全相关 |
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.
- 12d ago First seen · 93 lines · 0 tokens per session scan A 714cce4485eb
lumina_redis is a skill published in the GitHub repository zwl467135974/lumina (66 stars, last pushed 22d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 868 tokens. 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.
Other skills, from other repositories
pinecone
Managed vector DB for production RAG and search.
redis-js
Work with the Upstash Redis JavaScript/TypeScript SDK for serverless Redis operations. Use for caching, session storage, rate limiting, leaderboards, full-text search (querying, filtering, aggregating with @upstash/redis search extension), and all Redis data structures. Supports automatic serialization/deserialization…
using-redis-token-buckets
Use when adding a bucket-like rate limit backed by Redis: a per-caller budget with burst capacity and continuous refill, a refund path for requests that did no work, or a limit whose Retry-After must be a real wait rather than a window edge. posthog/tokenbucket.py provides an atomic Lua token bucket (consume, refund…
byted-milvus
Manages Milvus on Volcano Engine (Volcengine): provision/inspect/scale/delete clusters and run collection + CRUD/search operations via bundled CLIs. Use when the user mentions Milvus + Volcengine/Volcano Engine or asks to operate Milvus there.
vector-db
Vector database expert for embeddings, similarity search, RAG patterns, and indexing strategies.
redis-search
Redis Search guidance covering FT.CREATE schema design, field type selection (TEXT, TAG, NUMERIC, GEO, GEOSHAPE, VECTOR, JSON path), DIALECT 2 query syntax, FT.SEARCH / FT.AGGREGATE / FT.HYBRID command selection, vector similarity with HNSW or FLAT, hybrid retrieval combining lexical and vector ranking, RAG pipelines…