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 | $0.00023 | $0.00660 |
| Sonnet 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 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 — 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.
- 12d ago First seen · 134 lines · 45 tokens per session scan A 8e8c1ce4e935
lumina_observability is a skill published in the GitHub repository zwl467135974/lumina (66 stars, last pushed 21d 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. 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
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…