interactive-fiction

interactive-fiction is a skill for Claude Code, Codex from pajama-studio/thriller. It costs 0 tokens per session (5,462 once invoked), scanned A, original, MIT.

A skill for turning a linear mystery story into an interactive fiction experience, where readers make choices that affect investigations, character outcomes, and endings.

In plain words
What is it for?
Use it to plan choices, clues, investigation paths, character viewpoints, multiple endings, and formats for platforms such as Twine, ink, or ChoiceScript.
Why use it?
It helps design meaningful story branches without losing logical consistency or creating more complexity than the project can manage.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it to plan choices, clues, investigation paths, character viewpoints, multiple endings, and formats for platforms such as Twine, ink, or ChoiceScript.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pajama-studio/thriller/interactive-fiction
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.

Any agent
npx skills add pajama-studio/thriller --skill interactive-fiction
Clone the repo
git clone --depth 1 https://github.com/pajama-studio/thriller

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for interactive-fiction

README.md
[![agentmods](https://agentmods.dev/badge/skills/pajama-studio/thriller/interactive-fiction/github.svg)](https://agentmods.dev/skills/pajama-studio/thriller/interactive-fiction)
Your own site
<a href="https://agentmods.dev/skills/pajama-studio/thriller/interactive-fiction"><img src="https://agentmods.dev/badge/skills/pajama-studio/thriller/interactive-fiction/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for interactive-fiction

Your own site · 80×15
<a href="https://agentmods.dev/skills/pajama-studio/thriller/interactive-fiction"><img src="https://agentmods.dev/badge/skills/pajama-studio/thriller/interactive-fiction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,462 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.05462
Opus 5 $0.00000 $0.02731
Sonnet 5 $0.00000 $0.01092
Haiku 4.5 $0.00000 $0.00546

Measured 9d ago against content hash 370609c7dcee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

interactive-fiction scanned grade A with 0 findings 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 9d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

interactive-fiction/SKILL.md · 522 lines

How it starts

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

互动悬疑小说创作系统 — Interactive Thriller Fiction

将悬疑小说转化为带分支选择的互动叙事体验 融合 Choice Architecture(选择架构)、Narrative Design(叙事设计)、Game Writing(游戏写作)方法论


系统定位

本技能将线性悬疑小说转化为多分支互动小说,读者在关键时刻做出选择,影响调查方向、角色命运和最终结局。适用于:

  • 互动小说平台(Twine / ink / ChoiceScript / 橙光 / 快点阅读)
  • 互动影视脚本(Netflix 交互式 / 短剧互动版)
  • 文字冒险游戏
  • EPUB 互动增强版

核心理念

三大设计支柱

  1. 有意义的选择:每个分支选择必须让读者感受到"我的决定改变了什么"
  2. 叙事完整性:无论走哪条路线,故事都必须在逻辑和情感上完整
  3. 可控复杂度:分支数量在创作可行性范围内,避免指数爆炸

悬疑类型的特殊优势

悬疑是最适合互动化的文学类型:

  • 调查天然是选择:先查哪条线索?先审谁?
  • 信息即权力:不同路线获取不同信息,影响推理
  • 多结局有天然锚点:真凶已定,但读者能否找到 ta?
  • 失败有叙事价值:推理错误不是"game over"而是"另一个故事"

命令体系

/init — 项目设置

输入要求

参数 说明 选项
来源 素材来源 已有小说(提供文本)/ 从零创作 / 基于大纲
分支深度 复杂度级别 轻量(3-5个决策点) / 中等(8-12个) / 深度(15+个)
结局数量 目标结局数 2-3个 / 4-6个 / 7+个
平台 目标发布平台 Twine / ink / ChoiceScript / 橙光 / 纯文本 / 通用
互动模式 读者角色定位 侦探视角 / 上帝视角 / 旁观者(详见下方)

三种互动模式详解

模式 读者身份 选择类型 信息获取 适合
侦探视角 读者=主角 调查方向、审讯策略、推理指控 只看到主角看到的 本格、犯罪程序、密室
上帝视角 读者=导演 控制多个角色的行动 看到所有角色的视角 社会派、多视角叙事
旁观者 读者=摄影机 选择跟随谁、关注什么 每次只看一个视角但可切换 心理悬疑、信任网络

上帝视角设计要点:

  • 每个决策点标注"你在控制谁的行动"
  • 信息在角色之间不自动共享(角色 A 发现的线索,角色 B 不知道)
  • 选择的张力来自"知道全局但每个角色不知道"的戏剧反讽

旁观者设计要点:

  • 选择="跟谁走"——每次跟随一个角色经历一段故事
  • 不同角色视角揭示不同信息碎片
  • 最终需要综合多个视角才能推理出真相(垂直钻探式体验)

输出.interactive-state.json + 项目概要 + 项目目录结构初始化

大规模项目初始化(15+ 决策点 / 50+ 节点): 自动生成工程化目录结构(参照 references/scale-engineering.md):

  • story-bible.md — 全局设定(始终加载的固定上下文)
  • manifest.yaml — 节点索引 + 依赖图
  • variables.yaml — 状态变量注册表(含 written_by / read_by 追踪)
  • codex/ — 知识条目目录(角色/地点/线索,按需加载)
  • nodes/ — 节点文件目录(一节点一文件,YAML frontmatter)
  • summaries/ — 滚动摘要目录
  • validation/ — 验证报告

/branches — 叙事拓扑与选择架构

/branches/choices 合并为一个命令。拓扑和选择是同一个设计问题的两个维度—— 决策点的类型决定拓扑形状,拓扑形状约束决策点的设计空间。分开做会导致回溯返工。

加载参考references/branch-architecture.md, references/choice-design.md, references/advanced-if.md, references/scale-engineering.md

Read the full file on GitHub · 522 lines

Files

What ships with it

60 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. 9d ago First seen · 522 lines · 0 tokens per session scan A 370609c7dcee

Subscribe to this mod's changes

interactive-fiction is a skill published in the GitHub repository pajama-studio/thriller (24 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 5,462 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

diagnostic-stem-delivery

Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow.

HKUDS/OpenSpace · 23 tokens

chengfeng-check-updates

An environment manager for a video-editing system. It checks whether its skills and runtime—the software needed to run them—are installed and compatible.

Agentchengfeng/chengfeng-videocut-skills · 120 tokens