interactive-fiction

interactive-fiction is a skill for Claude Code from danjdewhurst/story-skills. It costs 126 tokens per session (3,207 once invoked), scanned A, original, MIT.

A writing skill for planning and revising branching stories, where chapters connect through reader choices. It can also build the story into formats used by interactive-fiction players, such as Twine or ink.

In plain words
What is it for?
Use it to design choice graphs, write or change choices, draft branch chapters, and check paths in an interactive story project.
Why use it?
It helps keep branches, reunions, endings, and continuity consistent instead of treating each passage as an isolated piece of writing.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the story-skills plugin — 24 skills shipped together

Good fit Use it to design choice graphs, write or change choices, draft branch chapters, and check paths in an interactive story project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/danjdewhurst/story-skills/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 danjdewhurst/story-skills --skill interactive-fiction
Clone the repo
git clone --depth 1 https://github.com/danjdewhurst/story-skills

Made for: Claude Code.

Or install story-skills, the plugin that ships this one along with the rest of its 24 skills.

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/danjdewhurst/story-skills/interactive-fiction/github.svg)](https://agentmods.dev/skills/danjdewhurst/story-skills/interactive-fiction)
Your own site
<a href="https://agentmods.dev/skills/danjdewhurst/story-skills/interactive-fiction"><img src="https://agentmods.dev/badge/skills/danjdewhurst/story-skills/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/danjdewhurst/story-skills/interactive-fiction"><img src="https://agentmods.dev/badge/skills/danjdewhurst/story-skills/interactive-fiction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,207 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.00126 $0.03207
Opus 5.5 $0.00050 $0.01283
Sonnet 5.5 $0.00025 $0.00641
Haiku 4.5 $0.00013 $0.00321

Measured 1mo ago against content hash 0b9d62495c05, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

skills/interactive-fiction/SKILL.md · 250 lines

How it starts

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

Interactive Fiction

Overview

Plan, draft, and revise a branching book: a story project whose chapters are passages joined by choices in their frontmatter. The chapters and their choices are the source of truth. story continuity follows the paths of choices, and story build --format twee or --format ink turns the project into a playable Twine or ink story.

This skill owns books written to branch from the start. Turning an existing linear book into an interactive edition (a branch map drawn from its scenes, then a copied project) belongs to the adaptation skill; once that edition project exists, draft and revise its chapters here.

Prerequisites

A story project with story.md in the root. For a new book, start it with the story-init skill first. Read story.md (language, pov, tense, form, status, ifid) and chapters/_index.md, then the choices of every chapter: together they are the graph. A small example is examples/the-gull-rock-light, a branch-and-bottleneck story with two endings.

When to Use

  • Planning a choice graph: structure, branch points, rejoins, endings
  • Writing or changing choices entries
  • Drafting a chapter on a branch, at a rejoin, or at an ending
  • Revising a branching book, and reading state-differs-by-path, unreachable-chapter, and the other branching findings
  • Building the book as Twine or ink
  • NOT for converting a linear book (use adaptation), drafting a linear chapter (use chapter-writing), or a linear continuity audit (use revision-continuity). Prose craft inside a passage still comes from scene-craft and line-editing

How The Graph Works

  • Each chapter is one passage. Its choices are where the reader can go:

    choices:
      - text: Search the rocks for Tobias
        to: chapter-02
      - text: Climb the tower to the lamp
        to: chapter-03
    
  • The lowest-numbered chapter is the start.

  • Once any chapter has choices, the links are exactly the choices: a chapter with none is an ending, and a chapter that leads on to one place needs a single choice (text: Continue). With no choices anywhere the book is linear again.

  • text becomes the link text: no [, ], |, ->, <-, or line break, and no final <. Quote it if it looks like a number.

  • to is a chapter id. It may be the chapter itself (a loop) or, while planning, a chapter-NN with no file yet; the builds need every target written.

Read the full file on GitHub · 250 lines

Files

What ships with it

2 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. 1mo ago Changed 0b9d62495c05
  2. 1mo ago Changed · +9 lines · +21 tokens per session 95e92f6d5fcc
  3. 1mo ago First seen · 241 lines · 105 tokens per session scan A 6974e17d9aa0

Subscribe to this mod's changes

interactive-fiction is a skill published in the GitHub repository danjdewhurst/story-skills (471 stars, last pushed 6d ago), licensed MIT. It adds 126 tokens to every session and 3,207 once invoked, about $0.0005 per session on Opus 5.5. 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-10-07.

Related

interactive-fiction compared with skills from other repositories

interactive-fiction next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
interactive-fictiondanjdewhurst/story-skillsSkill4716d agoMITA126Claude Code
demoalivecontext/aliveSkill13213d agoMITA50Claude Code
savealivecontext/aliveSkill13213d agoMITA76Claude Code
system-cleanupalivecontext/aliveSkill13213d agoMITA50Claude Code
system-upgradealivecontext/aliveSkill13213d agoMITA55Claude Code
create-walnutalivecontext/aliveSkill13213d agoMITA62Claude Code
session-historyalivecontext/aliveSkill13213d agoMITA74Claude Code