[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79Q22GDA75JHAV5396KTEMR":3,"skill-same:01M79Q22GDA75JHAV5396KTEMR":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M79Q22GDA75JHAV5396KTEMR","rpg",null,"Build an RPG: stats and leveling, inventory and equipment, quests, branching dialogue, save\u002Fload, and combat. Use for an RPG\u002FJRPG, or designing stat, inventory, quest, or combat systems.","JunMystery\u002FAgent-Guidance","JunMystery","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F161468934?v=4","01M79MTMV8F0BY8NK1A92RA8A0","Jun","01M79MTMWCFBKPHN5B25E6V20B",0,"MIT","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Frpg\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: rpg\ndescription: >\n  Build an RPG: stats and leveling, inventory and equipment, quests, branching dialogue, save\u002Fload,\n  and combat. Use for an RPG\u002FJRPG, or designing stat, inventory, quest, or combat systems.\n---\n\n# RPG\n\nA playbook for role-playing games — stats and progression, inventory\u002Fequipment, quests,\ndialogue, and combat. This is a **compositional** skill: it ties data-driven content,\ndialogue, and saving together. It does not re-teach those primitives; it defines the systems\nthat make growth and choice feel meaningful, and points to the skills that implement each.\n\nThese systems also apply to custom\u002Fproprietary engines. Keep the project's engine and bind\nthe concepts below to its documented data, events, UI, and save interfaces. Inspect local\nsource\u002FSDK examples before choosing APIs; the router's custom-engine fallback guides that\nmapping. Godot\u002FUnity bindings below are examples, not prerequisites.\n\n## When to use\n\n- Use when building an RPG\u002FJRPG\u002Faction-RPG: the player has **stats that grow**, an\n  **inventory**, **quests**, **dialogue**, and persistent progress.\n- Use when designing a leveling curve, a damage formula, an inventory\u002Fequipment model, or a\n  quest state machine.\n\n**When *not* to use:** permadeath dungeon runs with no persistent character → `roguelike`.\nPure conversation\u002Fbranching story → `visual-novel`. Open-world needs\u002Fcrafting\u002Fbase-building →\n`survival-crafting`. For the dialogue engine itself, use `dialogue-systems`.\n\n## Core loop\n\n**Explore → encounter (fight \u002F talk \u002F solve) → earn rewards (XP, loot, story) → grow\n(level up, gear up, unlock) → take on harder content.** The fantasy is *getting stronger and\nshaping who your character is*; every system should feed that growth-and-choice loop.\n\n## Must-have systems\n\n1. **Stats + leveling** — base attributes, derived combat stats, XP curve, level-up gains.\n2. **Inventory + equipment** — data-defined items, stacking, slots, stat modifiers.\n3. **Combat** — turn-based or action; damage formula, status effects, win\u002Floss.\n4. **Quests** — objectives, state machine (available→active→complete→turned-in), rewards.\n5. **Dialogue** — branching lines, conditions on game state, choices that matter.\n6. **Save\u002Fload** — persist character, inventory, quest progress, world flags, with versioning.\n7. **Economy + progression gating** — gold\u002Fshops; gate power behind level\u002Fquest\u002Fregion.\n8. **UI** — HUD, inventory, quest log, dialogue box, character sheet.\n\n## Design knobs\n\n| Knob | Effect | Notes |\n|------|--------|-------|\n| XP curve shape | pacing of power | Fast early, slow late (see refs). |\n| Stat→derived scaling | build diversity | One attribute shouldn't dominate. |\n| Damage formula | tactical feel | Subtractive vs. ratio mitigation (refs). |\n| Random variance \u002F crit | swinginess | ±10% and ~1.5× crit are safe defaults. |\n| Drop rates \u002F economy | reward cadence | Avoid trivializing shops with loot. |\n| Power gating | difficulty gating | Level\u002Fregion\u002Fquest locks. |\n| Reversible modifiers | buff\u002Fgear correctness | Layer mods; never edit base stats. |\n| Choice consequence | role-play weight | Quest\u002Fdialogue flags should branch outcomes. |\n\n## Patterns\n\n### 1. Derived stats from base attributes (recompute, never store as truth)\n\n```python\n# Pseudocode. Base attributes are the only \"truth\"; combat stats are derived each time.\ndef derive(base, mods):\n    s = apply_modifiers(base, mods)          # base + flat adds + percent, then clamp\n    return {\n        \"max_hp\":  20 + s[\"VIT\"] * 8,\n        \"attack\":  s[\"STR\"] * 2,\n        \"defense\": s[\"VIT\"] + s[\"AGI\"] * 0.5,\n    }\n# Equipping pushes a modifier; unequipping pops it. HP\u002Fattack recompute automatically.\n```\n\n### 2. XP curve + level-up\n\n```python\n# Pseudocode. Quadratic curve: fast early levels, long late ones.\ndef xp_to_next(level, base=100): return base * level * level\n\ndef gain_xp(actor, amount):\n    actor.xp += amount\n    while actor.xp >= xp_to_next(actor.level):\n        actor.xp -= xp_to_next(actor.level)\n        actor.level += 1\n        actor.base[\"STR\"] += 2; actor.base[\"VIT\"] += 2   # grant gains \u002F skill points\n        on_level_up(actor)                                # heal, unlock, notify\n```\n\n### 3. Quest objective update driven by game events\n\n```python\n# Pseudocode. Game events advance matching objectives; completion grants rewards.\ndef on_event(kind, data):\n    for q in active_quests:\n        if q.state != \"active\": continue\n        for obj in q.objectives:\n            if obj.event == kind and matches(obj, data) and not obj.done:\n                obj.count = min(obj.count + 1, obj.needed)\n                if obj.count >= obj.needed: obj.done = True\n        if all(o.done for o in q.objectives):\n            q.state = \"complete\"                # turn-in grants xp\u002Fgold\u002Fitems once\n```\n\n## Pitfalls \u002F failure modes\n\n- **Editing base stats for buffs\u002Fgear** → values drift and corrupt on save\u002Freload. Keep a\n  modifier layer; push\u002Fpop it (Pattern 1).\n- **Storing derived stats as truth** → desync after a stat change. Recompute from base.\n- **Runaway XP\u002Fdamage numbers** → either an exponential curve with no cap or a subtractive\n  formula at huge values. Pick a curve and a formula family deliberately (refs).\n- **Stacked buffs explode** → percent modifiers multiplied together. Sum percents within a layer\n  unless a rule says otherwise (refs §1).\n- **Content as code** → every item\u002Fquest hardcoded. Define items, enemies, and quests as\n  **data** using the project's content schema\u002Floader (`godot-resources` \u002F\n  `unity-scriptableobjects` are catalog examples).\n- **Save format with no version field** → old saves break on update. Add a `version` and a\n  migration path from day one (see `save-systems`).\n- **Choices without consequences** → dialogue branches that reconverge immediately feel hollow.\n  Set flags that actually change later quests\u002Fworld state.\n- **Quest progress not persisted** → reloading loses mid-quest state. Save quest state, not\n  just completion.\n\n## Composition (build it from these skills)\n\n- **Dialogue:** `dialogue-systems` (Yarn Spinner \u002F Ink) — branching lines, conditions, variables.\n- **Persistence:** `save-systems` — character, inventory, quest flags, world state, versioning.\n- **Content data:** the engine's content schema\u002Floader — items, enemies, quests, skills as assets;\n  `godot-resources` \u002F `unity-scriptableobjects` when using those engines.\n- **Combat AI:** `game-ai` for enemy behavior; for turn order reuse the scheduler idea in `roguelike`.\n- **UI:** `game-ui-ux` for HUD\u002Fmenu layout, resolution scaling, and controller\u002Fkeyboard nav;\n  the project's UI API for inventory, quest log, character sheet, and dialogue box\n  (`godot-ui-control` when using Godot).\n- **World:** `level-design` plus your engine's tilemap\u002F3D skill (`godot-tilemap`, `godot-3d-essentials`).\n\n## References\n\n- For stat\u002Fdamage formulas, leveling curves, turn-vs-action combat timelines, inventory\u002Fequipment\n  data shapes, and the quest state model, read `references\u002Fstats-combat-quests.md`.\n","# RPG\n\nA playbook for role-playing games — stats and progression, inventory\u002Fequipment, quests,\ndialogue, and combat. This is a **compositional** skill: it ties data-driven content,\ndialogue, and saving together. It does not re-teach those primitives; it defines the systems\nthat make growth and choice feel meaningful, and points to the skills that implement each.\n\nThese systems also apply to custom\u002Fproprietary engines. Keep the project's engine and bind\nthe concepts below to its documented data, events, UI, and save interfaces. Inspect local\nsource\u002FSDK examples before choosing APIs; the router's custom-engine fallback guides that\nmapping. Godot\u002FUnity bindings below are examples, not prerequisites.\n\n## When to use\n\n- Use when building an RPG\u002FJRPG\u002Faction-RPG: the player has **stats that grow**, an\n  **inventory**, **quests**, **dialogue**, and persistent progress.\n- Use when designing a leveling curve, a damage formula, an inventory\u002Fequipment model, or a\n  quest state machine.\n\n**When *not* to use:** permadeath dungeon runs with no persistent character → `roguelike`.\nPure conversation\u002Fbranching story → `visual-novel`. Open-world needs\u002Fcrafting\u002Fbase-building →\n`survival-crafting`. For the dialogue engine itself, use `dialogue-systems`.\n\n## Core loop\n\n**Explore → encounter (fight \u002F talk \u002F solve) → earn rewards (XP, loot, story) → grow\n(level up, gear up, unlock) → take on harder content.** The fantasy is *getting stronger and\nshaping who your character is*; every system should feed that growth-and-choice loop.\n\n## Must-have systems\n\n1. **Stats + leveling** — base attributes, derived combat stats, XP curve, level-up gains.\n2. **Inventory + equipment** — data-defined items, stacking, slots, stat modifiers.\n3. **Combat** — turn-based or action; damage formula, status effects, win\u002Floss.\n4. **Quests** — objectives, state machine (available→active→complete→turned-in), rewards.\n5. **Dialogue** — branching lines, conditions on game state, choices that matter.\n6. **Save\u002Fload** — persist character, inventory, quest progress, world flags, with versioning.\n7. **Economy + progression gating** — gold\u002Fshops; gate power behind level\u002Fquest\u002Fregion.\n8. **UI** — HUD, inventory, quest log, dialogue box, character sheet.\n\n## Design knobs\n\n| Knob | Effect | Notes |\n|------|--------|-------|\n| XP curve shape | pacing of power | Fast early, slow late (see refs). |\n| Stat→derived scaling | build diversity | One attribute shouldn't dominate. |\n| Damage formula | tactical feel | Subtractive vs. ratio mitigation (refs). |\n| Random variance \u002F crit | swinginess | ±10% and ~1.5× crit are safe defaults. |\n| Drop rates \u002F economy | reward cadence | Avoid trivializing shops with loot. |\n| Power gating | difficulty gating | Level\u002Fregion\u002Fquest locks. |\n| Reversible modifiers | buff\u002Fgear correctness | Layer mods; never edit base stats. |\n| Choice consequence | role-play weight | Quest\u002Fdialogue flags should branch outcomes. |\n\n## Patterns\n\n### 1. Derived stats from base attributes (recompute, never store as truth)\n\n```python\n# Pseudocode. Base attributes are the only \"truth\"; combat stats are derived each time.\ndef derive(base, mods):\n    s = apply_modifiers(base, mods)          # base + flat adds + percent, then clamp\n    return {\n        \"max_hp\":  20 + s[\"VIT\"] * 8,\n        \"attack\":  s[\"STR\"] * 2,\n        \"defense\": s[\"VIT\"] + s[\"AGI\"] * 0.5,\n    }\n# Equipping pushes a modifier; unequipping pops it. HP\u002Fattack recompute automatically.\n```\n\n### 2. XP curve + level-up\n\n```python\n# Pseudocode. Quadratic curve: fast early levels, long late ones.\ndef xp_to_next(level, base=100): return base * level * level\n\ndef gain_xp(actor, amount):\n    actor.xp += amount\n    while actor.xp >= xp_to_next(actor.level):\n        actor.xp -= xp_to_next(actor.level)\n        actor.level += 1\n        actor.base[\"STR\"] += 2; actor.base[\"VIT\"] += 2   # grant gains \u002F skill points\n        on_level_up(actor)                                # heal, unlock, notify\n```\n\n### 3. Quest objective update driven by game events\n\n```python\n# Pseudocode. Game events advance matching objectives; completion grants rewards.\ndef on_event(kind, data):\n    for q in active_quests:\n        if q.state != \"active\": continue\n        for obj in q.objectives:\n            if obj.event == kind and matches(obj, data) and not obj.done:\n                obj.count = min(obj.count + 1, obj.needed)\n                if obj.count >= obj.needed: obj.done = True\n        if all(o.done for o in q.objectives):\n            q.state = \"complete\"                # turn-in grants xp\u002Fgold\u002Fitems once\n```\n\n## Pitfalls \u002F failure modes\n\n- **Editing base stats for buffs\u002Fgear** → values drift and corrupt on save\u002Freload. Keep a\n  modifier layer; push\u002Fpop it (Pattern 1).\n- **Storing derived stats as truth** → desync after a stat change. Recompute from base.\n- **Runaway XP\u002Fdamage numbers** → either an exponential curve with no cap or a subtractive\n  formula at huge values. Pick a curve and a formula family deliberately (refs).\n- **Stacked buffs explode** → percent modifiers multiplied together. Sum percents within a layer\n  unless a rule says otherwise (refs §1).\n- **Content as code** → every item\u002Fquest hardcoded. Define items, enemies, and quests as\n  **data** using the project's content schema\u002Floader (`godot-resources` \u002F\n  `unity-scriptableobjects` are catalog examples).\n- **Save format with no version field** → old saves break on update. Add a `version` and a\n  migration path from day one (see `save-systems`).\n- **Choices without consequences** → dialogue branches that reconverge immediately feel hollow.\n  Set flags that actually change later quests\u002Fworld state.\n- **Quest progress not persisted** → reloading loses mid-quest state. Save quest state, not\n  just completion.\n\n## Composition (build it from these skills)\n\n- **Dialogue:** `dialogue-systems` (Yarn Spinner \u002F Ink) — branching lines, conditions, variables.\n- **Persistence:** `save-systems` — character, inventory, quest flags, world state, versioning.\n- **Content data:** the engine's content schema\u002Floader — items, enemies, quests, skills as assets;\n  `godot-resources` \u002F `unity-scriptableobjects` when using those engines.\n- **Combat AI:** `game-ai` for enemy behavior; for turn order reuse the scheduler idea in `roguelike`.\n- **UI:** `game-ui-ux` for HUD\u002Fmenu layout, resolution scaling, and controller\u002Fkeyboard nav;\n  the project's UI API for inventory, quest log, character sheet, and dialogue box\n  (`godot-ui-control` when using Godot).\n- **World:** `level-design` plus your engine's tilemap\u002F3D skill (`godot-tilemap`, `godot-3d-essentials`).\n\n## References\n\n- For stat\u002Fdamage formulas, leveling curves, turn-vs-action combat timelines, inventory\u002Fequipment\n  data shapes, and the quest state model, read `references\u002Fstats-combat-quests.md`.\n",{"name":5,"description":7},"main","5d0a87185c0e172c3901e2a6e5916b6d544b8b94","skills\u002Frpg","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance","https:\u002F\u002Fgithub.com\u002FJunMystery","AI is the typist, I am the architect. Building efficient, secure, and user-centric products through disciplined AI prompt engineering.","2026-11-13 17:41:25",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add JunMystery\u002FAgent-Guidance --skill rpg",{"tool":37,"command":38},"bunx","bunx skills add JunMystery\u002FAgent-Guidance --skill rpg",{"tool":40,"command":41},"pnpm","pnpm dlx skills add JunMystery\u002FAgent-Guidance --skill rpg","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Frpg\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fstats-combat-quests.md","REFERENCE","参考文档",5181,"https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Frpg\u002Freferences\u002Fstats-combat-quests.md",[52,58,64,70,76,82],{"skillNo":53,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M79QR1E309VJ6CTQKB32AWWA","zero-trust-architecture-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-architecture-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79QQV7GHYR02DYGN41S23WN","xss-filter-evasion-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxss-filter-evasion-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79QQNSN7YB8XB61FFSCS3WH","xs-leaks-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxs-leaks-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79QQHZZJKFDY9132G5A65C2","xpath-injection-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxpath-injection-prevention-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M79QQB9ZSD3DJG8658EHQXR1","xml-security-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-security-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M79QQ60WKV7PFMXWT9CW8PM6","xml-external-entity-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-external-entity-prevention-cheat-sheet\u002FSKILL.md",[],[]]