lore-init

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

A guided process for documenting how an unfamiliar software project is structured and how its important parts work.

In plain words
What is it for?
Use it to inspect a project and build shared context files through source tracing and questions for the developer.
Why use it?
It reduces the time an AI agent spends guessing about the codebase, dependencies, configuration, and entry points.

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-init
Any agent
npx skills add koersliven/Lore --skill lore-init
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-init

README.md
[![agentmods](https://agentmods.dev/badge/skills/koersliven/lore/lore-init.svg)](https://agentmods.dev/skills/koersliven/lore/lore-init)
Your own site
<a href="https://agentmods.dev/skills/koersliven/lore/lore-init"><img src="https://agentmods.dev/badge/skills/koersliven/lore/lore-init.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,280 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.01280
Opus 5 $0.00007 $0.00640
Sonnet 5 $0.00003 $0.00256
Haiku 4.5 $0.00001 $0.00128

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

Security

Grade A, and why

lore-init 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 3d 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-init/SKILL.md · 153 lines

How it starts

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

/init-context — Project Context Initialization

When to Trigger

  • User explicitly invokes this skill
  • Agent enters a project with no .ai-context/snapshot.md
  • Agent detects a project it has never seen before (no snapshot, no CLAUDE.md architecture section)

Purpose

Complete the 0→1 knowledge capture. Extract the developer's mental model of the project into structured .ai-context/ files so the agent reaches a minimum viable understanding level.

Process

Step 1: Project Discovery

First, scan the project to understand basics:

  • What language/framework? (package.json, pom.xml, go.mod, etc.)
  • What are the entry points? (controllers, routes, main functions)
  • Module structure (directories, packages, workspaces)
  • External dependencies (imports, package.json dependencies, Maven GAVs)

Report what you found, then proceed to questioning.

Step 2: Guided Questioning

Ask the user these questions in batches (3-5 at a time, conversational tone). Adapt questions based on what you already discovered.

Category A: External Dependencies
  • "这个项目调用了哪些外部服务或 API?对方提供什么能力?"
  • "有哪些依赖定义在外部 JAR 包里,你看不到源码的?"
Category B: Configuration
  • "配置存在哪里?(Diamond / env / 数据库 / 本地文件?)"
  • "有哪些关键配置项会影响行为?改了什么配置会导致线上出问题?"
Category C: Data Layer
  • "数据存储在哪里?有分库分表吗?规则是什么?"
  • "缓存策略是什么?什么数据被缓存?"
Category D: Business Context
  • "这个项目的业务场景是什么?服务于谁?"
  • "核心业务流程是什么?能描述 3-5 个关键步骤吗?"
Category E: Implicit Contracts
  • "有哪些未文档化的约定?"
  • "有哪些代码不能碰?为什么?"
  • "踩过哪些坑?哪些设计是因为历史事故才这样的?"

Step 3: Generate Initial Files

Based on answers, create:

.ai-context/snapshot.md:

  • Project overview (what it is, who it serves)
  • Core flows (end-to-end process descriptions)
  • Key decisions (WHY-level, with source tracing)
  • Constraints (things that must not change)
  • External dependencies (things AI cannot read from source)
  • Config index (where to find configurations)
  • Business context (scenarios, relationships)
  • Glossary (terminology)

Each entry must include:

- 来源: {{user name}}, {{date}}, /init-context guided session
- 置信度: high (directly from project owner/developer)
- 验证状态: verified

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

Subscribe to this mod's changes

lore-init 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,280 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

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

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

faf-context

Use FAF project context tools on this server — init, score, sync, discover; claim equals wire.

Wolfe-Jam/rust-faf-mcp · 24 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