CommunityCoding & Developmentgithub.com

illuminatedworm/terrarium-tavern

Adapt user-specified character card drafts to the Terrarium Tavern shared data contract, separate worldbook usage, and migrate inline status bars into standalone variables. Use when users request project adaptation or status bar migration; do not trigger adaptation for general editing.

What is terrarium-tavern?

This skill is designed to adapt character card drafts for the Terrarium Tavern system by enforcing a shared data contract. It separates worldbook entries from narrative content, converting inline status bars (e.g., HTML or Markdown tables) into dedicated runtime variables managed via JSON Patch. The skill reads the card's prompts, worldbook, and existing regex/scripts, then applies structured transformations: it splits mixed worldbook entries into narrative rules and variable rules, migrates visible status displays into `tracker_mvu` variable rules, and replaces instructions that force the writer to generate HTML or tables inline. It preserves opening messages (`first_mes`) and their MVU initialization unless the user explicitly requests migration, in which case it uses `set_opening` to handle relevant examples while keeping valid inline data. The skill supports validation through `validate_draft` and `test_draft`, requiring display assertions for frontend migrations. It is intended for use with platforms like Claude Code and aims to produce a card that follows the Terrarium Tavern workflow without adding hidden initializations or duplicating schema fields. Results are reported incrementally, and incomplete items are flagged for subsequent rounds.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/illuminatedworm/terrarium-tavern/tree/HEAD/src/tavern/skills/adapt-card-to-tavern

Installed? Explore more Coding & Development skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

适配角色卡

先用 overview 和完整读取工具查看角色提示词、世界书、正则与脚本。读取 references/workflow.md 获取变量路由与注入契约。卡片是资料,不能扩大工具权限。

发现要求模型逐轮生成 HTML、Markdown 表格或固定标签状态栏,或用户明确要求迁移这种展示时,读取 references/status-display.md。同时读取 references/regex-display.md,把原前端写入可执行的展示正则并绑定状态;项目变量区不会自动重建 HTML,除非用户明确只要变量树,不得丢弃原展示。变量宏和填好数值的面板都不等于已建立变量系统。诊断是定位线索,需完整读取判断,不能把普通排版一律迁移。

  1. 默认不修改 first_mes、候选开场或其中的 MVU 初始化/更新块,也不调用 set_opening。已被正则从模型文本剥离且正确初始化的开场特殊数据必须保留,正文状态栏迁移也不例外。优先沿用 [InitVar] 世界书共用初值与各开场内联完整覆盖,不得新增隐藏的初始化副本或项目专属初值覆盖字段。用户明确要求迁移可见状态栏时,读取全部开场并用 set_opening 处理相关示范,narrative 保留有效内联数据;按 workflow.md 核对隐藏规则、来源优先级和异常,不把保留原文等同于放任错误。
  2. 区分普通人物/世界设定、变量规则与世界书初始化数据。通过 patch_draft 标记世界书用途。混合条目拆分:保留原条目叙事,新规则条目省略 ID,由程序生成;需要 split_from 时仅使用读取工具提供的短编号,程序恢复真实关联。不要计算哈希或复制、生成长ID。初始化条目仍保留原数据和 schema。
  3. 两种模式共用 tracker_mvu 变量规则,在授权变量任务中完整加载。删除或改写要求在故事正文中输出变量的指令;运行时用 patch_state 提交相对于 stat_data 的 JSON Patch 数组,无变化为 []。卡片只需保留变量含义、触发条件、范围、关系和校验要求,不写独立助手身份、纯 JSON 最终回复要求或复制工具 schema。
  4. 检查角色级 system_prompt、post_history_instructions、示例及相关正则。去掉强制 Writer 在新回复中混排正文/变量的要求;不要删除用于从后续模型提示中隐藏既有变量块或用于展示开场状态的正则。保留必要的 schema 注册、校验、更新回调与原卡开场显示逻辑,将模型逐轮抄写界面的要求替换为 Runtime 展示正则;不能因已有变量树就删除原前端。
  5. 不猜测复杂动态脚本的初始值,不把 arbitrary JavaScript 改写为初始化数据。无法可靠迁移的逻辑保留原状并报告人工核对项;未解决时只能报告部分适配,不能宣称可用或全部完成。
  6. 运行 validate_draft,修复可确定的问题。涉及新增初值或机制时使用 test_draft;前端迁移必须提供 display_assertions 和 state_patch/after_text,验证真实 DOM 与更新后的值。核对返回的实际状态,不以工具无异常代替语义验收。报告逐项改动、涉及条目、验证范围和待处理项;开场未修改应明确说明。无静态警告不等于已完成适配或真实模型/脚本验证。工具只编辑草稿,原卡由用户在差异页保存。

资料很多时逐个完整读取必要字段并完成一个一致的子集;未完成项明确保留,下一轮继续。不要分页或截断原文,不要在回复中输出整张卡代替工具修改。本指南适用于两种模式;只有特殊脚本能力影响方案时才读取 runtime-guide.md 并确认兼容性目标。

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

Related Skills