agentleFS
PostHogKnown publisherPostHog/wizard/.claude/skills/ink-tui/SKILL.md

ink-tui

Skill197 starsChanged 2 months agoMITView on GitHub

Build or modify the PostHog wizard's Ink screens, primitives, keyboard interactions, and session-driven screen flow. Use for TUI work in this repository.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a component in screens.

    line 37
  2. Very specific:

    Add its ScreenId in screen-sequences.ts.

    line 38
  3. Very specific:

    Use an explicit setter that notifies subscribers.

    line 61
  4. Very specific:

    Run pnpm try --playground to inspect primitives.

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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 TUI

The wizard renders its terminal interface with Ink and React. Pi is an agent harness; it does not replace this renderer. Read wizard-development for architecture and harness/sequence policy before structural changes.

Start with the existing surface

  • For screen flow or state, read ARCHITECTURE.md.
  • For layout or controls, read PRIMITIVES.md and the relevant component's props.
  • For composition and keyboard behavior, read PATTERNS.md.
  • For terminal sizing, startup, or noninteractive behavior, read TERMINAL-COMPAT.md.

package.json owns supported versions: currently Node ≥22.22.0, Ink ^6.8.0, React ^19.2.4, and @inkjs/ui ^2.0.0. Use installed package types for API details; keep this skill focused on the wizard's conventions rather than copying upstream component manuals.

Add a screen

  1. Create a component in screens.
  2. Add its ScreenId in screen-sequences.ts.
  3. Register the component in screen-registry.tsx.
  4. Reference it through screenId in the owning program's steps, with the appropriate visibility, completion, and gate predicates.

Screen sequences derive from program steps. Do not hand-maintain a second sequence array or add program navigation to the router. Additional state or service wiring depends on the screen's needs; App remains the shared shell.

Preserve the UI boundary

Business logic calls WizardUI through getUI. Screens use WizardStore setters for reactive changes. The router resolves program screens from session predicates; overlays interrupt that resolution. Local state is appropriate for presentation details such as tab selection, not wizard progression.

For new state, first decide whether it belongs in WizardSession or display-only store state. Use an explicit setter that notifies subscribers. When business logic needs the operation, extend WizardUI, InkUI, and LoggingUI together. Reuse existing enums and union types rather than introducing competing status vocabularies.

Reuse and check

Compose existing primitives and use styles.ts for shared colors, icons, and alignment. Export new public primitives from primitives/index.ts, add a realistic playground demo, and register it in PlaygroundApp.tsx.

Run pnpm try --playground to inspect primitives. Use exploring-the-wizard when exercising actual screen flows. Follow the repository's validation guidance; choose focused behavior checks for changed predicates or input handling, and visual inspection for layout changes.

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.