surface-component-scaffold-gen

Installation
SKILL.md

SurfaceComponentScaffoldGen

Scaffold a Clef Surface headless component $ARGUMENTS with .widget spec (anatomy, FSM states, accessibility, affordance, props, connect, compose), anatomy parts, machine implementation, and suite manifest.

When to use: Use when creating a new Clef Surface headless component. Generates a .widget spec (anatomy, states with transitions, accessibility, affordance, props, connect, compose, invariant), anatomy definition, machine implementation, and suite manifest.

Design Principles

  • Behavior-Rendering Separation: Widget specs define behavior (states, transitions, guards). Rendering is handled by framework adapters. They agree only on part names (anatomy).
  • Finite State Machine Discipline: Every component is a finite state machine with explicit states, events, transitions, and guards. No implicit state.
  • Anatomy Contract: The anatomy defines named parts (root, trigger, content, etc.) that both the machine and renderer reference. This is the only coupling point.
  • Props API via connect(): The machine's connect() action transforms internal state into framework-neutral props objects — one per anatomy part.
Related skills
Installs
1
First Seen
Mar 11, 2026