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 | $0.00022 | $0.00661 |
| Sonnet 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 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 — 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.
- 12d ago First seen · 142 lines · 43 tokens per session scan A 1490b0a13762
lumina_conversation is a skill published in the GitHub repository zwl467135974/lumina (66 stars, last pushed 22d 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. 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
media-ingest
Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.
mem0-oss-to-platform
Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…
Cortex
Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…
memory
Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…
establishing-project-context
Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.