Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add koersliven/Lore --skill lore-healthgit clone --depth 1 https://github.com/koersliven/LoreWrote 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/koersliven/lore/lore-health)<a href="https://agentmods.dev/skills/koersliven/lore/lore-health"><img src="https://agentmods.dev/badge/skills/koersliven/lore/lore-health/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/koersliven/lore/lore-health"><img src="https://agentmods.dev/badge/skills/koersliven/lore/lore-health.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00021 | $0.01395 |
| Opus 5 | $0.00010 | $0.00698 |
| Sonnet 5 | $0.00004 | $0.00279 |
| Haiku 4.5 | $0.00002 | $0.00139 |
Grade A, and why
lore-health 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 — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/health — Knowledge Health Check
自动校验 snapshot 中的知识是否仍然有效。不依赖人工确认,通过交叉验证自动判断。
When to Trigger
- SessionStart hook(agent 入场时)
- Before /evolve compilation
- User explicitly invokes this skill
Purpose
知识不是静态的。代码会变、业务会变、组织会变。/health 确保 Lore 的知识库不会积累过期或错误的信息。
核心原则:
- CODE 类知识:代码是权威来源
- BUSINESS 类知识:业务是权威来源,代码里没有不代表过期
- 只有"有矛盾"才标记问题,"找不到"不等于"过期"
Knowledge Validation Types
每条知识带一个 validation_type 字段:
| 类型 | 验证方式 | 不健康信号 | 处理 |
|---|---|---|---|
| CODE | 扫描代码匹配 | 代码不存在且相关文件最近有变更 | 标记 stale |
| BUSINESS | 代码是否违反规则 | 代码行为与规则矛盾 | 标记 contradicted |
| DECISION | 检查 affected files | 新值覆盖旧值 | 标记 superseded |
| ORG | 无自动检测 | 人工推翻 | 等待更新 |
Process
Step 1: Read Snapshot
读取 .ai-context/snapshot.md 中的所有知识条目。
Step 2: Validate Each Entry
对每条知识,根据其 validation_type 执行验证:
CODE 类验证
知识: "订单服务在 OrderService.create() 中"
验证:
1. grep/扫描代码找 OrderService.create()
2. 找到 → healthy
3. 没找到 → 检查 OrderService.java 最近是否有 commit
- 有 commit → 很可能被改了 → stale
- 无 commit → 可能是描述不准 → inaccurate(不是 stale)
BUSINESS 类验证
知识: "业务只做东南亚,不做欧洲"
验证:
1. 扫描代码中 region/country 相关配置
2. 发现 EUR region 支持 → contradicted
3. 无相关代码变更 → healthy(业务知识不依赖代码存在)
知识: "图片最少 3 张"
验证:
1. 扫描校验逻辑中 image_count 相关代码
2. 代码允许 0 张图片 → contradicted
3. 代码要求 3 张 → healthy
DECISION 类验证
知识: "支付超时改为 5s" (affected: PaymentService.java, 2026-04-23)
验证:
1. 检查 PaymentService.java 最近 commit
2. 有 commit 且改了超时值 → 检查新值
- 新值不同 → superseded(新决策覆盖)
- 新值相同 → healthy
3. 无 commit → healthy
ORG 类验证
知识: "这个模块归财务团队管"
验证: 无自动检测
策略: 等待对话中"推翻信号"——"这个模块转到库存团队了"
Step 3: Classify Health Status
| 状态 | 含义 | 动作 |
|---|---|---|
| healthy | 知识仍然有效 | 保持现状 |
| stale | CODE 类且代码已不存在 | 移至 snapshot 末尾 "Stale Knowledge" 章节 |
| contradicted | 代码直接违反知识 | 标记 [CONTRADICTION],保留双方 |
| superseded | 新决策覆盖旧决策 | 标记旧决策为 "Superseded by [新决策]" |
| inaccurate | 描述不准但知识本身可能仍对 | 标记 [待修正] |
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 · 172 lines · 21 tokens per session scan A 020aed1d7cbd
lore-health is a skill published in the GitHub repository koersliven/Lore (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 21 tokens to every session and 1,395 once invoked, about $0.0001 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-31.
Other skills, from other repositories
context-end
Close a workspace session by reviewing a proposed summary, recording approved outcomes, updating state and decisions, and checking repository safety. Use only when the user explicitly asks to end, close, or hand off the current session.
context-update
Save a brief mid-session checkpoint to this workspace and update current state only when a priority or open thread changed. Use only when the user explicitly asks to checkpoint or save current progress.
faf-expert
Expert in .faf (Foundational AI-context Format) files for persistent project context. Use when working with .faf files, project DNA, CLAUDE.md bi-sync, faf-cli commands, MCP server configuration, or AI-readiness scoring (0-100%). Updated for v2.8.0 Tool Visibility System.
contextos-workspace
Run Context OS continuity and lifecycle workflows in a user-selected Context OS workspace. Use when asked to inspect, set up, update, or close a Context OS session.
import
Import a self-contained NeatContext context bundle shared by another person, or reconcile a newer copy of a context already on this machine, leaving the source bundle unchanged. Use only when the user explicitly invokes this skill or asks to import a NeatContext bundle.
save
Save durable decisions, findings, plans, and implementation knowledge from the visible Codex conversation into a new or existing NeatContext context. Use only when the user explicitly invokes this skill or asks to preserve the current conversation as reusable context.