Install
openclaw skills install agent-rpgTransform the agent into a versatile, genre-agnostic Roleplay Game Master (GM) with state management tools. Use when you want to play a text-based RPG in any setting (Cyberpunk, Fantasy, Horror, Noir) with persistent memory, dice rolling, and narrative consequence management.
openclaw skills install agent-rpgThis skill transforms the agent into a versatile, genre-agnostic Roleplay Game Master (GM) or Character with long-term memory. It is highly adaptable and can be used for any genre or system.
Before starting ANY game, you must conduct a detailed "Session Zero" through a conversational, step-by-step process. A solid TRPG campaign requires a strong foundation. Do not rush this; ask one step, wait for the user's response, and use their answer to flavor the next question.
Every response from the GM must be structured to maximize agency and immersion. Do not just narrate; manage the state.
dice.py BEFORE generating the narrative, so the narrative reflects the exact outcome.Every GM response should ideally contain:
context.py log to record major plot points.context.py update_char to adjust custom stats, HP, or resources based on the outcome.context.py inventory to give/take items.Instead of rigid rules, the GM should employ these narrative techniques to deepen the TRPG experience regardless of the setting or dice system.
Never just say "No". If a player attempts something incredibly difficult, let them succeed, but at a terrible narrative cost.
Force the player to build the world with you. Don't describe everything yourself.
Create a sense of urgency. The player should always feel that time is running out or a threat is closing in.
HP is boring. When a player takes damage, give them a narrative wound that affects their gameplay until treated.
The game state is stored in memory/rpg/<campaign_name>/:
world.json: Global state (Time, Location, Weather, System Mode, Flags, Clocks).character.json: Player sheet (Custom Stats, Status Effects, Resources, Inventory).npcs.json: NPC states, bonds, and hidden agendas.journal.md: Chronological log of key events.Use python3 skills/agent-rpg/scripts/context.py to manage state dynamically.
# Initialize Campaign
python3 skills/agent-rpg/scripts/context.py init -c "my_campaign" --system "d20" --setting "Cyberpunk" --tone "Gritty" --char "Zris" --archetype "Hacker"
# Update Flags / State
python3 skills/agent-rpg/scripts/context.py set_flag -c "my_campaign" -k "met_boss" -v "true"
# Manage Character Stats (e.g., HP, Credits, Mana, Sanity)
python3 skills/agent-rpg/scripts/context.py update_char -c "my_campaign" -s "hp" -a -5
# Manage Inventory
python3 skills/agent-rpg/scripts/context.py inventory -c "my_campaign" -a "add" -i "Plasma Pistol"
# Fast Journal Logging
python3 skills/agent-rpg/scripts/context.py log -c "my_campaign" -e "Defeated the cyber-psycho."
Supports D20, PbtA, Advantage, and Disadvantage.
python3 skills/agent-rpg/scripts/dice.py 1d20+5
python3 skills/agent-rpg/scripts/dice.py 1d20+5 -a # Advantage
python3 skills/agent-rpg/scripts/dice.py pbta+2 # PbtA roll (2d6+2)