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.
npx agentmods add skills/barakgut/lore/lore-initnpx skills add barakgut/lore --skill lore-initgit clone --depth 1 https://github.com/barakgut/loreWrote 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.
[](https://agentmods.dev/skills/barakgut/lore/lore-init)<a href="https://agentmods.dev/skills/barakgut/lore/lore-init"><img src="https://agentmods.dev/badge/skills/barakgut/lore/lore-init.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00058 | $0.01120 |
| Opus 5 | $0.00029 | $0.00560 |
| Sonnet 5 | $0.00012 | $0.00224 |
| Haiku 4.5 | $0.00006 | $0.00112 |
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.
What it actually says
/lore:lore-init [path] [--no-git]
Follow the lore skill for all conventions. The full-rules schema every new lore is seeded with lives at ${CLAUDE_PLUGIN_ROOT}/skills/lore-init/templates/CLAUDE.md — i.e. templates/CLAUDE.md next to this file, if you need to locate it another way.
- Resolve
LORE= the path argument if given, else$HOME/lore. Expand to an absolute path. Note whether the user passed--no-git— it decides step 4's last block. - Already a lore? If
$LORE/index.mdexists: touch nothing. Report "already a lore, nothing to do" with the path, remind the user that a lore needs no config —cdinto it, or add the## Knowledge Basesection from step 5 to a project'sCLAUDE.md— and stop. - Non-empty, non-lore folder? If
$LOREexists, is non-empty, and has noindex.md: refuse and ask the user for a different path. Never scaffold over foreign files. One exception — if it holds bothwiki/andCLAUDE.md, it is a lore whose generated index is merely missing (theloreskill's Finding the lore): scaffold nothing, regenerate per Index regeneration (step 4's last line), report the repair, and stop. - Scaffold:
mkdir -p "$LORE/raw" "$LORE/wiki"
cat > "$LORE/log.md" <<EOF
# Lore Log
## [$(date +%F)] init | lore created
EOF
cp "${CLAUDE_PLUGIN_ROOT}/skills/lore-init/templates/CLAUDE.md" "$LORE/CLAUDE.md"
cat > "$LORE/.ignore" <<'EOF'
dashboard.html
EOF
cat > "$LORE/.gitignore" <<'EOF'
dashboard.html
EOF
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/lore_index.py" "$LORE"
If that copy fails — CLAUDE_PLUGIN_ROOT unset or the template not found there — locate templates/CLAUDE.md next to this SKILL.md and copy it. If you still cannot find it, STOP and tell the user: a lore without its CLAUDE.md has no schema layer, and step 2 will refuse to heal it later.
The last line writes index.md — the # Lore Index header plus the generated-marker comment the script keys on, and nothing else while wiki/ is empty. Never write index.md by hand, not even a placeholder: it is generated from wiki/ frontmatter, and the plugin hook denies file-tool writes to it. If the script is not where CLAUDE_PLUGIN_ROOT says, use scripts/lore_index.py under the plugin root (the directory holding this skill's skills/ folder); if you still cannot find it, STOP and tell the user — a scaffold left without index.md is not recognised as a lore by step 2 or by the lore skill's cwd rung.
Then, only if the user did not pass --no-git, initialise the repository. Run this block on a default init; on --no-git do not run it at all — not even "just in case":
cd "$LORE" && git init -q && git add -A && git commit -q -m "init: lore scaffold"
(If git identity is unset in this environment, set a repo-local one first with git config user.email / git config user.name, asking the user for values if unknown.)
With --no-git the lore has no history and no undo. Say so once in the report: ingest and lint will write pages without committing.
-
Report: the lore path, what was created, whether git was initialised, and next steps — drop files into
raw/, thencdinto the lore and run/lore:lore-ingest. Mention that the lore ignoresdashboard.html, the optional human-only view (python3 scripts/lore_dashboard.py <lore>from the plugin repo). Mention thatindex.mdis generated from the pages' frontmatter and is never hand-edited. Nothing was written outside the lore folder.Then print this block verbatim, with
$LOREsubstituted, and tell the user to paste it into theCLAUDE.mdof every project that should use this lore (one lore can serve any number of projects; the lore itself keeps no list of them):## Knowledge Base This project has a knowledge base (a lore) at `$LORE`. It is the source of truth: you MUST consult it first, via the `lore` skill, before answering any domain question.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 3d ago First seen · 54 lines · 58 tokens per session scan A 42b33094177f
lore-init is a skill published in the GitHub repository barakgut/lore (1 stars, last pushed 6d ago), licensed MIT. It adds 58 tokens to every session and 1,120 once invoked, about $0.0003 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.
Other skills, from other repositories
migrate
Scan the project and migrate existing documentation into OKF format. Use when the user wants to populate the knowledge base from existing docs, README, schemas, API specs, runbooks, or any structured project knowledge. Trigger on "migrate to okf", "populate the knowledge base", "scan my docs", "convert docs to okf"…
setup
Scaffold a complete knowledge system. Detects platform, conducts conversation, derives configuration, generates everything. Validates against 15 kernel primitives. Triggers on "/setup", "/setup --advanced", "set up my knowledge system", "create my vault".
llm-wiki
Build and maintain an LLM-curated personal knowledge base — the "LLM Wiki" pattern from Andrej Karpathy's April 2026 gist. Use this skill whenever the user wants to ingest a source (paper, article, transcript, PDF, notes) into a persistent compounding knowledge base, ask a question against accumulated notes, lint or…
claude-mega-brain
OKF knowledge navigation. ALWAYS use this skill the moment a block appears in session context — it means the project has documented concepts and you must consult them before answering questions about data, schemas, metrics, APIs, or systems. Also trigger when the user asks about a table, column, metric definition…
ingest
Create or update a single OKF concept file from raw input. Use when the user wants to document a specific table, metric, API, service, or concept in the knowledge base — even if they say "add this to the okf", "documenta essa tabela", "cria um conceito pra isso", "adiciona no knowledge base", "register this API", or…
init
Initialize OKF knowledge base files in the current project. Use when the user wants to start documenting their project for claude-mega-brain, or when the user says "init mega brain", "setup the knowledge base", "cria o okf", "inicializa o mega brain", "quero usar o mega brain", "criar a estrutura do knowledge base"…