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_conversation/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_conversation)<a href="https://agentmods.dev/skills/zwl467135974/lumina/lumina_conversation"><img src="https://agentmods.dev/badge/skills/zwl467135974/lumina/lumina_conversation/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_conversation"><img src="https://agentmods.dev/badge/skills/zwl467135974/lumina/lumina_conversation.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.00043 | $0.01322 |
| Opus 5.5 | $0.00017 | $0.00529 |
| Sonnet 5.5 | $0.00009 | $0.00264 |
| Haiku 4.5 | $0.00004 | $0.00132 |
Grade A, and why
lumina_conversation 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 2mo 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 — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lumina 会话与记忆管理规范
功能概述
本技能包用于规范 Lumina 框架的 Agent 多轮对话、会话记忆管理和流式输出,涵盖 conversationId 生命周期、MemoryManager 双轨记忆(Redis 热记忆 + DB 冷存储)、executeStream 上下文加载机制。
会话模型
数据结构
| 表 | 说明 | 迁移版本 |
|---|---|---|
lumina_conversation |
会话主表(UUID、标题、Agent 关联) | Flyway V3 |
lumina_message |
消息记录(角色、内容、会话关联) | Flyway V3 |
conversationId 生命周期
- 创建:调用
POST /api/v1/conversations,生成 UUID 作为 conversationId - 多轮交互:每次 Agent 执行传入 conversationId,历史消息自动加载为上下文
- 持久化:所有 user/assistant 消息持久化到
lumina_message表 - 回放:通过 conversationId 查询历史消息,支持前端会话列表和历史回放
双轨记忆机制
Redis 热记忆(MemoryManager)
@Autowired
private MemoryManager memoryManager;
// 加载上下文(从 Redis 热记忆)
List<Msg> context = memoryManager.loadMessages(conversationId);
// 保存消息(写入 Redis 热记忆)
memoryManager.saveMessage(conversationId, Msg.user(task));
memoryManager.saveMessage(conversationId, Msg.assistant(response));
| 属性 | 值 |
|---|---|
| 存储 | Redis |
| 上下文窗口 | CONTEXT_WINDOW = 20 条最近消息 |
| 特性 | 低延迟读取,自动滑动窗口裁剪 |
| 用途 | Agent 执行时快速加载对话上下文 |
DB 冷存储
| 属性 | 值 |
|---|---|
| 存储 | MySQL lumina_message 表 |
| 特性 | 永久持久化,全量消息记录 |
| 用途 | 历史回放、审计、分析 |
双轨同步
- 消息同时写入 Redis(热)和 DB(冷)
- Redis 超过窗口自动裁剪(仅保留最近 20 条)
- DB 始终保留全量消息
- Redis 数据丢失时,可从 DB 重建热记忆
引擎接入
方法签名
// 异步执行
Result<AgentResponse> execute(AgentExecutionRequest request);
// 同步执行
Result<AgentResponse> executeSync(AgentExecutionRequest request);
// 流式执行
SseEmitter executeStream(AgentExecutionRequest request);
AgentExecutionRequest 包含 conversationId 字段,用于关联会话上下文。
上下文加载流程
1. 接收 conversationId
2. buildContextMessages(conversationId)
→ 从 MemoryManager 加载历史消息(Redis 热记忆,最多 20 条)
→ 映射为 Msg 列表(MsgRole 映射:USER → user, ASSISTANT → assistant, SYSTEM → system)
3. 将当前用户输入追加到 Msg 列表
4. 执行 Agent(传入完整 Msg 列表)
5. 执行完成后,保存 user 消息和 assistant 响应到双轨记忆
MsgRole 映射
| 数据库角色 | AgentScope MsgRole | 说明 |
|---|---|---|
USER |
MsgRole.USER |
用户消息 |
ASSISTANT |
MsgRole.ASSISTANT |
Agent 响应 |
SYSTEM |
MsgRole.SYSTEM |
系统提示词 |
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.
- 2mo ago First seen · 142 lines · 43 tokens per session scan A 1490b0a13762
lumina_conversation is a skill published in the GitHub repository zwl467135974/lumina (91 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 43 tokens to every session and 1,322 once invoked, about $0.0002 per session on Opus 5.5. 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.
lumina_conversation compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| lumina_conversationzwl467135974/lumina | Skill | 91 | 1mo ago | Apache-2.0 | A | 43 | Claude Code, Codex |
| knowledge-ingestopenclaw/openclaw | Skill | 394k | yesterday | MIT | A | 80 | Claude Code, Codex |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 68k | 2d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| forgetasgeirtj/system_prompts_leaks | Skill | 71k | 2d ago | CC0-1.0 | A | 74 | Claude Code, Codex |
| Cortexdanielmiessler/LifeOS | Skill | 20k | yesterday | MIT | A | 184 | Claude Code |
| memoryopensquilla/opensquilla | Skill | 7.1k | 6d ago | Apache-2.0 | A | 44 | Claude Code, Codex |
| ha-data-storesshiwenwen/hope-agent | Skill | 1.9k | yesterday | MIT | A | 115 | Claude Code, Codex |