npx ctx7 .md file to compare - side-by-side diff against openui-mcp
openui-mcp
What it does for you
Gives your assistant up-to-date know-how for building live screens.
What it produces
A recent result, so you can see the kind of work it returns.
loading…
How to get it
These run inside the Snappy workspace. Want this working in your business? I set skills like this up with you, in one focused week.
For developers how this skill is built, graded, and how it runs
at a glance- the short version
what's inside - the parts that make up a skill 2/4 present
A skill is just a few plain-text files. Only the main one is required. The rest are optional, added as the work needs them. This is what the skill is made of; how it runs is just below.
state/skills/openui-mcp/SKILL.md
present
state/lib/openui-mcp.ts
not present
state/bin/openui-mcp/
not present
state/skills/openui-mcp/AGENTS.md
present
how it runs - the shared frame every skill uses 3/5 present
Every skill runs the same way. One part does the work, a separate part checks it, and a short loader hands the AI exactly what it needs for the job. Anything this skill doesn't use shows a one-line note saying why, on purpose, not by accident.
state/log/evals.ndjson - Library ref MUST be /thesysdev/openui — Context7 uses /<github-org>/<repo>. Do NOT use /openui or /openuidev.
- Prefer Specificity — Use use library /thesysdev/openui to <question> instead of broad use context7 to avoid 300+ library ambiguity.
- Two-Skill Division — Use openui-mcp for API signatures and types; use crayon-sdk for production failure modes and battle-tested gotchas.
- Subagents cannot bootstrap — OAuth requires a browser. If ~/.claude/settings.json is missing, fail fast and prompt the user.
- Never bundle OpenUI docs — Always query live. snappy-os carries pointers, not copies, to prevent staleness.
what it has learned - fixes written back in over time sample
When a run hits something this skill didn't handle, the fix gets written back into the skill so it doesn't happen again. FIXED means it was corrected on the spot. LOGGED means it's queued for a bigger rewrite. Either way, the skill gets a little better and never makes the same mistake twice.
- Loading feedback rows…
how the work flows- step by step
test -e "$HOME/.claude/settings.json" || npx -y ctx7 setup --claude
SKILL.md- the skill, written out in plain English
openui-mcp - OpenUI Docs via Context7 MCP
What this skill is
A registration entry that wires snappy-os to the OpenUI documentation served through Context7 as a Model Context Protocol (MCP) server. snappy-chat is built on @openuidev/* (the OpenUI fork of Crayon SDK, March 2026 launch); when subagents work on the chat surface they need OpenUI's API surface - and that surface is iterating fast. Bundling the prose into snappy-os would guarantee staleness within a sprint. Querying it through MCP at dispatch time gives every snappy subagent the live docs without us shipping a copy.
The deliverable from snappy-os's perspective is on-demand access to OpenUI docs from any MCP-capable agent runtime, not a runnable command. Eval is auto-shape - score by frontmatter shape + AGENTS.md presence + reachability of the install_check path (a sentinel that the user's MCP client config exists).
The Context7 ecosystem
Context7 is an MCP server gateway by Upstash. It hosts documentation for hundreds of open-source libraries and exposes them through a single MCP server (mcp.context7.com). OpenUI publishes its docs through Context7 - see https://www.openui.com/docs/mcp - under the library reference /thesysdev/openui.
When you query Context7 from inside an agent runtime that has MCP support (Claude Code, Codex, Cursor, OpenCode, etc.), Context7 returns the OpenUI documentation as tool-call results. The agent reads those results inline; no bundled prose needed.
This means three things land in the same box at once:
- The docs stay fresh - Context7 mirrors OpenUI's repo; the agent always sees
the latest API.
- The agent doesn't need to grep through
node_modules/@openuidev/*to find
types - the docs answer the question directly.
- snappy-os doesn't carry a stale OpenUI mirror. The
crayon-sdkskill
continues to carry production-tested patterns; OpenUI MCP carries the API surface.
Install
npx -y ctx7 setup --claude
What this does (per Context7's docs):
- Walks the user through OAuth (interactive browser) to mint an API key.
- Writes a
context7MCP server entry into the target runtime's config -
for --claude that's ~/.claude/settings.json under mcpServers.
- Idempotent - running twice just re-confirms the wiring.
Per-runtime flag map:
| Flag | Target config |
|---|---|
--claude | ~/.claude/settings.json (Claude Code) |
--cursor | Cursor's MCP settings |
--opencode | OpenCode's MCP settings |
| (none) | manual setup at https://context7.com/clients (30+ runtimes supported) |
Subagents cannot bootstrap. First-run OAuth requires an interactive browser, which a sandboxed subagent does not have. The user runs npx -y ctx7 setup --claude once on the dev machine; subagents inherit the wired MCP server through ~/.claude/settings.json. If the install_check fails inside a subagent, surface the error so the orchestrator can prompt the user.
Usage from a prompt
Two patterns. Prefer the specific form - Context7 hosts hundreds of libraries; naming the one you want avoids ambiguity and is faster.
use library /thesysdev/openui to answer: what props does <FullScreen> accept?
use context7 to look up the agUIAdapter signature
The library-reference form (/thesysdev/openui) tells Context7's MCP server exactly which library bundle to query. The broad use context7 form lets Context7 pick - useful for cross-library questions but slower.
What you query
OpenUI MCP answers well for these question shapes:
<FullScreen>props - what does the full-screen chat shell accept?useThread()API - return shape, methods, lifecycle.createLibraryregistration patterns - how do you register a custom
template library in @openuidev?
- AG-UI event types - what events fire on the OpenUI ag-ui adapter?
streamProtocoladapter shape - how do you wire a custom transport?ChatProvidersetup - context provider props and required wrappers.- Conversation state primitives -
useThread,useMessages, persistence
patterns from the @openuidev side (NOT the @crayonai side).
- Component prop drift between Crayon SDK and OpenUI - Context7 has both
libraries; you can A/B them in the same query.
- The C1 vs Crayon SDK vs OpenUI ecosystem split - what's hosted, what's
open-source, what's deprecated.
For a concrete cross-reference, state/skills/crayon-sdk/SKILL.md covers the overlapping ground from the Crayon-SDK angle. The Crayon-SDK skill is the offline reference with battle-tested production patterns (Orbiter-tested, 14 hard-won gotchas in gotchas.md). OpenUI-MCP is the live reference for the latest API surface as it evolves.
When to prefer this over crayon-sdk
| Question shape | Use |
|---|---|
| Latest API signatures, prop names, type shapes (March 2026+) | openui-mcp |
| Production failure modes, race conditions, gotchas | crayon-sdk |
Current streamProtocol adapter contract | openui-mcp |
| Why is my CrayonChat not remounting on conversation switch | crayon-sdk |
Net-new feature that did not exist in @crayonai (e.g. <FullScreen>) | openui-mcp |
| Field-tested integration recipe (SSE wire format, voice composer portal) | crayon-sdk |
When they disagree on API, OpenUI-MCP wins (it pulls from the live repo). When they disagree on a production failure mode, crayon-sdk wins (it has the gotchas that broke real shipped code). When in doubt, query both - the delta itself is informative.
Self-bootstrap rule
Before any work that depends on this skill, verify the MCP wiring is reachable:
test -e "$HOME/.claude/settings.json" || npx -y ctx7 setup --claude
bash state/bin/preflight.sh runs this automatically: if install_check fails, it executes install: and re-verifies. The $HOME/.claude/settings.json sentinel is a v1 honesty gap - it proves the settings file exists but does NOT confirm a context7 entry is wired in. A future enhancement could be a small state/bin/openui-mcp/check.sh that greps the settings file for "context7" and exits non-zero if absent. Tracked in this skill body, not yet a Critical Rule.
Gotchas
- First-run OAuth is interactive. Sandboxed subagents cannot complete it.
Brief subagents to fail fast with a clear error if install_check fails; the user runs setup once on the dev machine.
- **
~/.claude/settings.jsonis shared across ALL agent runs on the
machine.** Once Context7 is wired, every agent runtime that reads that file inherits the MCP server. There is no per-skill or per-project gating.
- MCP support is runtime-dependent. Claude Code: yes. Codex: yes. Cursor:
yes. Gemini CLI: depends on version. Sandboxed agent runtimes that do not speak MCP cannot query Context7 at all - they fall back to the offline crayon-sdk skill.
- The Context7 server is global, not per-snappy-os. If multiple snappy
clones exist on a machine (e.g. a worktree fork), they all share the same MCP wiring. Do not try to install Context7 per-clone; it is a runtime-level artifact.
- Library reference uses
/thesysdev/openuinot/openuior/openuidev.
Context7 library references use /<github-org>/<repo>. Mis-typing returns "library not found" without explanation.
Steps (when invoked as a snappy verb)
- Read this file's "Install" and "Usage" sections to know how to query.
- Verify
~/.claude/settings.jsonexists; if not, runnpx -y ctx7 setup --claude. - From the prompt, use
use library /thesysdev/openui to <question>. - Cross-reference
state/skills/crayon-sdk/SKILL.mdif the question is about
a production pattern (gotchas, SSE wire format, thread persistence).
- Append an eval row to
state/log/evals.ndjsonwithskill: "openui-mcp",
eval_mode: "shape".
Provenance
- Provider: Context7 (https://context7.com), an MCP gateway by Upstash.
- Library reference:
/thesysdev/openui. - Reproducibility:
npx -y ctx7 setup --claude
- Absorbed into snappy-os: 2026-04-28, mirroring the canonical-install
pattern landed for crayon-sdk (commit 5474aea) and the reachability invariant landed for external-dep skills (commit f9fbb34).
Eval
Eval mode is auto-shape (no lib, no sidecar). Auto-shape scoring checks:
- frontmatter (
name,description,eval) is valid AGENTS.mdsibling existsinstall_checkpath ($HOME/.claude/settings.json) is reachable, OR
install command succeeds and the path becomes reachable
AGENTS.md- what the AI loads when this skill comes up
openui-mcp - loader
Per-turn rules for accessing live OpenUI docs via Context7 MCP. Full reference: state/skills/openui-mcp/SKILL.md.
Critical Rules
- Library ref MUST be
/thesysdev/openui- Context7 uses/<github-org>/<repo>. Do NOT use/openuior/openuidev. - Prefer Specificity - Use
use library /thesysdev/openui to <question>instead of broaduse context7to avoid 300+ library ambiguity. - Two-Skill Division - Use
openui-mcpfor API signatures and types; usecrayon-sdkfor production failure modes and battle-tested gotchas. - Subagents cannot bootstrap - OAuth requires a browser. If
~/.claude/settings.jsonis missing, fail fast and prompt the user. - Never bundle OpenUI docs - Always query live. snappy-os carries pointers, not copies, to prevent staleness.
Commands
| ui dashboard | state/skills/openui-mcp/resources/ui.openui |
| operation | command |
|---|---|
| query (preferred) | use library /thesysdev/openui to <question> |
| query (broad) | use context7 to <question> |
| verify install | test -e "$HOME/.claude/settings.json" && grep -q context7 "$HOME/.claude/settings.json" && echo wired |
| reference | state/skills/openui-mcp/SKILL.md |
OpenUI Resource
- Skill-owned OpenUI Lang resource:
state/skills/openui-mcp/resources/ui.openui. Read it before rendering or editing this skill's generated component surface. - Treat this resource as a first-class artifact of the skill, not a generic chat response. Improve it when the skill's user-facing output needs to become richer.
- System resources compose OpenUI primitives and inherit SnappyChat tokens. Use
ui_contract: brandedin SKILL.md only for deliberate platform or client visuals.
Known Pitfalls
- Hallucinating Primitives - Inventing
@Operators(like@Mean) that don't exist in the library. Always check the docs if unsure of a builtin. - Drafting per-shape files - Agents often try to write new
.tsxcomponents for UI. This is a failure. Always use OpenUI Lang composition via[[TOOL:Lang]]. - Positional Arg Confusion - Lang args are positional only. Using
name: valueorname=valuewill break the renderer.
Self-Test
An agent reading this should correctly:
- [ ] Route a question about
<FullScreen>props toopenui-mcp? - [ ] Use the full
/thesysdev/openuipath in the query? - [ ] Recommend a follow-up check in
crayon-sdkfor complex integration patterns? - [ ] Refuse to write a new
.tsxcomponent if the task can be achieved via Lang primitives?
Self-report
If this loader fell short, append a line:
echo "[$(date -u +%FT%TZ)] openui-mcp: <what was missing>" >> state/log/loader-feedback.logapi.ts- the code it can call
⚠ no api.ts - this skill has no typed action surface
scripts- helper scripts it can run
prose-only skill - 4 inline code blocks live in SKILL.md above (no state/bin/ sidecar yet).
how we check it- the checks, plus the last 3 runs
| timestamp | verb | score | primary_issue | artifact |
|---|---|---|---|---|
| 2026-05-01 06:29Z | - | 1.00 | - | - |
| 2026-05-01 06:29Z | - | 1.00 | - | - |
| 2026-05-01 06:29Z | - | 1.00 | - | - |