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/terva-sh/terva/write-terva-lorenpx skills add terva-sh/terva --skill write-terva-loregit clone --depth 1 https://github.com/terva-sh/tervaWrote 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/terva-sh/terva/write-terva-lore)<a href="https://agentmods.dev/skills/terva-sh/terva/write-terva-lore"><img src="https://agentmods.dev/badge/skills/terva-sh/terva/write-terva-lore.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.1 | $0.00066 | $0.02077 |
| Opus 5 | $0.00033 | $0.01038 |
| Sonnet 5 | $0.00013 | $0.00415 |
| Haiku 4.5 | $0.00007 | $0.00208 |
Grade A, and why
write-terva-lore 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.
How it starts
The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing terva lore
Use this skill when the user asks to create, add, or write lore — keyed background context, "world info", a lorebook, or facts that should reach the model only when they matter. Skim it first, then write the entries where terva discovers them.
Lore is terva's keyed-context primitive: authored Markdown snippets injected
into the model's context when a trigger keyword appears in recent messages
(or always, for a constant entry), within a token budget. It is the general
form of a SillyTavern character card's character_book — a card's book imports
straight onto the same engine.
Lore vs persona vs skill vs card — pick the right one
- Lore is what the world knows: keyed facts injected on relevance. Reach for it for background, setting, NPC bios, glossaries — "when X comes up, the model should know Y."
- A persona (
write-terva-persona) is who is helping: identity + charter, always present. - A skill (
write-terva-skill) is how to do a task: a procedure loaded on demand. - A character card (
write-terva-card) is a portable CCv2 identity that can carry lore in itscharacter_book.
Lore adds no tools and changes no permissions; it only contributes context.
Where lore lives
Entries are discovered (recursively — every *.md except README.md) from three
tiers, highest priority first:
| tier | location | note |
|---|---|---|
| project | <cwd>/.terva/lore/ |
trust-gated — an untrusted workspace contributes none |
| personal | $TERVA_HOME/lore/ |
your own, every session |
| bundle | <ext>/lore/ of each enabled extension |
ships with an extension |
Unlike personas, entries are not name-shadowed — every entry from every tier
can fire. Collection-level settings live in a lore.json at a directory root
(the highest-priority lore.json wins).
Anatomy of an entry
One entry per Markdown file: YAML frontmatter + the content body.
---
name: The Sunken Bell
keys: [bell, fog-bell, tolling]
---
Beneath the harbor hangs the old fog-bell, rung only when the mist swallows the
lighthouse beam. Sailors say it tolls on its own before a wreck.
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.
- 5d ago First seen · 200 lines · 66 tokens per session scan A 186d1da76017
write-terva-lore is a skill published in the GitHub repository terva-sh/terva (2 stars, last pushed 3d ago), licensed MIT. It adds 66 tokens to every session and 2,077 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
memory-index
Index a folder's contents into the MemPalace semantic memory for search and retrieval. Use this skill whenever the user asks to "index a folder", "index a directory", "index memory", "mine a project into memory", "make a folder searchable", "embed a folder", "ingest code into the palace", or "index this directory for…
memory-mine
Mine project files or conversations into the MemPalace memory system. Indexes source code and conversation history as searchable palace drawers with semantic embeddings and room assignment.
memory-status
Show MemPalace memory system status — drawer counts, wings, rooms, knowledge graph stats, and embedding model state.
pi-sync
Daily upstream-sync job for the pi Go port — fetch upstream pi, triage every change since the recorded pin, port what's in scope, verify idiomatic + parity via independent reviews, update the ledger, and push. Use for "sync with upstream", "porting job", or as the scheduled daily run.
dream-memory
Consolidate recent logs, sessions, and existing memory files into durable topic memories, normalize dates, prune stale entries, and keep MEMORY.md short enough for prompt use.
memory-extractor
Extract durable memories from recent conversation turns into user, feedback, project, and reference categories while avoiding stale code-state facts.