lumina: Skill for Claude Code

.agents/skills/lumina_redis/SKILL.md

lumina_redis is a skill for Claude Code, Codex from zwl467135974/lumina. It costs 0 tokens per session (868 once invoked), scanned A, original, Apache-2.0.

A project rule for using Redis, a fast data store often used for caches and temporary data. It requires all Redis access to go through one shared RedisCacheManager instead of using low-level clients directly.

In plain words
What is it for?
Use it when adding or changing caches, online-user tracking, permission caches, or token blacklists in the Java project.
Why use it?
It prevents incompatible data formats between services and keeps key names, expiration times, logging, and tests managed consistently.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is zwl467135974/lumina's own configuration. It tells Claude Code and Codex how to work on lumina itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything lumina configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/zwl467135974/lumina/master/.agents/skills/lumina_redis/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/zwl467135974/lumina

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for lumina_redis

README.md
[![agentmods](https://agentmods.dev/badge/skills/zwl467135974/lumina/lumina_redis/github.svg)](https://agentmods.dev/skills/zwl467135974/lumina/lumina_redis)
Your own site
<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.

agentmods 80×15 button for lumina_redis

Your own site · 80×15
<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>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 868 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 12d ago against content hash 714cce4485eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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.

.agents/skills/lumina_redis/SKILL.md · 93 lines

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 统一封装,禁止在业务代码中直接注入 RedisTemplateRedissonClient

为什么

项目使用 Redisson 作为 Redis 客户端,RedisConfig 中配置了 RedisTemplate 使用 Jackson 序列化器。如果业务代码直接用 RedisTemplate,会导致:

  1. 序列化器不兼容 — RedisTemplate 的 Jackson 序列化器与 Redisson 原生编码器格式不同,跨服务读写失败
  2. 操作分散 — 同一个 Redis 操作逻辑散落在各 Service 中,无法统一管理(过期策略、key 命名、日志)
  3. 测试困难 — 直接依赖底层客户端,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} 安全相关

Read the full file on GitHub · 93 lines

Changes

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.

  1. 12d ago First seen · 93 lines · 0 tokens per session scan A 714cce4485eb

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

pinecone

Managed vector DB for production RAG and search.

NousResearch/hermes-agent · 13 tokens

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…

upstash/redis-js · 93 tokens

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…

PostHog/posthog-foss · 148 tokens

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.

bytedance/agentkit-samples · 0 tokens

vector-db

Vector database expert for embeddings, similarity search, RAG patterns, and indexing strategies.

RightNow-AI/openfang · 19 tokens

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…

redis/agent-skills · 152 tokens