Skill Spotlight: Onsystem for Catching Invented React Props and Tokens

Skill Spotlight: Onsystem for Catching Invented React Props and Tokens

In Short

Onsystem gives a React coding agent a concrete question to answer before changing UI: does this component contract actually exist in this project? Use it to discover component props, variants and semantic tokens, then check a small TSX change against those definitions. A plausible-looking button can still use an invented prop or an unsupported variant.

This spotlight proposes a bounded exercise: update one confirmation panel in an existing application, preserve its design system, and return the findings alongside the patch. The goal is a reviewable change grounded in repository evidence. Static contract checks complement rendered UI review and accessibility testing.

Who this is for

This is for frontend maintainers and design-system owners reviewing agent-written React changes. Start with a repository that already has components and token sources. Choose a task such as changing a destructive confirmation button, where a reviewer can identify the expected behavior and compare the result with a working screen.

The official Onsystem repository currently specifies Node.js 20.19 or later and documents local discovery with npx -y onsystem inspect. Recheck those requirements when installing. For a first trial, record the tool version, repository revision, target app and changed paths so another maintainer can reproduce your result.

Starter workflow

  1. Confirm discovery before editing. From the app folder, run npx -y onsystem inspect. Verify that the discovered components belong to the application you intend to change. If discovery misses the design system, stop and investigate configuration; an empty inventory cannot substantiate a clean component review.
  2. Read the actual contract. Use MCP search_components or list_components, then get_component for each component involved. Read get_tokens before choosing styles. The pinned upstream skill documents these tools and file-specific lookup in monorepos.
  3. Make one small TSX change. Suppose an agent proposes variant="danger". Check whether the local Button actually exposes that value. If its contract lists destructive, use that supported variant. Likewise, confirm whether the exported part is CardHeader before inventing Card.Header. These are illustrative choices, not universal React APIs.
  4. Check and repair. Run MCP check_ui on each changed file, supplying its filename or path. Compare findings with the starting file, correct newly introduced violations, and rerun the check. Keep the final diagnostics with the diff so review covers both the change and what remains unresolved.
  5. Review the rendered result. Open the confirmation panel at the target viewport. Check text wrapping, focus movement, button labeling and the actual confirmation behavior. A contract-compliant destructive button still needs a sensible interaction and a clear accessible name.
Stage Evidence to retain Stop condition
Discover Target app, component imports, permitted variants and tokens Wrong or missing design system
Edit One bounded TSX diff Unsupported API or token assumption
Check and repair Before/after findings for changed files New violations remain
Render Screenshot and interaction notes Visual or accessibility issue remains
Proposed review loop: retain evidence at each stage and return to the patch when a gate fails.

Without MCP tools, the upstream skill documents a CLI path: inspect the project, read component source, export tokens with npx -y onsystem export --format design-md, then run npx -y onsystem check path/to/file.tsx --format json. Replace the example path with the changed file. Fix reported errors and repeat the check. Installing the skill alone should not be treated as proof that MCP tools are connected.

Recommended ASE skills

What to watch

Baseline handling changes how findings should be interpreted. Upstream states that CLI checks and the hook honor onsystem.baseline.json, while MCP check_ui shows everything in the file. Capture the starting findings, repair issues introduced by your patch, and report unrelated existing ones separately. Do not refresh the baseline merely to make a new violation disappear.

Discovery quality also matters. The current repository explains that compiled component packages need type declarations for component-level checks; packages without them retain token checking but lose component-contract coverage. Record that limitation in the handoff. Prefer a precise coverage statement over an unexplained โ€œpassed.โ€

FAQ

Can Onsystem choose our design direction?

Use this exercise after the team has chosen its direction. The acceptance question is whether the implementation follows the project’s discovered contract.

Does a clean check prove accessibility?

No. Review keyboard use, focus, names and behavior in the running application. Treat static findings as one part of UI review.

What should the handoff contain?

Return changed paths, discovered contracts, before/after findings, tool version and browser evidence. State any unresolved discovery gaps or existing violations explicitly.