lorekit: Instructions file for Codex

AGENTS.md

lorekit AGENTS.md is an instructions file for Codex, OpenCode from GYF0311/lorekit. It costs 2,123 tokens per session, scanned A, original, MIT.

Project instructions for Lorekit’s AGENTS.md file, which guides AI agents working on the source code. Lorekit is a toolkit for letting AI build and maintain a personal knowledge base.

In plain words
What is it for?
Use them when changing Lorekit’s code, documentation, or project context, especially when handing work to a new AI session.
Why use it?
They separate coding rules from installation and usage help, while pointing the agent to current project status, architecture, and verification steps.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is GYF0311/lorekit's own configuration. It tells Codex and OpenCode how to work on lorekit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything lorekit configures →

Reuse

Borrowing it

Nothing to install: this file belongs to GYF0311/lorekit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/GYF0311/lorekit/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/GYF0311/lorekit

Made for: Codex, OpenCode.

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 lorekit AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/gyf0311/lorekit/agents-md/github.svg)](https://agentmods.dev/instructions/gyf0311/lorekit/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/gyf0311/lorekit/agents-md"><img src="https://agentmods.dev/badge/instructions/gyf0311/lorekit/agents-md/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 lorekit AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/gyf0311/lorekit/agents-md"><img src="https://agentmods.dev/badge/instructions/gyf0311/lorekit/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,123 This file is loaded in full into every session.
When invoked 2,123 The same file — it is already loaded in full.
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.02123 $0.02123
Opus 5.5 $0.00849 $0.00849
Sonnet 5.5 $0.00425 $0.00425
Haiku 4.5 $0.00212 $0.00212

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

Security

Grade A, and why

lorekit AGENTS.md 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.

AGENTS.md · 169 lines

How it starts

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

AGENTS.md — lorekit

本文件是 lorekit 源码仓库的 AI coding 入口,只服务于开发、维护和交接。 如果用户要安装或使用 lorekit,请转到 README.md、docs/INSTALLATION.md、docs/QUICKSTART.md,不要把安装支持误当成源码改动任务。

Project Status

  • 当前版本:以 VERSION 和 package.json 为准,本文件不重复记版本号。
  • 产品边界:AI 负责语义判断;lorekit CLI 负责确定性、安全、可重复的文件、状态、索引、检索动作。
  • 当前任务、近期进展、剩余收尾:一律以 .context/CHECKPOINT.md 和 .context/STATUS.md 为准。本文件只承载恒定规则,不维护会过期的状态快照。
  • 历史日志在 docs/history/,默认不读。

入口边界

读者 / 任务 先读
人类或用户评估 lorekit README.md
用户或 AI 安装 lorekit docs/INSTALLATION.md,再读 docs/QUICKSTART.md
AI 修改 lorekit 源码 本文件,再按下方 CMAP route
贡献者理解架构 docs/CONVENTIONS.md、docs/ARCHITECTURE.md、docs/CODEBASE-MAP.md、docs/DESIGN-NOTES.md

不要把长安装教程放进本文件。安装文档漂移时,改 README.md / docs/INSTALLATION.md / docs/QUICKSTART.md。

CMAP 项目地图(接手时必读)

本仓库已接入 CMAP,.context 是 repo-local 项目地图,用来帮助 AI 新会话快速续接上下文;它不替代本文的项目规则。

接手顺序:

  1. 先读本文,确认数据安全、文档同步和验证规则。
  2. 读 .context/CHECKPOINT.md 看当前任务和最近验证。
  3. 读 .context/MAP.md 看模块地图、数据流和路由规则。
  4. 运行 cmap route "<task>",只读取命中的 .context/modules/<module>.md,不要默认全量读取 .context。
  5. 修改代码、docs 或 .context 后,按 .context/VERIFY.md 跑验证;收尾至少跑 cmap verify --changed 和 git diff --check。

可信事实源:.context/MAP.md、.context/CHECKPOINT.md、.context/STATUS.md、.context/DECISIONS.md、.context/VERIFY.md、.context/modules/*.md。

辅助层:.context/out/、.context/inbox/、.context/generated/、.context/logs/、.context/ideas/、_cmap/lorekit/、_cmap-view/。这些只做候选、日志或展示,不直接当项目事实。

正文约定:.context 的人读正文默认中文;frontmatter key、module id、命令、路径和代码标识符保留英文,保证 cmap CLI 可解析。

AI 编码 12 条准则

These rules apply to every task in this project unless explicitly overridden. Bias: caution over speed on non-trivial work. Use judgment on trivial tasks.

Rule 1 — Think Before Coding

State assumptions explicitly. If uncertain, ask rather than guess. Present multiple interpretations when ambiguity exists. Push back when a simpler approach exists. Stop when confused. Name what's unclear.

Read the full file on GitHub · 169 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 · 169 lines · 2,123 tokens per session scan A dc7b8cee084a

Subscribe to this mod's changes

lorekit AGENTS.md is an instructions file published in the GitHub repository GYF0311/lorekit (5 stars, last pushed 3mo ago), licensed MIT. It adds 2,123 tokens to every session, about $0.0085 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 instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens