lore-spec

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

A tool for writing design specifications before implementation. A specification is a written description of how a new API, data model, process, or module interface should work.

In plain words
What is it for?
Use it before starting a module or feature, or when asked to design before coding. It creates draft specifications for APIs, data models, workflows, and agreements between modules.
Why use it?
It records intended behavior before code is written, helping developers agree on the design instead of documenting decisions only after implementation. It also distinguishes planned design from decisions that have already happened.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/koersliven/lore/lore-spec.svg)](https://agentmods.dev/skills/koersliven/lore/lore-spec)
Your own site
<a href="https://agentmods.dev/skills/koersliven/lore/lore-spec"><img src="https://agentmods.dev/badge/skills/koersliven/lore/lore-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,085 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.1 $0.00016 $0.01085
Opus 5 $0.00008 $0.00543
Sonnet 5 $0.00003 $0.00217
Haiku 4.5 $0.00002 $0.00109

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

Security

Grade A, and why

lore-spec 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 5d 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-spec/SKILL.md · 177 lines

How it starts

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

/spec — L0 Prescriptive Design Spec

在写代码之前,先写下设计意图。L0 是 Lore 的 prescriptive 层——不是记录"代码是什么",而是记录"代码应该是什么"。

与 L3 的区别

L3 (Process) L0 (Spec)
内容 已发生的决策和原因 尚未实现的设计意图
来源 对话中自动提取 人工主动编写
时机 代码之后 代码之前
格式 描述性(发生了什么) 规定性(应该怎么做)

When to Trigger

  • 开始一个新模块/功能之前
  • 用户说"先设计再写代码"
  • 用户说"/spec" 显式调用

Process

Step 1: Identify Target Module

如果 modules/ 存在:

  1. 读取 modules/_index.md 列出已知模块
  2. 让用户选择要给哪个模块写 spec
  3. 如果模块不存在,先用 /lore-modularize 发现模块

如果 modules/ 不存在:

  • Spec 放在项目级 specs/ 目录(暂不支持模块)

Step 2: Select Spec Type

支持的 Spec 类型:
1. api-design — API 设计(端点、请求、响应、错误码)
2. data-model — 数据模型(实体、字段、关系)
3. flow-design — 流程设计(状态机、业务流程)
4. interface-contract — 接口契约(模块间调用约定)

Step 3: Create Spec File

modules/<module>/specs/ 下创建 <type>-<name>.md>

# Spec: {{API Name / Feature Name}}

> Type: {{api-design / data-model / flow-design / interface-contract}}
> Module: {{module-name}}
> Author: {{author}}
> Created: {{YYYY-MM-DD}}
> Status: draft  ← draft | proposed | approved | implemented | superseded

## Design Intent

{{描述设计目标和约束,不是实现细节}}

## Spec Details

{{具体规格,视类型而定}}

### API Design
- Endpoint: POST /api/...
- Request: {{schema}}
- Response: {{schema}}
- Errors: {{error codes}}

### Data Model
- Entity: {{name}}
- Fields: {{field list}}
- Relationships: {{relations}}

### Flow Design
- Entry: {{trigger}}
- States: {{state list}}
- Transitions: {{transitions}}

## Implementation Checklist

- [ ] 基础结构已创建
- [ ] 核心逻辑实现
- [ ] 测试覆盖
- [ ] 文档更新

## Notes

{{额外说明}}

Step 4: Link to Knowledge

当 spec 状态变为 implemented 时:

  1. 将 spec 的核心设计决策转为 L3 知识
  2. 写入 modules/<module>/increments/ 作为 increment
  3. 将 spec 状态改为 implemented
## Post-Implementation

从本 spec 提炼的知识:
- [DECISION] {{设计决策}}
  - 来源: spec/{{spec-name}}.md
  - confidence: high(经过设计评审)

Commands

/spec create

创建新 spec:

/spec create order api-design order-creation
→ 创建 modules/order/specs/api-design-order-creation.md

Read the full file on GitHub · 177 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. 5d ago First seen · 177 lines · 16 tokens per session scan A ab0d3a4ad690

Subscribe to this mod's changes

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

repomix

Pack and analyze codebases into AI-friendly single files using Repomix. Use when the user wants to explore repositories, analyze code structure, find patterns, check token counts, or prepare codebase context for AI analysis. Supports both local directories and remote GitHub repositories.

yamadashy/repomix · 58 tokens

skill-creator

Generate a new skill from a plain-language description — decides invocation control, arguments, and context cost, then scaffolds, validates, and tests it.

conorbronsdon/agent-context-os · 33 tokens

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

Build, import, or refresh this workspace's identity, project, reusable-workflow, and weekly-state files through a guided review. Use only when the user explicitly asks to initialize or redo workspace context.

conorbronsdon/agent-context-os · 44 tokens

context-start

Load this workspace's current state, recent decisions, blockers, priorities, and session continuity, then give a concise briefing. Use only when the user explicitly asks to begin or resume a workspace session.

conorbronsdon/agent-context-os · 42 tokens

migrate-gemini

Migrate selected Gemini CLI instructions, commands, skills, hooks, and MCP configuration into this workspace with a dry run, review gates, and parity checks.

conorbronsdon/agent-context-os · 37 tokens