FO

formax-surface-reset-workflow

Workflow for managing REPL terminal surface transitions.

Install

mkdir -p .claude/skills/formax-surface-reset-workflow && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12747" && unzip -o skill.zip -d .claude/skills/formax-surface-reset-workflow && rm skill.zip

Installs to .claude/skills/formax-surface-reset-workflow

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use when changing REPL clear/reset/resume/surface behavior (onClearTerminal, transcriptSeq remount, Ink Static paths, Ctrl+O/Ctrl+E transitions). Enforces single-owner reset transaction and prevents black-screen/flicker/duplicate-row regressions.
246 chars✓ has a “when” trigger
Advanced

Key capabilities

  • Route REPL clear/reset/resume behavior through specific helpers
  • Treat surface resets as single transactions
  • Add or extend regression tests for ordering and ownership
  • Run minimum regression tests for surface reset
  • Keep one surface owner for clear/remount operations
  • Avoid stacking replInstance.clear() and ANSI clear in legacy paths

How it works

This skill enforces a single-owner reset transaction for REPL surface changes by routing operations through designated helpers and requiring specific regression tests.

Inputs & outputs

You give it
Change touching REPL clear/reset/resume behavior or transcript surface transitions
You get back
Modified code routed through surface reset helpers, updated regression tests, and verification of surface smoke paths

When to use formax-surface-reset-workflow

  • Fixing terminal flicker during updates
  • Managing REPL transcript view transitions
  • Debugging surface reset issues

About this skill

Formax Surface Reset Workflow

Goal

Use this skill when changing REPL clear/reset/resume behavior or any transcript surface transition that can remount Static.

Read First

  • docs/contracts/transcript-surface-contract.md
  • docs/runbooks/repl-surface-debugging.md
  • docs/contracts/invariants.md when ownership or sequencing is unclear

These docs are canonical. If stable surface behavior changes, update them before or with code.

Code Map

  • Reset helpers / queue owner:
    • replaceTranscript
    • queueTranscriptSurfaceReplace
    • resetTranscriptSurface
    • queueTranscriptSurfaceReset
    • surfaceOpQueueRef
  • High-risk flows:
    • packages/core/src/features/repl/controller/ui/
    • packages/core/src/features/repl/controller/session/
    • packages/core/src/features/repl/useReplController.ts
    • packages/core/src/screens/repl/
    • packages/core/src/runtime/bootstrap/runLegacyCli.tsx
  • Call sites to watch:
    • onClearTerminal
    • clearTerminal
    • resetInkStaticOutputForStdout
    • transcriptSeq remount behavior in ReplTranscript / ExpandedReplTranscript

Trigger Conditions

Use this skill whenever the change touches any of:

  • /resume, /clear, compact boundary transitions
  • Ctrl+O / Ctrl+E transcript view switches
  • onClearTerminal, clearTerminal, or resetInkStaticOutputForStdout
  • replaceTranscript, queueTranscriptSurfaceReplace, resetTranscriptSurface, queueTranscriptSurfaceReset, or surfaceOpQueueRef
  • files under packages/core/src/features/repl/controller/ui/, packages/core/src/features/repl/controller/session/, packages/core/src/features/repl/useReplController.ts, packages/core/src/screens/repl/, or packages/core/src/runtime/bootstrap/runLegacyCli.tsx

Minimal Workflow

  1. Identify the exact path (/resume, /clear, Ctrl+O / Ctrl+E, compact boundary, etc.).
  2. Route it through replaceTranscript / resetTranscriptSurface instead of local clear / remount sequencing.
  3. Treat reset as one transaction, not scattered side effects.
  4. Add or extend regression tests for ordering and surface reset ownership.
  5. Run the minimum regression set below and at least one real surface smoke path.

Minimum Regression

  • bun run test -- packages/core/src/features/repl/controller/ui/surfaceReset.test.ts
  • bun run test -- packages/core/src/features/repl/useReplController.test.tsx -t "resume|clear|compact"
  • bun run test -- packages/core/src/screens/repl/surfaceSmoke.test.tsx
  • bun run type-check
  • If change touches compact / expanded toggles broadly: bun run test:surface-screen-model

Guardrails

  • Keep one surface owner; do not add a second independent clear / remount path.
  • Do not stack replInstance.clear() and ANSI clear in legacy paths unless ownership is explicit and serialized.
  • Do not accept a Vitest-only fix without running a real surface smoke path.

References

  • docs/pitfalls/summary.md sections covering /clear, compact + Ctrl+O, and resume black-screen regressions
  • docs/pitfalls/repl-transcript-surface-handoff-pitfall.md
  • docs/pitfalls/repl-transcript-static-rootcause.md

When not to use it

  • When modifying built-in REPL behavior without surface reset implications
  • When adding a second independent clear/remount path
  • When accepting a Vitest-only fix without real surface smoke path

Limitations

  • Does not permit adding a second independent clear/remount path
  • Does not permit stacking replInstance.clear() and ANSI clear in legacy paths without explicit serialization
  • Does not accept a Vitest-only fix without running a real surface smoke path

How it compares

This workflow centralizes and serializes REPL surface reset operations, preventing common issues like black-screen or flicker, unlike scattered or independent clear/remount logic.

Compared to similar skills

formax-surface-reset-workflow side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
formax-surface-reset-workflow (this skill)04moNo flagsAdvanced
frontend-design4812moNo flagsAdvanced
screenshot-to-code2042moNo flagsBeginner
textual1439moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

frontend-design

anthropics

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

481544

screenshot-to-code

OneWave-AI

Convert UI screenshots into working HTML/CSS/React/Vue code. Detects design patterns, components, and generates responsive layouts. Use this when users provide screenshots of websites, apps, or UI designs and want code implementation.

204389

textual

KyleKing

Expert guidance for building TUI (Text User Interface) applications with the Textual framework. Invoke when user asks about Textual development, TUI apps, widgets, screens, CSS styling, reactive programming, or testing Textual applications.

143346

web-artifacts-builder

anthropics

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

49162

radix-ui-design-system

sickn33

Build accessible design systems with Radix UI primitives. Headless component customization, theming strategies, and compound component patterns for production-grade UI libraries.

33130

svelte-ui-design

XIYO

ALWAYS use this skill for ANY Svelte component styling, design, or UI work. Svelte 5 UI design system using Tailwind CSS 4, Skeleton Labs design tokens/presets/Tailwind Components, and Bits UI headless components. Covers class composition, color systems, interactive components, forms, overlays, and all visual design.

23136

Search skills

Search the agent skills registry