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_observability/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_observability)<a href="https://agentmods.dev/skills/zwl467135974/lumina/lumina_observability"><img src="https://agentmods.dev/badge/skills/zwl467135974/lumina/lumina_observability/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_observability"><img src="https://agentmods.dev/badge/skills/zwl467135974/lumina/lumina_observability.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.00045 | $0.01319 |
| Opus 5.5 | $0.00018 | $0.00528 |
| Sonnet 5.5 | $0.00009 | $0.00264 |
| Haiku 4.5 | $0.00005 | $0.00132 |
Grade A, and why
lumina_observability 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 — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lumina 可观测性规范
功能概述
本技能包用于规范 Lumina 框架的日志、审计和指标埋点,包括 MDC 链路追踪注入、@Audit 声明式审计日志、Micrometer 指标采集(Prometheus),确保系统运行状态可观测、可追溯。
日志规范(MDC)
traceId 自动注入
LogContextInterceptor 拦截器在每个 HTTP 请求进入时自动注入 MDC 上下文:
| MDC Key | 来源 | 说明 |
|---|---|---|
traceId |
自动生成(UUID 短格式) | 链路追踪 ID,贯穿整个请求 |
tenantId |
请求头 / Token | 当前租户 ID |
userId |
Token 解析 | 当前用户 ID |
日志 Pattern 配置
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level [%X{traceId:--}] %logger{36} - %msg%n</pattern>
- 使用
%X{traceId:--}输出 traceId,无值时显示-- - 所有日志自动携带 traceId,便于全链路问题排查
- 业务日志中无需手动输出 traceId
日志使用规范
private static final Logger log = LoggerFactory.getLogger(UserService.class);
log.info("用户创建成功, userId={}, username={}", userId, username);
log.warn("租户配额即将用尽, tenantId={}, used={}/{}", tenantId, used, quota);
log.error("Agent 执行失败, agentId={}", agentId, e);
- 使用 SLF4J + 占位符(
{}),禁止字符串拼接 - 关键操作记录 INFO,异常记录 ERROR(带异常堆栈)
审计日志(@Audit)
声明式审计标注
@Audit(module = "用户管理", action = "CREATE", description = "创建用户")
@PostMapping("/users")
public Result<UserVO> create(@RequestBody @Valid CreateUserDTO dto) {
// ...
}
- 在 Controller 方法上标注
@Audit,声明模块、操作类型和描述 AuditAspectAOP 切面自动采集审计信息,无需手动编码
审计采集内容
| 字段 | 来源 | 说明 |
|---|---|---|
| operator | BaseContext.userId | 操作人 ID |
| module | @Audit.module | 功能模块 |
| action | @Audit.action | 操作类型(CREATE/UPDATE/DELETE) |
| description | @Audit.description | 操作描述 |
| httpMethod | 请求信息 | HTTP 方法 |
| requestUri | 请求信息 | 请求路径 |
| duration | AOP 计时 | 方法耗时(毫秒) |
| result | 返回值/异常 | 成功/失败 |
审计存储
- 审计事件通过事件驱动写入
lumina_audit_log表 - 支持异步写入,不影响主流程性能
- 审计查询 API:
GET /api/v1/audit-logs(支持分页、模块筛选)
指标规范(Micrometer)
指标采集
@Autowired(required = false)
private MeterRegistry meterRegistry;
public void recordExecution(String type, long durationMs, boolean success) {
if (meterRegistry == null) return;
meterRegistry.timer("agent.execution.duration",
"type", type,
"result", success ? "success" : "failure")
.record(Duration.ofMillis(durationMs));
}
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 · 134 lines · 45 tokens per session scan A 8e8c1ce4e935
lumina_observability is a skill published in the GitHub repository zwl467135974/lumina (91 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 45 tokens to every session and 1,319 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_observability compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| lumina_observabilityzwl467135974/lumina | Skill | 91 | 1mo ago | Apache-2.0 | A | 45 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 133k | yesterday | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 99k | yesterday | Apache-2.0 | A | 19 | Claude Code |
| local-ai-agentsmicrosoft/ai-agents-for-beginners | Skill | 79k | 4d ago | MIT | A | 200 | Claude Code, Codex |
| systematic-debuggingobra/superpowers | Skill | 313k | 3d ago | MIT | A | 21 | Claude Code |
| next-cache-components-adoptionvercel/next.js | Skill | 143k | today | MIT | A | 95 | Claude Code |
| next-partial-prefetching-adoptionvercel/next.js | Skill | 143k | today | MIT | A | 103 | Claude Code |