world-lore
Skill17 starsChanged 5 months agoMITView on GitHub
Schema and rules for creating world lore
In this repository33 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- abilitiesSkill
- ai-instructionsSkill
- archetypesSkill
- build-skillSkill
- canon-npcsSkill
- chartsSkill
- countSkill
- creator-apiSkill
- factionsSkill
- image-genSkill
- itemsSkill
- japanese-romanizationSkill
- locationsSkill
- mapsSkill
- name-filter-settingsSkill
- narrative-eventsSkill
- npcsSkill
- npc-type-reviewSkill
- npc-typesSkill
- orchestratorSkill
- premade-charactersSkill
- questsSkill
- realmsSkill
- reflectSkill
- regionsSkill
- review-npcsSkill
- settingsSkill
- skillsSkill
- story-startsSkill
- traitsSkill
- triggersSkill
- world-backgroundSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Write self-contained, semantically rich paragraphs that will match relevant player queries.
- Distinctive: line 70
Avoid: "A big war happened long ago"
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
World Lore
Edit tabs/world-lore.json.
World lore entries are specific discoverable knowledge - facts, history, legends, and secrets that the AI knows and can gradually reveal during gameplay. This is distinct from worldBackground (overall setting description).
Required Fields
| Field | Requirement |
| Object key | Unique Proper Case identifier describing the lore topic (e.g., "The Great Forgetting", "Ancient Bloodlines") |
text | Self-contained, semantically rich paragraph (see format below) |
Conditional Fields
| Field | When to Include |
Never Include
Omit these fields (auto-generated at runtime):
type,gameTick,lastUsedTick,embedding,embeddingId(the server derives embeddings itself and strips authored values on save)
text Format
Write self-contained, semantically rich paragraphs that will match relevant player queries.
Structure: What + When/Where + Why it matters + Consequences or current state
Include multiple keywords to improve semantic retrieval during gameplay.
Format: "[Topic] [happened/exists/works]. [Context and details]. [Impact or current relevance]. [Any secrets or implications]."
Lore Categories
Different types of lore serve different narrative purposes:
Historical Events - Past events that shaped the world
- Wars, plagues, catastrophes, founding moments
- Include dates/timeframes and lasting consequences
World Rules - How things work in this world
- Magic systems, technology, social customs, laws
- Include costs, limitations, and exceptions
Faction Secrets - Hidden knowledge about organizations
- Internal structures, secret goals, recognition signs
- Frame as narrator-only information
Geographic Knowledge - Information about places
- Hidden locations, dangerous areas, lost treasures
- Include clues for discovery
Writing for Retrieval
Lore is retrieved via semantic search based on what's happening in the story. Write entries that will match relevant queries.
Include keywords - Multiple synonyms and related terms help retrieval:
- "Healing magic draws from nature. Healers, priests, and druids can channel this power. Healing spells require contact."
Be specific - Concrete details are more searchable than vague descriptions:
- Good: "The Dragon Wars of 1180 killed one third of the population"
- Avoid: "A big war happened long ago"
Self-contained - Each entry should make sense on its own without requiring other entries.
Narrator-Only Secrets
For information the AI should know but not reveal directly, frame it explicitly:
"Lord Aldric is secretly working for the enemy. He passes information through his servant Marcus. The party should not learn this until they discover evidence themselves."
The AI uses this for consistent behavior but won't reveal prematurely.
Schema
interface WorldLoreEntry {
text: string // The lore content
embeddingId?: string // Reference to pre-computed embedding
}Species Lore
When creating world lore for a species, there must also be corresponding NPC Type and Trait entries. The text uses a narrative prose format with skills woven into flowing sentences, distinct from the NPC Type and Trait formats. The lore paragraphs are shared but the skill presentation differs.
See Species Consistency Rules for the full requirements.
Faction Lore
When creating world lore for a faction, there must also be a corresponding Faction entry. The world lore key must match the faction key exactly. The text must be identical to the faction's basicInfo (same text, two retrieval pathways: semantic search for lore, exact key match for faction).
Reference
For detailed documentation, see world-lore-reference.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

