agentleFS
bladecoderbladecoder/narrative-skills/skills/if/ink-doc/SKILL.md

ink-doc

Skill0 starsChanged 7 months agoMITView on GitHub

Create and edit interactive narrative scripts using the ink scripting language. Use when creating choice-based stories, branching dialogues, interactive fiction, or when the user mentions ink, knots, stitches, weaves, or interactive narratives.

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 9 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 16
  2. Distinctive:

    Start simple and add complexity as needed:

    line 69
  3. Very specific:

    For basic stories: Read only 1-1-content.md, 1-2-choices.md, and 1-3-knots.md

    line 71
  4. Very specific:

    For branching narratives: Add 1-4-diverts.md and 1-5-branching-the-flow.md

    line 72
  5. Very specific:

    For complex flows: Use weave syntax from 2-1-gathers.md and 2-2-nested-flow.md

    line 73
  6. Very specific:

    For state tracking: Read 3-1-global-variables.md and 3-2-logic.md

    line 74
  7. Distinctive:

    Read only what you need: Don't load all reference files at once.

    line 118
  8. Distinctive:

    Start with examples: Look at the code examples in the reference files for the feature you need.

    line 120
  9. Very specific:

    Use comments: Add // comments to explain complex logic.

    line 124
  10. Very specific:

    Read: 5-1-basic-lists.md or 3-1-global-variables.md

    line 136
  11. Very specific:

    Use INCLUDE to split content across multiple .ink files

    line 150
  12. Distinctive:

    Keep related content in the same knot

    line 151
  13. Distinctive:

    Use stitches for sub-sections within a knot

    line 152
  14. Very specific:

    Choices: Use * for once-only, + for sticky (repeatable)

    line 162
  15. Distinctive:

    If you need help with:

    line 202
  16. Distinctive:

    Syntax errors: Check the relevant reference file for correct syntax

    line 203
  17. Very specific:

    Choices not appearing: Check conditionals in 1-7-varying-choices.md

    line 205
  18. Very specific:

    Complex examples: Look at 5-7-long-example-crime-scene.md

    line 207
  19. Distinctive:

    Load references on demand: - only read the files you need for the current task.

    line 211

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ink Script Creation Skill

This skill helps you create interactive narrative scripts using the ink scripting language. Ink is designed for creating branching stories, interactive dialogues, and choice-based narratives.

When to use this skill

Use this skill when:

  • Creating interactive fiction or choice-based stories
  • Writing branching dialogue systems for games
  • Building narrative-driven content with player choices
  • Working with ink scripts (.ink files)
  • The user mentions: knots, stitches, diverts, weaves, choices, or ink syntax

How to use this skill

1. Understanding the documentation structure

The ink documentation has been split into focused, modular files in the references/ directory. Only read the files you need for the current task to avoid filling the context.

Available reference files:

  • references/introduction.md - Basic overview of ink
  • references/1-the-basics.md - Part 1 overview
  • references/1-1-content.md - Basic content and text
  • references/1-2-choices.md - Creating player choices
  • references/1-3-knots.md - Organizing content into knots
  • references/1-4-diverts.md - Controlling story flow
  • references/1-5-branching-the-flow.md - Branching techniques
  • references/1-6-includes-and-stitches.md - Sub-sections and file organization
  • references/1-7-varying-choices.md - Conditional and sticky choices
  • references/1-8-variable-text.md - Dynamic text content
  • references/1-9-game-queries-and-functions.md - Built-in queries
  • references/2-weave.md - Part 2 overview: Weave syntax
  • references/2-1-gathers.md - Gather points
  • references/2-2-nested-flow.md - Nested choices and gathers
  • references/2-3-tracking-a-weave.md - Labels and flow tracking
  • references/3-variables-and-logic.md - Part 3 overview
  • references/3-1-global-variables.md - Global variables
  • references/3-2-logic.md - Mathematical and logical operations
  • references/3-3-conditional-blocks.md - If/else structures
  • references/3-4-temporary-variables.md - Temporary variables
  • references/3-5-functions.md - Creating functions
  • references/3-6-constants.md - Defining constants
  • references/3-7-advanced-game-side-logic.md - External functions
  • references/4-advanced-flow-control.md - Part 4 overview
  • references/4-1-tunnels.md - Tunnel syntax for subroutines
  • references/4-2-threads.md - Threading multiple story sections
  • references/5-advanced-state-tracking.md - Part 5 overview
  • references/5-1-basic-lists.md - List basics
  • references/5-2-reusing-lists.md - Reusing list values
  • references/5-3-list-values.md - List as numbers
  • references/5-4-multivalued-lists.md - Lists with multiple values
  • references/5-5-advanced-list-operations.md - Advanced list operations
  • references/5-6-multi-list-lists.md - Combining multiple lists
  • references/5-7-long-example-crime-scene.md - Complete example
  • references/5-8-summary.md - Lists summary
  • references/6-international-character-support-in-identifiers.md - Unicode support

2. Progressive learning approach

Start simple and add complexity as needed:

  1. For basic stories: Read only 1-1-content.md, 1-2-choices.md, and 1-3-knots.md
  2. For branching narratives: Add 1-4-diverts.md and 1-5-branching-the-flow.md
  3. For complex flows: Use weave syntax from 2-1-gathers.md and 2-2-nested-flow.md
  4. For state tracking: Read 3-1-global-variables.md and 3-2-logic.md
  5. For advanced features: Consult Part 4 (tunnels/threads) or Part 5 (lists) as needed

3. Creating ink scripts

Basic structure

// Simple linear story
Hello, world!
This is a basic ink script.
-> END

With choices

You stand at a crossroads.
* [Go left] -> left_path
* [Go right] -> right_path

=== left_path ===
You head down the left path.
-> END

=== right_path ===
You take the right path.
-> END

With variables and logic

VAR health = 100
VAR gold = 50

=== start ===
You have {health} health and {gold} gold.
* {gold >= 30} [Buy a potion (30 gold)]
    ~ gold -= 30
    ~ health += 20
    You feel stronger!
* [Continue] -> next_scene

4. Best practices

  1. Read only what you need: Don't load all reference files at once. Check the list above and read only the relevant sections.
  2. Start with examples: Look at the code examples in the reference files for the feature you need.
  3. Test incrementally: Build your script step by step, testing each feature as you add it.
  4. Use comments: Add // comments to explain complex logic.
  5. Organize with knots: Break your story into logical sections using knots (=== knot_name ===).
  6. Use meaningful names: Choose descriptive names for knots, variables, and stitches.

5. Common patterns

Simple conversation

Read: 1-2-choices.md, 1-8-variable-text.md

State machine (e.g., door locked/unlocked)

Read: 5-1-basic-lists.md or 3-1-global-variables.md

Complex branching with rejoining

Read: 2-1-gathers.md, 2-2-nested-flow.md

Inventory system

Read: 5-4-multivalued-lists.md

Reusable dialogue

Read: 4-1-tunnels.md

6. File organization

For larger projects:

  • Use INCLUDE to split content across multiple .ink files
  • Keep related content in the same knot
  • Use stitches for sub-sections within a knot
  • Reference: 1-6-includes-and-stitches.md

Quick reference: Essential syntax

Content: Just write text

This is content that will be displayed.

Choices: Use * for once-only, + for sticky (repeatable)

* [Choice text] Content after choice
+ [Repeatable choice] This can be chosen multiple times

Knots: Sections of content

=== knot_name ===
Content here

Diverts: Flow control

-> knot_name
-> END

Variables: Track state

VAR health = 100
~ health -= 10
{health} // Display variable

Conditionals: Test conditions

{health > 50: You feel strong | You feel weak}
* {health > 30} [Fight] -> fight

Comments: Not displayed

// Single line comment
/* Multi-line
   comment */

Troubleshooting

If you need help with:

  • Syntax errors: Check the relevant reference file for correct syntax
  • Flow control: Review 1-4-diverts.md and 1-5-branching-the-flow.md
  • Choices not appearing: Check conditionals in 1-7-varying-choices.md
  • Variables not working: Review 3-1-global-variables.md and 3-2-logic.md
  • Complex examples: Look at 5-7-long-example-crime-scene.md

Remember

Load references on demand - only read the files you need for the current task. This keeps the context clean and focused.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.