openui-scaffold

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

A setup command for OpenUI, a framework that lets an AI model generate interactive user-interface components. It can create a new project or add the required OpenUI pieces to an existing JavaScript project.

In plain words
What is it for?
Use it to scaffold a new OpenUI project or add OpenUI to an existing Next.js, Vite, or other supported project.
Why use it?
Starting an OpenUI project involves detecting the project type, installing packages, adding styles, and creating a component library. This command organizes those setup decisions and actions.

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-scaffold
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-scaffold

README.md
[![agentmods](https://agentmods.dev/badge/commands/othmanadi/openui-forge/openui-scaffold.svg)](https://agentmods.dev/commands/othmanadi/openui-forge/openui-scaffold)
Your own site
<a href="https://agentmods.dev/commands/othmanadi/openui-forge/openui-scaffold"><img src="https://agentmods.dev/badge/commands/othmanadi/openui-forge/openui-scaffold.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 570 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.00015 $0.00570
Opus 5 $0.00008 $0.00285
Sonnet 5 $0.00003 $0.00114
Haiku 4.5 $0.00002 $0.00057

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

Security

Grade A, and why

openui-scaffold 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 3d 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-scaffold.md · 45 lines

What it actually says

Trigger the OpenUI scaffolding workflow. Follow the decision tree from SKILL.md exactly.

Step 1 — Detect project state:

  1. Check if a package.json exists in the current directory
  2. If yes, detect the framework by checking for next.config., vite.config., or neither
  3. If no package.json exists, check if this is a non-JS project (look for requirements.txt, go.mod, Cargo.toml)

Step 2 — Follow the scaffold decision tree:

No existing project detected:

  • Run npx @openuidev/cli@latest create --name ${PROJECT_NAME} (ask the user for a project name)
  • Wait for scaffold to complete
  • Inform the user to run /openui:integrate next

Existing Next.js project:

  1. Install dependencies: npm install @openuidev/react-ui @openuidev/react-headless @openuidev/react-lang @modelcontextprotocol/sdk lucide-react zod
  2. Add the CSS import to the root layout file (app/layout.tsx or similar):
    import "@openuidev/react-ui/components.css";
    
  3. Create a component library file using templates/library.ts.template — or ask the user if they want to use the built-in openuiChatLibrary from @openuidev/react-ui/genui-lib (chat-aware) or openuiLibrary (component-only)
  4. Recommend running /openui:integrate next

Existing Vite + React project:

  1. Same dependencies as Next.js
  2. Add CSS imports to the main entry file (main.tsx or App.tsx)
  3. Create a component library file using templates/library.ts.template
  4. Note: A proxy to the backend will need to be configured in vite.config.ts during integration
  5. Recommend running /openui:integrate next

Non-JS backend (Python / Go / Rust):

  1. Create a React frontend (ask: Next.js or Vite?) and install OpenUI deps there
  2. Create a component library in the frontend using templates/library.ts.template
  3. Run npx @openuidev/cli generate ./src/lib/library.ts --out system-prompt.txt to pre-generate the system prompt
  4. Copy system-prompt.txt to the backend service directory
  5. Note: The backend handler will be created during /openui:integrate
  6. Recommend running /openui:integrate next

After scaffolding, always run /openui to verify the project state.

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. 3d ago First seen · 45 lines · 15 tokens per session scan A 0498ffebf092

Subscribe to this mod's changes

openui-scaffold is a command published in the GitHub repository OthmanAdi/openui-forge (22 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 570 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.