lore-health

lore-health is a skill for Claude Code from koersliven/Lore. It costs 21 tokens per session (1,395 once invoked), scanned A, original, Apache-2.0.

A knowledge-health checker that compares stored project knowledge with the codebase and identifies entries that may be outdated, replaced, or contradicted. It treats code as the authority for code facts and business rules as the authority for business facts.

In plain words
What is it for?
Use it when an agent starts a session, before compiling updated knowledge, or whenever you need to check code references, business rules, decisions, and organization notes.
Why use it?
It helps prevent an agent from relying on old or conflicting project information as the code and business change. Missing code alone is not treated as proof that a business fact is obsolete.

Skill for Claude Code

Written for Claude Code: SessionStart hook event.

Good fit Use it when an agent starts a session, before compiling updated knowledge, or whenever you need to check code references, business rules, decisions, and organization notes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/koersliven/lore/lore-health
Install

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.

Any agent
npx skills add koersliven/Lore --skill lore-health
Clone the repo
git clone --depth 1 https://github.com/koersliven/Lore

Made for: Claude Code.

Wrote 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.

agentmods badge for lore-health

README.md
[![agentmods](https://agentmods.dev/badge/skills/koersliven/lore/lore-health/github.svg)](https://agentmods.dev/skills/koersliven/lore/lore-health)
Your own site
<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.

agentmods 80×15 button for lore-health

Your own site · 80×15
<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>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,395 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 12d ago against content hash 020aed1d7cbd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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.

skills/lore-health/SKILL.md · 172 lines

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 描述不准但知识本身可能仍对 标记 [待修正]

Read the full file on GitHub · 172 lines

Changes

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.

  1. 12d ago First seen · 172 lines · 21 tokens per session scan A 020aed1d7cbd

Subscribe to this mod's changes

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.

Related

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.

conorbronsdon/agent-context-os · 46 tokens

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.

conorbronsdon/agent-context-os · 39 tokens

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.

Wolfe-Jam/grok-faf-mcp · 69 tokens

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.

conorbronsdon/agent-context-os · 38 tokens

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.

XTSoftwareLabs/neatcontext-plugins · 54 tokens

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.

XTSoftwareLabs/neatcontext-plugins · 49 tokens