openui-prompt

openui-prompt is a command for coding agents from OthmanAdi/openui-forge. It costs 10 tokens per session (669 once invoked), scanned A, original, MIT.

A command that creates a system prompt describing the user-interface components available in an OpenUI component library. OpenUI Lang is a format for telling a language model how to use those components.

In plain words
What is it for?
Finding the project’s component library and generating either a text prompt or a JSON Schema for structured UI generation.
Why use it?
The model needs an up-to-date description of the available components to generate valid OpenUI output.

Command

Part of the openui-forge plugin — 14 skills, 6 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/othmanadi/openui-forge/openui-prompt
Clone the repo
git clone --depth 1 https://github.com/OthmanAdi/openui-forge

Or install openui-forge, the plugin that ships this one along with the rest of its 14 skills, 6 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openui-prompt

README.md
[![agentmods](https://agentmods.dev/badge/commands/othmanadi/openui-forge/openui-prompt.svg)](https://agentmods.dev/commands/othmanadi/openui-forge/openui-prompt)
Your own site
<a href="https://agentmods.dev/commands/othmanadi/openui-forge/openui-prompt"><img src="https://agentmods.dev/badge/commands/othmanadi/openui-forge/openui-prompt.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 669 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00010 $0.00669
Opus 5 $0.00005 $0.00334
Sonnet 5 $0.00002 $0.00134
Haiku 4.5 $0.00001 $0.00067

Measured 4d ago against content hash ed560b0000fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openui-prompt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/openui-prompt.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate the system prompt that tells the LLM which components are available and how to use OpenUI Lang.


Step 1 — Detect the approach

Check the project to determine which prompt generation method to use:

  • Non-JS backend (Python, Go, Rust, or no backend yet): Use the CLI approach
  • JS/TS backend that imports the library at runtime: Use the runtime approach
  • If unclear, default to CLI — it works universally

Find the component library file (search for createLibrary calls).

Run:

npx @openuidev/cli generate ${LIBRARY_PATH} --out ${OUTPUT_PATH}

Typical paths:

  • Library: ./src/lib/library.ts
  • Output: ./src/generated/system-prompt.txt or ./system-prompt.txt

For JSON Schema output (useful for structured generation or validation):

npx @openuidev/cli generate ${LIBRARY_PATH} --json-schema --out ${OUTPUT_PATH}/schema.json

After running, verify:

  1. The output file exists
  2. The output file is non-empty (at least a few hundred bytes)
  3. The file contains component names that match the library

Step 2b — Runtime approach (JS/TS backends)

If the backend already imports the library, the system prompt can be generated at runtime using library.prompt(). Verify this is set up in the API route:

import { myLibrary } from "./lib/library";

const systemPrompt = myLibrary.prompt({
  preamble: "You are a helpful assistant that generates interactive UIs.",
  additionalRules: [
    "Always use Stack as root when combining multiple components.",
    "Prefer existing components over generating raw text.",
  ],
  examples: [
    'root = Stack([title, chart])\ntitle = Header("Sales")\nchart = BarChart(labels, [s1])\nlabels = ["Q1","Q2"]\ns1 = Series("Rev", [100, 200])',
  ],
});

Verify:

  1. The library import path resolves correctly
  2. .prompt() is called with at least a preamble
  3. The result is passed as the system message to the LLM call

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 89 lines · 10 tokens per session scan A ed560b0000fd

Subscribe to this mod's changes

openui-prompt is a command published in the GitHub repository OthmanAdi/openui-forge (22 stars, last pushed 1mo ago), licensed MIT. It adds 10 tokens to every session and 669 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.