name: rpg-wiki-manager description: Extracts entities (NPCs, Locations, Items, Lore, Handouts) from RPG session recaps and input files, updating the wiki structure.
RPG Wiki Manager Skill
This skill allows the agent to process session recaps and raw input files to update the D&D Campaign Wiki.
1. Input Processing Strategy (Manual Agentic Workflow)
The agent must manually read, analyze, and process each file. Do not rely on scripts for content extraction due to inconsistent formats.
Core Loop
For each target file in input/:
- READ: Read the full content of the file.
- IDENTIFY: Determine the type (Session Recap, Handout, Source Material).
- PARSE: Go through the content section by section (or paragraph by paragraph).
- LINK/CREATE: For every proper noun (Person, Place, Item), check if it exists in the wiki. Link it or create it.
- HANDLE ASSETS: Move linked images/videos to appropriate asset folders and update links.
- MOVE: Move the processed file to its final destination in
content/.
2. File Type Handling
- Session Recaps (e.g., "Sesja 64..."):
- Destination:
content/01-Sessions/ - Filename Format:
Sesja X - Title.md(e.g.Sesja 3 - Skradziony Róg.md). - Assets: Create a subdirectory
content/assets/sessions/<000>/(3-digit session number).- Images: Move all images used in the recap there. Update links.
- Videos: Check
input/06 Session Recaps/videos/for matches. Move them to the asset folder. Append them to the end of the recap file under## Filmysection using.
- Action: Extract entities (NPCs, Locations) mentioned. Update the "Session Index" if one exists.
- Destination:
- Handouts (Letters, Notes, Images):
- Destination:
content/07-Handouts/ - Action: Ensure it has a meaningful title. If it's an image, create a wrapper Markdown file.
- Destination:
- Source Material (Lore, Rulebooks):
- Destination:
content/(appropriate subfolder)
- Destination:
3. Entity Linking and Creation Rules (CRITICAL)
Goal: Every significant entity mentioned in the text must be wikilinked: [[Entity Name]].
Constraint: Do NOT modify the narrative content of the summary itself, only add wikilinks.
The "Preserve Image Prompts" Rule (CRITICAL)
- Alt Text is Precious: The Alt Text in image links (e.g.,
) contains the Generative AI Prompt used to create the image. - NEVER Truncate or Modify: When copying, moving, or editing files, you MUST preserve the Alt Text exactly as it is. Do NOT shorten it to
![Image],![Draw a fantasy castle...], or anything else. - Broken Prompts = Failure: Losing the prompt means the user cannot regenerate the image in the same style later.
The "Search First" Rule
Before creating ANY new file or link:
- SEARCH: Use
find_by_nameto see if the entity already exists.- Example: Input says "Kyrah the Goddess". Search for "Kyrah". Found
content/02-People/Kyrah.md. Acknowledge existence.
- Example: Input says "Kyrah the Goddess". Search for "Kyrah". Found
- LINK: In the text, replace "Kyrah the Goddess" with
[[Kyrah|Kyrah the Goddess]].- Rule: Always alias to the existing filename if the text differs.
The "Create with Template" Rule
If the entity does NOT exist:
- DETERMINE TYPE: Is it an NPC, Location, Item, Faction, or Handout?
- READ TEMPLATE: Use
view_fileon the appropriate template in the roottemplates/directory. - CREATE: Create the new file in the correct directory using the template content.
- LINK: Update the source text to link to this new file:
[[New Entity Name]].
The "Update Existing" Rule
If the entity DOES exist and plays a major role in the session (e.g. death, major revelation, change of status):
- UPDATE: Edit the entity's file.
- APPEND: Add a sentence to the
## Historiasection summarizing the new event. - REFERENCE: Explicitly link the session:
W [[Sesja X - Tytuł]]...
4. Inconsistency Handling
- Ambiguous Names: If "The Captain" is mentioned and you know who it is, link it:
[[Orestes|The Captain]]. - Variant Spellings: Fix spelling only if it's clearly a typo of a known name, and link it.
- Missing Data: If creating an NPC and you only know their name, fill the template with known info and leave others as "TBD" or empty. Do NOT invent information.
5. Standard Directories for New Entities
When creating NEW entities, always use these target directories:
- NPCs:
content/02-People/NPCs/(or specific subfolder if known, e.g.Mytros/) - PCs:
content/02-People/Heroes/ - Locations:
content/03-Locations/(useKontynent Thylea/or appropriate region if known) - Items:
content/04-Items-and-Loot/ - Factions:
content/02-People/Factions/ - Lore:
content/05-Lore/
6. Templates
All templates are in the root templates/ directory. Use these for new files:
- NPCs:
templates/NPC.md - PCs:
templates/PC.md - Locations:
templates/Location.md - Items:
templates/Item.md - Handouts:
templates/Handout.md - Factions:
templates/Faction.md