
interactive-fiction
Diagnose branching narrative problems. Use when choices feel meaningless, when branching is unmanageable, when player agency conflicts with authored story, or when interactive elements break narrative flow.
- Installs
- 560
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/jwynia/agent-skills --skill interactive-fiction- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads interactive-fiction automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Interactive Fiction: Diagnostic Skill
You diagnose problems in branching narratives and player-driven stories. Your role is to help writers balance meaningful player agency with coherent narrative.
Core Principle
Agency and authorship coexist.
The tension between player freedom and narrative coherence is a false dilemma. The best interactive fiction provides meaningful choices, authored emotional payoff, and constrained agency within a designed possibility space.
Interactive Fiction Types
| Type | Interaction | Strengths | Weaknesses |
|---|---|---|---|
| Parser-based | Natural language commands | High freedom, puzzle-oriented | "Guess the verb" friction |
| Choice-based | Select from options | Constrained, easier to author | Risk of false choices |
| Hybrid (VN, RPG) | Multiple modes | Rich, persistent state | High authoring burden |
| Tabletop scenario | GM interprets | Dynamic, improvisational | Requires facilitator |
The Interactive Fiction States
State IF1: Meaningless Choices
Symptoms: Choices don't matter. All paths converge immediately. Players stop caring about decisions. "It doesn't matter what I pick" feeling.
The Meaningful Choice Test:
- Distinct options — Each choice represents different approach/value
- Perceivable consequences — Player sees results (even if delayed)
- Irreversibility — Can't immediately undo and try another
- Character expression — Choice reveals something about protagonist
Key Questions:
- Does each choice lead to different content?
- Can players perceive consequences within this session?
- Are choices about values/approaches or just navigation?
- Do choices express character or just optimize outcomes?
Interventions:
- Add delayed consequences (choice sets flag, affects later scene)
- Make choices about values, not right/wrong
- Show consequences visibly (even small ones)
- Use foldback structure that varies texture, not just destination
State IF2: Unmanageable Branching
Symptoms: Exponential content requirements. Too many paths to write. Can't maintain quality across branches. Story structure collapsing under branch weight.
The Math Problem:
- 3 binary choices = 8 paths
- 5 binary choices = 32 paths
- 10 binary choices = 1,024 paths
Key Questions:
- How many true branches currently exist?
- Which branches could reconverge without feeling cheap?
- Are you tracking state or writing parallel universes?
- What's essential variation vs. nice-to-have?
Branching Solutions:
| Technique | Description | Trade-off |
|---|---|---|
| Foldback | Branches reconverge at key beats | May feel railroaded if obvious |
| Delayed consequences | Flags alter later content, not path | Same structure, different texture |
| Quality-based | Storylets unlock by accumulated state | Harder to ensure dramatic arc |
| Bottleneck | Multiple paths through fixed story beats | Preserves authored climaxes |
Interventions:
- Identify natural reconvergence points
- Replace true branches with state flags
- Design possibility space, not decision tree
- Accept that not everything can vary
State IF3: False Choice Discovered
Symptoms: Players realize choices don't matter. Trust is broken. Marketed agency wasn't delivered. "I tried both options and got the same thing."
Key Questions:
- How often do choices actually diverge?
- Can players tell when they're being railroaded?
- Was agency promised but not delivered?
- Is the illusion working or broken?
When False Choices Are Acceptable:
- Player doesn't realize it's false
- Choice expressed character even if outcome unchanged
- Resource constraints required it (be intentional)
When False Choices Are Problematic:
- Player notices and feels cheated
- Repeated pattern destroys trust
- Marketed features don't exist
Interventions:
- If choices can't matter, don't offer them
- Use expression choices (same outcome, different character moment)
- Be honest about agency scope
- Fewer real choices beats many false ones
State IF4: Agency vs. Authored Meaning
Symptoms: Full player freedom creates incoherent stories. Or: fixed story makes "interactive" feel pointless. Writer can't reconcile openness with craft.
The Tension:
- Full agency: Player controls everything → story may be incoherent
- Full authorship: Story is fixed → why is it interactive?
Key Questions:
- What is the possibility space? (Not infinite—designed)
- Is the protagonist defined or a blank slate?
- What constraints exist naturally in the fiction?
- What must the author control to deliver the experience?
Resolution: Constrained Agency The author designs the possibility space. The player navigates within it.
Constraint Techniques:
- Fixed protagonist personality (choices within character)
- Environmental constraints (can't leave the island)
- Time pressure (must decide, can't optimize)
- Incomplete information (can't calculate best path)
Interventions:
- Define the possibility space explicitly
- Constrain via fiction, not arbitrary limits
- Let player be author of "how," you be author of "what matters"
- Multiple valid endings, not one "true" ending
State IF5: Story Feels Like Flowchart
Symptoms: Reading experience is mechanical. Choices interrupt rather than emerge from story. Pacing destroyed by decision points. More menu than narrative.
Key Questions:
- Is there continuous narrative between choices?
- Do choices emerge from story or interrupt it?
- Is pacing serving story or choice frequency?
- Are scenes breathing or just decision points?
Diagnostic Checklist:
- Narrative flows between choice points
- Choices emerge from dramatic moments
- Scenes have goal-conflict-disaster even with branches
- Pacing varies (not constant decision frequency)
Interventions:
- Let story breathe between decisions
- Integrate choices into scenes, not between them
- Quality over quantity of choices
- Some paths can be choice-light; others choice-heavy
State IF6: Multiple Endings, No Satisfaction
Symptoms: Each ending feels hollow. "Bad endings" punish rather than satisfy. One "true ending" invalidates others. Endings don't feel earned.
Key Questions:
- Does each ending provide closure for its path?
- Are endings ranked (true vs. bad) or parallel (different values)?
- Does player's path lead logically to their ending?
- Are endings worth experiencing, or just failure states?
Ending Types:
| Type | Description | Risk |
|---|---|---|
| Branch endings | Different conclusions by path | Unequal effort to achieve |
| Quality endings | Same ending, quality varies | Can feel like high score |
| Hidden endings | Secret conclusions | Completionist frustration |
The "True Ending" Problem: If one ending is canonical, others feel invalidated. Player optimizes rather than roleplays.
Interventions:
- All endings should be valid outcomes of different values
- Each ending earns the path that led to it
- Don't punish with "bad" endings—make all endings interesting
- Endings can be different without being ranked
State IF7: State Management Chaos
Symptoms: Can't track what player has done. Contradictions appear. Variables proliferate. Scene logic becomes unmaintainable.
Key Questions:
- What state actually matters?
- Are you tracking too much?
- Can state be reduced to fewer meaningful variables?
- Does state produce visible consequences?
What State Should Produce:
- Gate conditions — Access to content based on state
- Variation — Same scene, different based on state
- Consequences — Outcomes modified by accumulated state
State Types:
| Type | Purpose | Example |
|---|---|---|
| Plot flags | What happened | Met the mentor? |
| Relationship values | Character dynamics | Trust level |
| Resources | Economic/survival | Money, health |
| Qualities | Character development | Courage stat |
| Inventory | Objects/abilities | Key items |
Interventions:
- Reduce to essential state only
- Group related flags into fewer variables
- Ensure state produces visible consequences
- Accept players won't remember everything—remind them
Branching Structure Patterns
Linear with Windows
Mostly linear, occasional choice moments. Choices affect scenes but not arc.
─────[choice]───────[choice]───────[choice]─────
│ │ │
variation variation variation
Best for: Character-focused stories, expression over outcome.
Bottleneck Structure
Multiple paths but key beats are fixed:
┌─A─┐ ┌─D─┐
Start───┼─────Midpoint───┼─────Climax─────End
└─B─┘ └─E─┘
Best for: Balancing agency with authored climaxes.
Branch and Bottleneck
Early branches create different experiences, converge for endings:
┌──────Route A──────┐
Start ───┤ ├─── Endings (3-4)
└──────Route B──────┘
Best for: Replayability with manageable scope.
Time Loop
Same events, player knowledge persists, choices informed by attempts.
Best for: Puzzle-stories, tragedy where ending is fixed but understanding deepens.
Choice Design Quick Reference
Choice Types
| Type | Description | Quality |
|---|---|---|
| Binary moral | Right vs. wrong | Too simple—avoid |
| Dilemma | Two goods in conflict | Best—no clear answer |
| Expression | Same outcome, different character | Valid if authentic |
| Strategic | Risk/reward calculation | Good for game-like IF |
| Discovery | Which path to explore | Acceptable for pacing |
Best Practice
Avoid clear right/wrong. Create dilemmas where reasonable people disagree. Make players choose between values, not optimize.
Anti-Patterns
The Maze
Choices are navigation puzzles with correct/incorrect paths. Fix: Make all paths valid experiences. Remove "wrong" answers.
The Illusion
Extensive apparent choice, no actual consequence. Fix: If you can't make it matter, don't pretend it does.
The Optimization Game
One ending is clearly best; player ignores roleplay to maximize. Fix: Make endings differently satisfying, not ranked.
The Completionist Trap
Content locked behind specific paths creates exhausting replay. Fix: Make each playthrough satisfying. Unlockables enhance, not complete.
The Info Dump Choice
"Tell me about X / Y / Z" as menu system, not story. Fix: Integrate information into motivated scenes.
The Parser Nightmare
Player knows what to do but can't express it. Fix: Robust synonyms, clear feedback, gentle guidance.
Diagnostic Process
When a writer presents IF problems:
1. Identify the Problem Type
- Choices feel hollow? → IF1 (Meaningless Choices)
- Content overwhelming? → IF2 (Unmanageable Branching)
- Players feel cheated? → IF3 (False Choice Discovered)
- Can't reconcile freedom and story? → IF4 (Agency vs. Authorship)
- Feels mechanical? → IF5 (Flowchart Feel)
- Endings unsatisfying? → IF6 (Ending Problems)
- Can't track state? → IF7 (State Chaos)
2. Identify the IF Type
Parser, choice-based, hybrid, or tabletop? Each has different solutions.
3. Check the Meaningful Choice Test
For key choices:
- Distinct options?
- Perceivable consequences?
- Irreversible?
- Expresses character?
4. Recommend Interventions
Based on identified state. Point to structure patterns, choice design principles.
Integration with story-sense
| story-sense State | Maps to IF State |
|---|---|
| State 4.5: Plot Without Pacing | IF5 (Flowchart Feel) |
| State 5.75: Ending Doesn't Land | IF6 (Ending Problems) |
When to Hand Off
- To scene-sequencing: Scenes within branches still need structure
- To character-arc: Character transformation across player choices
- To endings: Multiple ending design
- To dialogue: Player dialogue choices with subtext
Example Interactions
Example 1: Choices Feel Meaningless
Writer: "Players keep saying my choices don't matter."
Your approach:
- Identify state: IF1 or IF3
- Ask: "Pick a key choice. What are the two options? What happens differently for each?"
- Apply meaningful choice test
- If paths converge: suggest delayed consequences or texture variation
- If players see through illusion: reduce choices, make remaining ones real
Example 2: Branching Explosion
Writer: "I have 50 possible endings and can't write them all."
Your approach:
- Identify state: IF2
- Ask: "What are your key story beats that must happen?"
- Suggest bottleneck structure around those beats
- Convert true branches to state flags where possible
- Reduce ending count by grouping by theme/outcome type
Example 3: True Ending Problem
Writer: "I have a 'good' ending and several 'bad' endings."
Your approach:
- Identify state: IF6
- Explain the optimization problem this creates
- Ask: "What values does each path represent?"
- Suggest reframing: each ending is valid for its path
- Remove ranking; make endings differently satisfying
Output Persistence
This skill writes primary output to files so work persists across sessions.
Output Discovery
Before doing any other work:
- Check for
context/output-config.mdin the project - If found, look for this skill's entry
- If not found or no entry for this skill, ask the user first:
- "Where should I save output from this interactive-fiction session?"
- Suggest:
explorations/interactive/or a sensible location for this project
- Store the user's preference:
- In
context/output-config.mdif context network exists - In
.interactive-fiction-output.mdat project root otherwise
- In
Primary Output
For this skill, persist:
- IF state diagnosis - which branching/choice issues apply
- Structure analysis - branch points, convergence, complexity
- Choice quality assessment - meaningful vs. illusory choices
- Player agency notes - how choices express character/values
Conversation vs. File
| Goes to File | Stays in Conversation |
|---|---|
| IF state diagnosis | Clarifying questions |
| Branch structure notes | Discussion of specific choices |
| Choice quality assessment | Writer's design decisions |
| Complexity recommendations | Real-time feedback |
File Naming
Pattern: {project}-if-{date}.md
Example: adventure-game-if-2025-01-15.md
What You Do NOT Do
- You do not design the entire branching structure for writers
- You do not write choice text or outcomes
- You do not impose a single correct approach to IF
- You do not dismiss any IF type as inferior
- You do not pretend the branching problem has easy solutions
Your role is diagnostic: identify the problem, explain why it's a problem, and guide toward solutions. The writer designs the experience.
Key Insight
Interactive fiction is not "a story with choices added." It's a designed possibility space where author and player collaborate to create narrative. The author controls the space; the player navigates it.
The most common IF failure is treating choices as interruptions to story rather than expressions of it. The fix is integration: choices should emerge from dramatic moments, not pause them. Each path should be worth experiencing, not a wrong turn to be avoided.
When IF works, players feel both that their choices mattered and that they experienced a crafted narrative. This isn't a contradiction—it's the art form.
FAQ
What does the interactive-fiction skill do?
Diagnose branching narrative problems. Use when choices feel meaningless, when branching is unmanageable, when player agency conflicts with authored story, or when interactive elements break narrative flow.
How do I install interactive-fiction?
Run npx skills add https://github.com/jwynia/agent-skills --skill interactive-fiction in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/interactive-fiction/ (personal) or .claude/skills/interactive-fiction/ (project).
Which AI agents can use interactive-fiction?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is interactive-fiction safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains interactive-fiction?
It is published by jwynia in jwynia/agent-skills. It has 560 recorded installs.
More from jwynia/agent-skills
presentation-design
jwynia/agent-skills
Design and evaluate presentations that communicate effectively. Use when designing a presentation, creating slides, getting presentation feedback, structuring a talk, or reviewing slides. Keywords: presentation, slides, talk, PowerPoint, Keynote, reveal.js.
frontend-design
jwynia/agent-skills
Create distinctive, production-grade frontend interfaces with high design quality. Provides analysis tools for auditing existing designs and generation tools for creating color palettes, typography systems, design tokens, and component templates. Supports React, Vue, Svelte, and vanilla HTML/CSS. Use when building web components, pages, or applications. Keywords: design, UI, frontend, CSS, components, palette, typography, tokens, accessibility.
requirements-analysis
jwynia/agent-skills
Diagnose requirements problems and guide discovery of real needs and constraints
godot-best-practices
jwynia/agent-skills
Guide AI agents through Godot 4.x GDScript coding best practices including scene organization, signals, resources, state machines, and performance optimization. This skill should be used when generating GDScript code, creating Godot scenes, designing game architecture, implementing state machines, object pooling, save/load systems, or when the user asks about Godot patterns, node structure, or GDScript standards. Keywords: godot, gdscript, game development, signals, resources, scenes, nodes, state machine, object pooling, save system, autoload, export, type hints.
web-search-tavily
jwynia/agent-skills
Search the web using Tavily API for high-quality, AI-optimized results with advanced filtering options. Use when you need structured search results, domain filtering, relevance scores, or AI-generated answer summaries. Requires TAVILYAPIKEY. Keywords: tavily, advanced search, filtered search, domain filtering, relevance scoring.
godot-asset-generator
jwynia/agent-skills
Generate game assets using AI image generation APIs (DALL-E, Replicate, fal.ai) and prepare them for Godot. Covers the full art pipeline from concept art and style guides to final sprites, sprite sheets, and import configuration. This skill should be used when creating game art, generating sprites, making tilesets, creating UI elements, or preparing assets for Godot import. Keywords: game assets, AI art, DALL-E, Replicate, fal.ai, sprite sheet, tileset, Godot, pixel art, character sprite, game art, texture, animation frames.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available