Skip to main content
skill CX Codex

lynx-openui — Claude Code skill: generates OpenUI Lang for Lynx

Writes OpenUI Lang v0.5 programs for the Lynx OpenUI renderer: static mobile screens, $state, Query/Mutation flows, streaming-friendly output.

Apache-2.0 160 installs ★ 28 updated 2026-10-24

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add lynx-community/skills --skill lynx-openui -a claude-code
Open on GitHub

What lynx-openui does

The skill turns a plain-language screen request into an OpenUI Lang v0.5 program, the DSL that <OpenUiRenderer response={...}> consumes. Output is statements only: one assignment per line, no prose, no code fences, no JSX. The first non-empty line sets root, either to the host's root override or to the library's default Stack.

Three reference files carry the detail. components.md holds component signatures, runtime.md covers state, tools and actions, examples.md shows layouts and tool workflows. Arguments are positional, so leaving out an optional value in the middle shifts every later one; Stack([header, content], "column", false, "l", "stretch", "start") is the shape that works. Mutable values sit in $state. Reads come from Query, writes from Mutation fired by an explicit Action.

Without tool schemas from the host the skill will not invent tool names; it falls back to static content or a short explanation built from supported components. A reduced component catalog counts as the whole vocabulary, so anything dropped from it is off limits. JSX, HTML, CSS, A2UI JSON and new ReactLynx components are outside its scope.

What it helps with

  • turn a written screen description into a mobile layout
  • get output that renders line by line as it streams
  • wire a real read tool into a repeated list with @Each
  • fire a write from a button through Mutation and Action
  • patch changed statements only in mergeStatements mode

Example prompts for the agent

  • Turn this onboarding screen into OpenUI Lang: a heading, three rows and a Next button.
  • Build a program that lists tasks from the listTasks Query and submits completeTask from a Button Action.
  • Return only the changed statements for mergeStatements: swap the header text.

How to install lynx-openui

1Skills CLI (Vercel)

npx skills add lynx-community/skills --skill lynx-openui -a claude-code

2Manually: put the files in place

~/.claude/skills/lynx-openui/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/lynx-openui/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about lynx-openui

How do I install lynx-openui in Claude Code?

Run npx skills add lynx-community/skills --skill lynx-openui -a claude-code. The skill lands at ~/.claude/skills/lynx-openui/SKILL.md.

What does lynx-openui do?

It turns a natural-language UI request into a declarative OpenUI Lang v0.5 program for <OpenUiRenderer>. The result is DSL, not application code.

Why does it output static content instead of Query calls?

Queries and mutations are only emitted for real tool schemas the host passes in. Without them the skill keeps to static values or an explanation built from supported components.

Source text

SKILL.md · Apache-2.0
---
name: lynx-openui
description: Generate valid OpenUI Lang v0.5 functional-notation programs for the Lynx OpenUI renderer. Use when Codex must turn a natural-language UI request into raw OpenUI DSL for OpenUiRenderer, including static mobile UI, $state, Query/Mutation tool flows, Action plans, streaming-friendly output, or catalog-constrained revisions. Do not use for JSX, HTML, CSS, A2UI JSON, or implementing new ReactLynx components.
---

# Generate Lynx OpenUI Programs

Generate valid OpenUI Lang v0.5 consumed by
`<OpenUiRenderer response={...}>`. Produce declarative DSL, not application
code.

## Read The References

- Always read [components.md](references/components.md) before generating a
  program. Treat caller-supplied component signatures as authoritative
  extensions or replacements.
- Read [runtime.md](references/runtime.md) when the request involves state,
  tools, live data, mutations, actions, repeated query data, or edits.
- Read [examples.md](references/examples.md) for a non-trivial layout or tool
  workflow. Adapt patterns; do not copy irrelevant content.

## Workflow

1. Identify the requested UI, exact active component catalog, configured root
   component, available tool schemas, host-supplied prefetched Query keys,
   media URLs, and whether the host supports full programs or
   `mergeStatements` patches.
2. Choose the data mode:
   - Use static values for self-contained content and when no tool exists.
   - Use `Query` only for an actual read tool supplied by the caller or host.
   - Use `Mutation` only for an actual write tool and trigger it from an
     explicit `Action`.
3. Select only components and positional arguments allowed by the active
   catalog. Treat an explicitly reduced catalog as the complete vocabulary:
   built-ins omitted from it are unavailable. Use the host's explicit root
   override when present; otherwise use the Library's default `Stack` root.
4. Write a streaming-friendly graph. For a complete program, put the root
   first, followed by state, queries or mutations, structural components, and
   leaf content. For an edit-mode patch, return only changed statements.
5. Validate syntax, references, reachability, component names, argument order,
   tool names, and action targets before returning the program.

## Output Contract

- Return only OpenUI Lang. Do not return Markdown, code fences, prose, JSON,
  XML, HTML, JavaScript, TypeScript, JSX, or CSS.
- Put one assignment statement on each line.
- For a complete program, make the first non-empty line assign `root` to a call
  of the host's explicit root override, for example `root = Shell(...)`.
  Otherwise use the Library's default `root = Stack(...)`.
- Return a complete program by default. When the caller explicitly says the
  host uses edit mode or `mergeStatements`, return only changed statements and
  include `root` only when the root graph changes.
- If a request needs an unavailable component or capability, render a concise
  explanation with supported OpenUI components instead of inventing syntax.

## Syntax Rules

- Use `identifier = Expression` for ordinary declarations and
  `$identifier = defaultValue` for mutable state.
- Pass component arguments positionally. Never use named arguments such as
  `gap: "m"`.
- Omit optional arguments only from the end. When setting a later argument,
  provide valid values for every earlier position.
- Use double-quoted strings and escape embedded quotes and backslashes.
- Use references or inline components. Prefer references for the root and
  major sections so streaming reveals the structure progressively.
- Ensure every referenced identifier is defined. Ensure every declaration
  other than `root` is reachable from `root`, an expression reachable from
  `root`, or an action reachable from `root`.
- Use only documented operators, built-ins, components, and action steps.

Correct positional layout using the default `Stack` root:

```text
root = Stack([header, content], "column", false, "l", "stretch", "start")
```

Incorrect positional layout:

```text
root = Stack([header, content], "column", "l", "stretch")
```

The incorrect form passes a string into `wrap` and shifts every later prop.

## Data And Interaction Rules

- Do not invent tool names. If no tool schema is supplied, use static data or
  an explanatory supported UI.
- Give every `Query` a representative default result matching the real tool
  shape so the UI renders in the first synchronous render after the response
  stabilizes and before the request resolves.
- When the host supplies prefetched Query results, preserve the corresponding
  Query assignment names. They are statement IDs and prefetch keys, not tool
  names. See [runtime.md](references/runtime.md#query).
- Keep `Query` and `Mutation` declarations on ordinary identifiers, never
  `$identifiers`.
- Use `@Each` for query-backed repeated UI. Keep its loop-dependent component
  inline inside `@Each`.
- Trigger write operations only from an explicit submit or confirmation action
  on an active-catalog component. With the default catalog, use `Button`. Do not
  attach a mutation to an input's change action.
- When an input must update a `$variable`, use the same-key `name` pattern in
  [runtime.md](references/runtime.md). Do not invent an event-value variable.
- Execute multi-step actions in deliberate order. Remember that a failed
  mutation stops the remaining steps.
- Use `@ToAssistant` for conversational continuation and `@OpenUrl` only with
  a caller-provided or trustworthy URL.
- Use caller-provided media URLs. Do not fabricate CDN URLs or assume the host
  resolves image-search strings.

## Lynx UI Rules

- Prefer compact, mobile-first layouts with a shallow component tree.
- Apply component-specific preferences only when those components exist in the
  active catalog; otherwise follow the supplied custom signatures.
- With the default catalog, use `Stack` or `Column` for ordinary vertical
  structure, `Row` for small horizontal groups, and `List` for grouped or
  repeated content.
- When `Image` exists, prefer explicit variants so the Lynx renderer has
  concrete sizing.
- With the default catalog, keep readable text in `Text` or `TextContent`; do
  not emit raw Lynx elements.
- When available, use `Tabs` for alternate views and `Modal` for tap-to-open
  details. Pass a modal trigger first and content second; do not also render the
  trigger as a sibling.

## Final Verification

Before returning, verify all of the following:

- A complete program assigns `root` to the host's explicit root override when
  present, or to the Library's default `Stack` root otherwise. An edit-mode
  patch omits `root` unless the root graph changes. The response contains only
  OpenUI Lang.
- Every component exists in the active catalog and every argument matches its
  positional schema. A reduced catalog contains no implicit built-ins, and the
  root call uses its configured root component.
- No `Form`, `Input`, `Select`, `SelectItem`, `FormControl`, table, or chart is
  used unless the caller supplied that custom component.
- Every reference resolves and no declaration is orphaned.
- Every `Query` or `Mutation` uses a real supplied tool and is referenced by
  visible UI or a visible action.
- Every intended prefetched Query uses its exact host-supplied key as the
  assignment name, and every Query still has a shape-correct default.
- Every `$variable` participates in visible UI, a query argument, or an action.
- Every `@Each` loop variable stays inside its inline template expression.
- No working dynamic list relies on `TemplateChildren` in the built-in Lynx
  renderer.
- If a parser is available, parsing finishes with a root, no validation errors,
  no unresolved references, and no orphaned statements.

© lynx-community · Apache-2.0 · lynx-community/skills

Similar skills

All skills for Frontend and UI →

From the same set14

The whole set →
lynx-trace-record lynx-trace-record teaches AI agents to record Lynx performance traces via the trace_record CLI. Captures startup rendering, memory snapshots, and JS engine profiles. CX Codex +1 388installs lynx-ui A skill for building with lynx-ui: it picks the component, checks the public API in the repo's reference files and keeps the agent from inventing props. CX Codex +1 326installs lynx-debug-info-remapping lynx-debug-info-remapping maps Lynx function_id:pc_index error locations back to source lines with debug-info.json. Use it when a main-thread stack points into bytecode. CX Codex +1 325installs habitat-usage habitat-usage — a skill for Claude Code, Codex, Cursor and other platforms that configures Habitat to sync multi-repo dependencies and external assets via .habitat/DEPS and hab sync. CX Codex +1 253installs lynx-check-css-support lynx-check-css-support is a Claude Code skill that checks CSS property and value support across Lynx backends using bundled data. CX Codex +1 201installs vanilla-lynx vanilla-lynx is a Claude Code skill that writes, reviews, and explains Vanilla Lynx code using Element PAPI. It targets build-free .lynxml files or Rspeedy application projects. CX Codex +1 201installs lynx-api-docs lynx-api-docs — a skill for Claude Code and Codex that routes Lynx engine docs during TSX or TTML development. Prevents AI from assuming browser defaults. CX Codex +1 183installs lynx-a2ui lynx-a2ui — a skill for Claude Code that converts natural-language interface requests into A2UI v1.0 protocol messages. Outputs declarative JSON arrays directly for an A2UI renderer. CX Codex +1 170installs

Project sponsors

Companies that keep this analytics open