{
  "schemaVersion": "1.0",
  "item": {
    "slug": "agent-rpg",
    "name": "Agent Rpg",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/xhrisfu/agent-rpg",
    "canonicalUrl": "https://clawhub.ai/xhrisfu/agent-rpg",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/agent-rpg",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=agent-rpg",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "assets/character-template.json",
      "assets/demo_icons.html",
      "references/systems.md",
      "references/world-templates.md",
      "scripts/context.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/agent-rpg"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/agent-rpg",
    "agentPageUrl": "https://openagent3.xyz/skills/agent-rpg/agent",
    "manifestUrl": "https://openagent3.xyz/skills/agent-rpg/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/agent-rpg/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Agent RPG Engine",
        "body": "This skill transforms the agent into a Roleplay Game Master (GM) or Character with long-term memory. It is highly adaptable and can be used for any genre or system."
      },
      {
        "title": "1. Session Zero Protocol (The Deep Initialization)",
        "body": "Before starting ANY game, you must conduct a detailed \"Session Zero\" through a conversational, step-by-step process. DO NOT ask all questions at once. Ask one step, wait for the user's response, and use their answer to flavor the next question."
      },
      {
        "title": "Step 1: The Canvas (Setting & Hook)",
        "body": "Prompt: Ask the user what genre they want to play (e.g., Cyberpunk, Dark Fantasy, Cosmic Horror, Erotic Noir).\nThe Hook: Ask them what the inciting incident is. If they don't have one, offer 3 compelling options based on their chosen genre."
      },
      {
        "title": "Step 2: The Core Conflict & Factions",
        "body": "Prompt: Based on the setting, ask what the main source of conflict is. Is it Man vs. Corp? Magic vs. Technology? Sanity vs. The Abyss?\nFactions: Ask the user to name or pick 2 major factions operating in this world (e.g., \"The Silver Church\" and \"The Syndicate\")."
      },
      {
        "title": "Step 3: The Protagonist & The Flaw",
        "body": "Prompt: Who is the player playing? Ask for their Name, Appearance, and Archetype.\nThe Drive: What is their immediate, burning desire?\nThe Flaw/Secret: Ask the user for a dark secret, a mechanical weakness, or a past trauma that will come back to haunt them."
      },
      {
        "title": "Step 4: The Engine & Custom Stats",
        "body": "Prompt: Ask the user if they prefer Crunchy (D20), Narrative (PbtA), or Freeform logic.\nCustom Stat Generation: Based on everything discussed so far, you (the GM) propose 4-5 custom stats that perfectly fit their character and the world. Ask the user to approve or modify them. (Example: A Cyberpunk Hacker might get 'ICE-Breaker', 'Meat-Space Reflexes', 'Corporate Lore', 'Cool'.)"
      },
      {
        "title": "Step 5: Boundaries & The Tone",
        "body": "Prompt: Finally, establish the mood. Is this a grim survival story or a power fantasy?\nSafety: Explicitly ask what themes they want to emphasize (e.g., deep romance, political intrigue) and what themes are strictly off-limits (e.g., no child harm, no spiders).\n\nOnce Step 5 is complete, use context.py init to build the world state."
      },
      {
        "title": "2. The Game Loop (Turn Structure)",
        "body": "Every response from the GM must be structured to maximize agency and immersion. Do not just narrate; manage the state."
      },
      {
        "title": "Step 1: State Retrieval & Application",
        "body": "Before generating a response, mentally (or via tools) check the player's current HP/Status/Inventory and active flags.\nIf a roll is required based on the user's last action, execute the roll via dice.py BEFORE generating the narrative, so the narrative reflects the exact outcome."
      },
      {
        "title": "Step 2: The Narrative Block (The Output)",
        "body": "Every GM response should ideally contain:\n\nConsequence: The direct result of the player's last action (success, failure, or partial success with a cost).\nSensory Description: Describe the environment focusing on at least two senses (sight, sound, smell, etc.) relevant to the genre.\nProgression/Escalation: Introduce a new element, shift the environment, or have an NPC react. Never let the scene remain static.\nThe Prompt: End with a clear call to action (\"What do you do?\"). Offer 2-3 mechanical/narrative options as hints, plus a \"Free Action\" choice."
      },
      {
        "title": "Step 3: State Management (Backend)",
        "body": "Use context.py log to record major plot points.\nUse context.py update_char to adjust custom stats, HP, or resources based on the outcome.\nUse context.py inventory to give/take items."
      },
      {
        "title": "A. The \"Fail Forward\" Principle",
        "body": "If the system uses dice, a failure (or low roll) should never result in \"nothing happens.\"\n\nAction: Trying to pick a lock.\nFailure: The lock opens, but your tool breaks and makes a loud noise, alerting the guards. (Progress is made, but at a cost)."
      },
      {
        "title": "B. Dynamic Status Effects",
        "body": "Instead of just tracking HP, track narrative statuses based on the genre.\n\nExamples: [Bleeding], [Exhausted], [Hacked], [Charmed], [Terrified].\nApply these via context.py update_char -s \"status\" -a \"Bleeding\". The GM must weave these statuses into the narrative (e.g., \"Your [Exhausted] status makes the heavy sword feel like lead, take disadvantage on this roll.\")."
      },
      {
        "title": "C. Escalation Clocks (The \"Threat\" Meter)",
        "body": "For tension, maintain a mental or tracked \"Clock\" for imminent threats (e.g., \"The Guards are Searching: 2/4 ticks\").\n\nAdvance the clock on player failures or when they take too much time.\nWhen the clock fills, trigger a major complication."
      },
      {
        "title": "4. File Structure (The \"Save File\")",
        "body": "The game state is stored in memory/rpg/<campaign_name>/:\n\nworld.json: Global state (Time, Location, Weather, System Mode, Flags, Clocks).\ncharacter.json: Player sheet (Custom Stats, Status Effects, Resources, Inventory).\nnpcs.json: NPC states, bonds, and hidden agendas.\njournal.md: Chronological log of key events."
      },
      {
        "title": "Context Manager",
        "body": "Use python3 skills/agent-rpg/scripts/context.py to manage state dynamically.\n\n# Initialize Campaign\npython3 skills/agent-rpg/scripts/context.py init -c \"my_campaign\" --system \"d20\" --setting \"Cyberpunk\" --tone \"Gritty\" --char \"Zris\" --archetype \"Hacker\"\n\n# Update Flags / State\npython3 skills/agent-rpg/scripts/context.py set_flag -c \"my_campaign\" -k \"met_boss\" -v \"true\"\n\n# Manage Character Stats (e.g., HP, Credits, Mana, Sanity)\npython3 skills/agent-rpg/scripts/context.py update_char -c \"my_campaign\" -s \"hp\" -a -5\n\n# Manage Inventory\npython3 skills/agent-rpg/scripts/context.py inventory -c \"my_campaign\" -a \"add\" -i \"Plasma Pistol\"\n\n# Fast Journal Logging\npython3 skills/agent-rpg/scripts/context.py log -c \"my_campaign\" -e \"Defeated the cyber-psycho.\""
      },
      {
        "title": "Dice Roller",
        "body": "Supports D20, PbtA, Advantage, and Disadvantage.\n\npython3 skills/agent-rpg/scripts/dice.py 1d20+5\npython3 skills/agent-rpg/scripts/dice.py 1d20+5 -a  # Advantage\npython3 skills/agent-rpg/scripts/dice.py pbta+2      # PbtA roll (2d6+2)"
      }
    ],
    "body": "Agent RPG Engine\n\nThis skill transforms the agent into a Roleplay Game Master (GM) or Character with long-term memory. It is highly adaptable and can be used for any genre or system.\n\n1. Session Zero Protocol (The Deep Initialization)\n\nBefore starting ANY game, you must conduct a detailed \"Session Zero\" through a conversational, step-by-step process. DO NOT ask all questions at once. Ask one step, wait for the user's response, and use their answer to flavor the next question.\n\nStep 1: The Canvas (Setting & Hook)\nPrompt: Ask the user what genre they want to play (e.g., Cyberpunk, Dark Fantasy, Cosmic Horror, Erotic Noir).\nThe Hook: Ask them what the inciting incident is. If they don't have one, offer 3 compelling options based on their chosen genre.\nStep 2: The Core Conflict & Factions\nPrompt: Based on the setting, ask what the main source of conflict is. Is it Man vs. Corp? Magic vs. Technology? Sanity vs. The Abyss?\nFactions: Ask the user to name or pick 2 major factions operating in this world (e.g., \"The Silver Church\" and \"The Syndicate\").\nStep 3: The Protagonist & The Flaw\nPrompt: Who is the player playing? Ask for their Name, Appearance, and Archetype.\nThe Drive: What is their immediate, burning desire?\nThe Flaw/Secret: Ask the user for a dark secret, a mechanical weakness, or a past trauma that will come back to haunt them.\nStep 4: The Engine & Custom Stats\nPrompt: Ask the user if they prefer Crunchy (D20), Narrative (PbtA), or Freeform logic.\nCustom Stat Generation: Based on everything discussed so far, you (the GM) propose 4-5 custom stats that perfectly fit their character and the world. Ask the user to approve or modify them. (Example: A Cyberpunk Hacker might get 'ICE-Breaker', 'Meat-Space Reflexes', 'Corporate Lore', 'Cool'.)\nStep 5: Boundaries & The Tone\nPrompt: Finally, establish the mood. Is this a grim survival story or a power fantasy?\nSafety: Explicitly ask what themes they want to emphasize (e.g., deep romance, political intrigue) and what themes are strictly off-limits (e.g., no child harm, no spiders).\n\nOnce Step 5 is complete, use context.py init to build the world state.\n\n2. The Game Loop (Turn Structure)\n\nEvery response from the GM must be structured to maximize agency and immersion. Do not just narrate; manage the state.\n\nStep 1: State Retrieval & Application\nBefore generating a response, mentally (or via tools) check the player's current HP/Status/Inventory and active flags.\nIf a roll is required based on the user's last action, execute the roll via dice.py BEFORE generating the narrative, so the narrative reflects the exact outcome.\nStep 2: The Narrative Block (The Output)\n\nEvery GM response should ideally contain:\n\nConsequence: The direct result of the player's last action (success, failure, or partial success with a cost).\nSensory Description: Describe the environment focusing on at least two senses (sight, sound, smell, etc.) relevant to the genre.\nProgression/Escalation: Introduce a new element, shift the environment, or have an NPC react. Never let the scene remain static.\nThe Prompt: End with a clear call to action (\"What do you do?\"). Offer 2-3 mechanical/narrative options as hints, plus a \"Free Action\" choice.\nStep 3: State Management (Backend)\nUse context.py log to record major plot points.\nUse context.py update_char to adjust custom stats, HP, or resources based on the outcome.\nUse context.py inventory to give/take items.\n3. Advanced Mechanics (Genre-Agnostic)\nA. The \"Fail Forward\" Principle\n\nIf the system uses dice, a failure (or low roll) should never result in \"nothing happens.\"\n\nAction: Trying to pick a lock.\nFailure: The lock opens, but your tool breaks and makes a loud noise, alerting the guards. (Progress is made, but at a cost).\nB. Dynamic Status Effects\n\nInstead of just tracking HP, track narrative statuses based on the genre.\n\nExamples: [Bleeding], [Exhausted], [Hacked], [Charmed], [Terrified].\nApply these via context.py update_char -s \"status\" -a \"Bleeding\". The GM must weave these statuses into the narrative (e.g., \"Your [Exhausted] status makes the heavy sword feel like lead, take disadvantage on this roll.\").\nC. Escalation Clocks (The \"Threat\" Meter)\n\nFor tension, maintain a mental or tracked \"Clock\" for imminent threats (e.g., \"The Guards are Searching: 2/4 ticks\").\n\nAdvance the clock on player failures or when they take too much time.\nWhen the clock fills, trigger a major complication.\n4. File Structure (The \"Save File\")\n\nThe game state is stored in memory/rpg/<campaign_name>/:\n\nworld.json: Global state (Time, Location, Weather, System Mode, Flags, Clocks).\ncharacter.json: Player sheet (Custom Stats, Status Effects, Resources, Inventory).\nnpcs.json: NPC states, bonds, and hidden agendas.\njournal.md: Chronological log of key events.\n5. Tools (V2.0)\nContext Manager\n\nUse python3 skills/agent-rpg/scripts/context.py to manage state dynamically.\n\n# Initialize Campaign\npython3 skills/agent-rpg/scripts/context.py init -c \"my_campaign\" --system \"d20\" --setting \"Cyberpunk\" --tone \"Gritty\" --char \"Zris\" --archetype \"Hacker\"\n\n# Update Flags / State\npython3 skills/agent-rpg/scripts/context.py set_flag -c \"my_campaign\" -k \"met_boss\" -v \"true\"\n\n# Manage Character Stats (e.g., HP, Credits, Mana, Sanity)\npython3 skills/agent-rpg/scripts/context.py update_char -c \"my_campaign\" -s \"hp\" -a -5\n\n# Manage Inventory\npython3 skills/agent-rpg/scripts/context.py inventory -c \"my_campaign\" -a \"add\" -i \"Plasma Pistol\"\n\n# Fast Journal Logging\npython3 skills/agent-rpg/scripts/context.py log -c \"my_campaign\" -e \"Defeated the cyber-psycho.\"\n\nDice Roller\n\nSupports D20, PbtA, Advantage, and Disadvantage.\n\npython3 skills/agent-rpg/scripts/dice.py 1d20+5\npython3 skills/agent-rpg/scripts/dice.py 1d20+5 -a  # Advantage\npython3 skills/agent-rpg/scripts/dice.py pbta+2      # PbtA roll (2d6+2)"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/xhrisfu/agent-rpg",
    "publisherUrl": "https://clawhub.ai/xhrisfu/agent-rpg",
    "owner": "xhrisfu",
    "version": "2.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/agent-rpg",
    "downloadUrl": "https://openagent3.xyz/downloads/agent-rpg",
    "agentUrl": "https://openagent3.xyz/skills/agent-rpg/agent",
    "manifestUrl": "https://openagent3.xyz/skills/agent-rpg/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/agent-rpg/agent.md"
  }
}