talespindle-author

A writing tool for building interactive story games, such as text adventures, branching fiction, mystery investigations, and light puzzles. It exports the result as a single HTML file that can be opened directly in a browser.

In plain words
What is it for?
Use it to design branching plots, evidence-based mysteries, and text-driven adventures, then export them as standalone HTML games.
Why use it?
It removes the need to manually code the story structure or package the game for sharing. The story is kept as data and turned into a playable file.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/flamesnake/talespindle/skill
Any agent
npx skills add Flamesnake/talespindle --skill skill
Clone the repo
git clone --depth 1 https://github.com/Flamesnake/talespindle

Made for: Claude Code, Codex.

Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,044 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00082 $0.06044
Opus 5 $0.00041 $0.03022
Sonnet 5 $0.00016 $0.01209
Haiku 4.5 $0.00008 $0.00604

Measured yesterday against content hash e9c8d86627cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

talespindle-author scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

3. 检查客户端 MCP 配置是否注册 `talespindle`,命令指向该工作区的绝对路径 `dist/cli.js mcp`。仓库根目录 `.mcp.json` 不是通用标准,也不能证明 Codex 已注册服务器。Codex 默认读取 `~/.codex/config.toml`,可信项目可读取 `.codex/config.toml`;可用 `codex mcp add talespindle -- node <绝对路径>/di
skill/SKILL.md · 195 lines

How it starts

The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TaleSpindle · Agent 互动叙事创作指南

通过 MCP 服务器 talespindle 用工具构建文字冒险游戏,最终交付一个自包含单文件 HTML(双击即玩、可发任何人、零依赖)。剧情是纯 JSON 数据,无需写代码。

前置条件:AI 客户端已连接 talespindle MCP 服务器(工具名以 story_ 开头)。旧配置中的服务器键名 ai-text-engine 仍可继续使用。

开工前检查与 MCP 故障处理

先确认当前能力列表中确实存在 story_newstory_validatestory_exportstory_ 工具。Skill 可见不代表 MCP 已连接;不要尝试调用名称相近的其他服务器。

如果工具不可用,并且当前工作区是 TaleSpindle 源码仓库:

  1. 运行 npm install(仅在依赖缺失时)与 npm run build,再运行 node dist/cli.js doctor,确认 MCP、预构建运行时、Skill 和作品目录均为 OK。
  2. 运行 node scripts/verify-mcp.mjs;只有输出 VERIFY OK 才说明服务器本身可启动。
  3. 检查客户端 MCP 配置是否注册 talespindle,命令指向该工作区的绝对路径 dist/cli.js mcp。仓库根目录 .mcp.json 不是通用标准,也不能证明 Codex 已注册服务器。Codex 默认读取 ~/.codex/config.toml,可信项目可读取 .codex/config.toml;可用 codex mcp add talespindle -- node <绝对路径>/dist/cli.js mcp 注册,或在设置的 MCP servers 中添加 STDIO 服务器。
  4. 新增或修改配置后重启/刷新 AI 客户端会话,再检查 story_ 工具。

仍不可用时,向用户说明阻塞并停止创作。不要直接导入 dist/mcp/handlers.js 代替 MCP 创作:这会绕过 transport 的输入边界,也无法证明用户实际配置可用。

作品目录由 TALESPINDLE_HOME 控制并位于其 projects/ 子目录;旧变量 AI_TEXT_ENGINE_HOME 仍兼容。源码仓库默认使用仓库内 projects/。不要把作品写入 Skill 目录、node_modules 或临时脚本。正式 npm 包名为 @marianaj/talespindle

工具速览

工具 用途
story_new 创建项目(自动生成 start + 示例结局骨架)
story_get 读取完整剧情 JSON
story_get_node 读取单个节点及其入边,局部修稿优先使用
story_review_transitions 分页审查“末段 → 选项 → response → 首段”
story_patch_choice 只修改一个选项,并用旧值断言防止误改
story_upsert_node 创建/覆盖节点(结局自动登记到结局表)
story_delete_node 删除节点(被引用时需 force: true
story_delete_ending 删除结局定义
story_upsert_achievement / story_delete_achievement 管理成就
story_upsert_document / story_delete_document 管理线索/文档(规则守则/便条/信件)
story_upsert_evidence / story_delete_evidence 管理可用于推理的证据
story_upsert_deduction / story_delete_deduction 管理证据组合推论
story_upsert_character / story_delete_character 管理人物、关系维度与秘密
story_upsert_puzzle / story_delete_puzzle 管理密码谜题、渐进提示和成功效果
story_set_meta 主题 / HUD / 副标题 / 作者 / 初始声景 / 拟态网站身份
story_set_presentation 用一组短枚举设置界面外壳、字体、密度、形状与选项风格
story_validate 校验 + 路径探索模拟;修订时用 compact:true 省略长见证动作
story_evaluate 作品体验评估;支持紧凑输出,不打总分
story_walk 结局见证与覆盖诊断;最终重放前再请求完整动作
story_graph mermaid 分支图
story_export 导出单文件 HTML(校验不过会拒绝)
story_list / story_delete_project 项目管理
story_observability / story_observability_reset 查看 / 清零本地工具成本摘要

Read the full file on GitHub · 195 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 195 lines · 82 tokens per session scan B e9c8d86627cc

Subscribe to this mod's changes

talespindle-author is a skill published in the GitHub repository Flamesnake/talespindle (0 stars, last pushed 17d ago), licensed MIT. It adds 82 tokens to every session and 6,044 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories