lore-sync

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

A tool that scans a codebase and synchronizes a project's basic structural knowledge with the current code. It records modules, entry points, dependencies, and public interfaces.

In plain words
What is it for?
Use it to scan Node.js, Java, Go, Rust, or Python projects and update knowledge about folders, packages, services, routes, APIs, and dependencies.
Why use it?
It keeps the structural part of an agent's project knowledge aligned after refactoring or other code changes. This fills in information that developers may not have explained in conversation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scan Node.js, Java, Go, Rust, or Python projects and update knowledge about folders, packages, services, routes, APIs, and dependencies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/koersliven/lore/lore-sync
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-sync
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-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/koersliven/lore/lore-sync/github.svg)](https://agentmods.dev/skills/koersliven/lore/lore-sync)
Your own site
<a href="https://agentmods.dev/skills/koersliven/lore/lore-sync"><img src="https://agentmods.dev/badge/skills/koersliven/lore/lore-sync/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-sync

Your own site · 80×15
<a href="https://agentmods.dev/skills/koersliven/lore/lore-sync"><img src="https://agentmods.dev/badge/skills/koersliven/lore/lore-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,570 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.00018 $0.01570
Opus 5.5 $0.00007 $0.00628
Sonnet 5.5 $0.00004 $0.00314
Haiku 4.5 $0.00002 $0.00157

Measured 1mo ago against content hash 4d5c1b7a6bad, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

lore-sync 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 1mo 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-sync/SKILL.md · 238 lines

How it starts

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

/sync — Code Structure Auto-Scan

自动扫描项目结构,生成 L1 层知识(代码可表达的结构信息),与 snapshot 比对并更新。

When to Trigger

  • User explicitly invokes this skill
  • After major refactoring or module changes
  • Periodically (e.g., weekly) as maintenance

Purpose

Lore 的 L3 层(过程知识)依赖对话沉淀,但 L1 层(结构知识)可以从代码直接提取。/sync 补补"开发者不说话时 Lore 什么都不知道"的盲区。

L1 层知识范围:

  • 模块结构(目录、包、workspace)
  • 入口点(Controller、Router、main 函数)
  • 外部依赖(imports、package.json、pom.xml)
  • 接口定义(公开 API、HSF 接口)

Process

Step 1: Detect Project Type

识别项目技术栈:

检查文件:
- package.json → Node.js/TypeScript
- pom.xml / build.gradle → Java
- go.mod → Go
- Cargo.toml → Rust
- pyproject.toml / requirements.txt → Python

Step 2: Scan Structure

根据项目类型执行扫描:

Node.js/TypeScript
扫描:
- package.json → dependencies, scripts, workspaces
- src/ 目录 → 入口文件 (index.ts, main.ts, app.ts)
- Controller 文件 → HTTP 入口
- Router 文件 → 路由定义
Java
扫描:
- pom.xml → dependencies, modules
- src/main/java/ → 包结构
- *Controller.java → HTTP 入口
- *Service.java → 服务接口
- @HSFService 注解 → HSF 接口
Go
扫描:
- go.mod → dependencies
- main.go → 入口
- internal/ → 内部模块
- api/ → API 定义

Step 3: Extract L1 Knowledge

将扫描结果转为 L1 知识格式:

## L1 Structure Layer

### Modules
- web: HTTP/HSF 入口层
- service: 核心业务逻辑
- dal: 数据访问层

### Entry Points
- POST /api/orders → OrderController.create()
- GET /api/products/:id → ProductController.get()
- HSF OrderService.createOrder() → 订单创建

### Dependencies
- spring-boot-starter-web: HTTP 框架
- mybatis-plus: ORM
- hsf-sdk: RPC 框架

### External Types (待补充)
- AbilityExpand (nurture-product-tenant-common.jar)

Step 4: Compare with Snapshot

读取 snapshot 中现有的 L1 内容,比对差异:

扫描结果:
- 模块: web, service, dal, scheduler (新)

Snapshot 现有:
- 模块: web, service, dal

差异:
+ 新增模块: scheduler
- 入口点一致
~ 依赖版本变更: spring-boot 2.7 → 3.0

Step 5: Generate Update

根据差异生成更新:

新增的结构 → 直接追加到 snapshot

删除的结构 → 标记 [REMOVED],移至 archive

变更的结构 → 标记 [CHANGED],保留新旧对比

Step 6: Write Increment

Read the full file on GitHub · 238 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. 1mo ago First seen · 238 lines · 18 tokens per session scan A 4d5c1b7a6bad

Subscribe to this mod's changes

lore-sync is a skill published in the GitHub repository koersliven/Lore (5 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 1,570 once invoked, about $0.0001 per session on Opus 5.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

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