lore-evolve

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

A project-knowledge tool that compiles accumulated notes into `.ai-context/snapshot.md`, a long-term record of how the project works. It can detect conflicts and supports separate snapshots for project modules.

In plain words
What is it for?
Compiling project knowledge after major features, pull requests, or many accumulated updates; organizing that knowledge by module when the project uses modular mode.
Why use it?
It turns scattered knowledge increments into a maintained project reference, helping an agent retain design decisions and other context across work sessions.

Skill for Claude CodeCodex

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.

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

Made for: Claude Code, Codex.

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-evolve

README.md
[![agentmods](https://agentmods.dev/badge/skills/koersliven/lore/lore-evolve.svg)](https://agentmods.dev/skills/koersliven/lore/lore-evolve)
Your own site
<a href="https://agentmods.dev/skills/koersliven/lore/lore-evolve"><img src="https://agentmods.dev/badge/skills/koersliven/lore/lore-evolve.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,597 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00014 $0.01597
Opus 5 $0.00007 $0.00798
Sonnet 5 $0.00003 $0.00319
Haiku 4.5 $0.00001 $0.00160

Measured 4d ago against content hash ed83c325b17b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lore-evolve 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 4d 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-evolve/SKILL.md · 190 lines

How it starts

The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/evolve — Snapshot Compilation

When to Trigger

  • User explicitly invokes this skill
  • Stop hook detects 10+ rounds of accumulated knowledge (hard limit)
  • Periodic maintenance (agent notices many uncompiled increments)
  • After a major feature completion or PR merge

Purpose

Compile all accumulated increment files into a single, coherent .ai-context/snapshot.md — the agent's "long-term memory" of the project. This is the project's living architecture document that grows more accurate with each compilation.

Process

Step 0: Detect Modular Mode

Check if .ai-context/modules/ directory exists.

  • If no → Check if this is the first compile with sufficient module-scoped knowledge. If snapshot.md has knowledge entries with file references that can be mapped to code directories, auto-trigger modular partitioning by executing /lore-modularize before proceeding. Then run legacy evolve if no modules were discovered.
  • If yes → Run modular evolve path (Steps 1-8 below).

Step 1: Read Current State

Read:

  1. .ai-context/snapshot.md — current snapshot (may not exist for first compile)
  2. .ai-context/modules/_index.md — module registry (if modular mode)
  3. For each known module, read modules/<name>/knowledge.md
  4. All files in .ai-context/increments/ — sorted by date (oldest first)
  5. For each module, read modules/<name>/increments/
  6. .ai-context/config.yaml — project configuration

Step 2: Route Increments by Domain

For each uncompiled increment (global or per-module):

Determine target:

  • Has domain: <module-name> meta field AND module exists in _index.md → target that module's knowledge.md
  • No domain field but affected_files paths match a module's code path → infer domain, target that module
  • No domain and no file path match → target global snapshot.md
  • domain references unknown module → create warning, route to global snapshot.md

Step 3: Conflict Detection (per-target)

For each new increment, check against its target (snapshot.md or modules//knowledge.md):

Read the full file on GitHub · 190 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. 4d ago First seen · 190 lines · 14 tokens per session scan A ed83c325b17b

Subscribe to this mod's changes

lore-evolve is a skill published in the GitHub repository koersliven/Lore (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 14 tokens to every session and 1,597 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

trpc

Skill "trpc" from neverinfamous/memory-journal-mcp, covering trpc guidelines, 1. routers and procedures, 2. context and middleware and 3. client integration.

neverinfamous/memory-journal-mcp · 50 tokens

journal-optimizer

Guided database pruning and optimization workflows for memory-journal-mcp. Uses importance scores, relationship density, and entry metadata to identify low-value entries for safe soft-deletion. Includes dry-run previews, backup gates, and revert guidance. Use when the user says "clean up the database", "optimize…

neverinfamous/memory-journal-mcp · 101 tokens

wrap

Session-end retrospective. Produces a dated retro file, appends to a cross-session tooling journal, and reconciles NEXTSESSION.md so the next session can resume cleanly. Invoke as /wrap when ending a session, or /wrap -q for the local repo work only (NEXTSESSION.md + CLAUDE.md, no retro or journal).

nullphase-net/enfurbish · 72 tokens

personal-context

Interview the user to build or update a reusable "about me" context file for AI tools — who they are, their role and background, how they work, and how they want AI to help. Use when the user says "build my personal context", "create my about-me context", "set up my AI context", "update my personal context", or wants…

nocodework/ai-context-kit · 97 tokens

refresh-context

Review and refresh an existing personal-context.md or company-context.md — check what has gone stale, fill gaps against the current template, and update the file. Use when the user says "refresh my context", "review my context", "is my context still up to date", "my context is stale", or after a change in role, offer…

nocodework/ai-context-kit · 90 tokens

context-guard

Installs Claude Code hooks that keep AI context files fresh. Two-tier enforcement — Tier 1 nudges at session end, Tier 2 blocks commits when structural files are staged without context updates. Includes content filter, drift check, structural change reminder, SessionStart health check, and the context-updater agent.

littlebearapps/contextdocs · 66 tokens