intelligent-ui
Skill13 starsChanged 11 days agoMITView on GitHub
Answer with UI in DSH: explanations stay Markdown with a complete OpenUI Lang program inside an `openui` fence where a visual or interaction helps; call `render_ui` for a standalone interactive page/dashboard/tool/form/game/editable result, or alongside inline UI when both roles differ. Use for structured answers when Intelligent UI is on; the model decides the delivery form per answer and loads this skill only when it renders UI. If render_ui is missing, answer in prose.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- AbdoKnbGit/cc-notebooktheir own version, first seen Nov 29, 2026
- razorback16/cc-intelligent-uitheir own version, first seen Oct 20, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- razorback16/cc-intelligent-ui★ 148same name
- AbdoKnbGit/cc-notebook★ 8same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- release-iuiSkill
- sync-iui-docsSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 4 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
When the injected prompt says "Free-form layout is on for this deployment", the design playbook below is advisory rather than a template.
- Very specific: line 25
Inline UI — the normal form for explanations: Keep the answer in Markdown.
- Very specific: line 26
A standalone page artifact — for a deliverable: Call render_ui once when the user asks for a standalone page, dashboard, tool, form, game …
- Very specific: line 27
Both forms — when the answer has two distinct jobs: Keep the explanation in Markdown with inline fences and call render_ui once for a …
- Distinctive: line 28
Plain text: When no UI helps, answer in Markdown and stop.
- Distinctive: line 36
Only open a fence when UI beats Markdown: Use inline UI for interactive controls/calculators, SVG mechanism diagrams, charts, maps, visual …
- Distinctive: line 54
When you render a standalone page artifact, follow the effective session style from the injected prompt (inline fences ignore the session …
- Very specific: line 90
Fatal error: read every finding after render_ui:, fix all of them, and retry at most twice.
- Very specific: line 97
Every referenced name is declared, and every non-root statement is reachable from root.
- Very specific: line 98
Use only the shipped vocabulary: 57 components, 14 core + 59 library @functions, 5 action steps — exact names, case-sensitive.
- Very specific: line 100
No control flow: cond ? a : b picks values or components, null hides a block, @Each repeats.
- Very specific: line 125
Before calling render_ui (or closing an openui fence), double-check the top failure causes:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Intelligent UI
An answer can take four delivery forms: plain Markdown, inline UI, one standalone page artifact, or an inline explanation plus one page artifact. Inline programs live in a fenced openui block (rendered in place); a standalone page lives in a render_ui call (rendered at the end of the turn). In an enabled session the plugin injects the full OpenUI Lang prompt (components, functions, syntax); this skill adds the workflow, composition rules, and focused references.
Before you start: is the session enabled?
The extension is opt-in (Plugin detail page sets global defaults; the composer UI chip overrides enablement and style per session). Infer state from the request:
render_uiis in your tools andtool:intelligent-uiis present → enabled. Choose among the four delivery forms.render_uiis absent → off for this session or host services did not load. Answer in prose. If UI would genuinely help, say once that the user can pick This session only (仅本会话) in the composer UI chip, run/iui on, or enable globally on the Plugin detail page. Never fake a card or repeat the ask.- Explicit invocation is a directive: when the user invokes
/intelligent-uior explicitly asks for a page, dashboard, card, tool or UI, use this skill — inline UI for an explanation,render_uifor a standalone deliverable, or both when the request has both jobs; prose only if the user also asked for text or the tool is unavailable.
When the injected prompt says "Free-form layout is on for this deployment", the design playbook below is advisory rather than a template.
Decide the delivery form
The decision policy is owned by the injected tool:intelligent-ui prompt; this skill applies it rather than restating it. Choose one of four forms per answer:
- Inline UI — the normal form for explanations. Keep the answer in Markdown; wherever a visual or interactive block helps, place one complete program in a fenced code block whose info string is exactly
openui. Norender_uicall needed. - A standalone page artifact — for a deliverable. Call
render_uionce when the user asks for a standalone page, dashboard, tool, form, game or editable result, or invokes the skill for that deliverable. - Both forms — when the answer has two distinct jobs. Keep the explanation in Markdown with inline fences and call
render_uionce for a separate usable page; never duplicate the same content in both. - Plain text. When no UI helps, answer in Markdown and stop.
Prefer the simplest form. Every ordinary session style (Auto, Card, Article, or a saved template) still allows all four delivery forms; the session style only sets the layout when you call render_ui (Card/Article/template pin that layout; Auto lets you choose Card, Article, or free). At most one page artifact per answer; never fake a page with HTML.
Inline UI in ordinary answers
Ordinary explanations use Markdown with inline UI by default (no separate inline switch; already-written fences keep rendering even if the session switch is later turned off). Place each complete program (root = …) in a fenced code block whose info string is exactly openui:
- Only open a fence when UI beats Markdown. Use inline UI for interactive controls/calculators, SVG mechanism diagrams, charts, maps, visual flows, or checkable lists. Keep a plain static comparison table or simple bullet list in regular Markdown.
- Keep inline blocks compact and shell-less. The inline surface already frames the block, so do not wrap the root in an outer
Card; usesmormdtitles instead of2xl/3xlhero headings; aim for ~3–18 statements. - Multi-fence isolation & theme. You may place multiple
openuifences in one answer, keeping prose outside them. Each fence renders in its own isolated scope —$state and data declarations are not shared across fences — and inline blocks follow the chat theme rather than a saved custom template theme. - No Host preflight. While streaming, a fence stays a plain code block; once settled it renders in place. Fatal failures show a fallback note; partial drops keep the usable block with a compact warning. Keep inline programs focused and flat rather than large experimental compositions. Inline blocks keep component interaction and
@ToAssistantfollow-ups, but have no card editing, revision history, template saving, or export; their source stays in the message text.
Example (compact shell-less inline timeline — use List(..., true) instead of inventing a Timeline component):
```openui
root = Col([Title("Request lifecycle", "md"), steps])
steps = List([ListItem("Route", "Match session & policy", "1"), ListItem("Stream", "Emit Markdown and openui fences", "2"), ListItem("Settle", "Render inline blocks in place", "3")], "none", true)
```More validated interactive inline examples (SVG stepper, interactive calculator): references/examples.md.
Answer styles (for standalone render_ui pages)
When you render a standalone page artifact, follow the effective session style from the injected prompt (inline fences ignore the session style):
- Card — compact, scannable interactive page. Keep sections tight; do not turn a broad request into a long article.
- Article — article-first reading page inside the card: a short coverage summary, a reachable
Toc, and collapsibleSectionblocks with substantialMarkdownprose (specific facts, causes, examples or debates — never a skeleton or "tell me which part to expand"). The Host rejects an article call without bothTocandSection. KeepSectionanchors unique (Section(title, children, anchor?)+Toc(items, anchors?)). - Free template — when the session selects a template with
baseLayout: "free", compose the user-requested layout without a Card/Article shell.TocandSectionare optional; passstyle: "free"plus the exact selectedstyleId, withouttemporaryStyle. The renderer applies the template theme and retains the DSH card header. - Auto — choose among all four delivery forms (plain text, inline UI, one page artifact, or inline explanation + one page artifact); when rendering a page artifact, pick Card for compact interactive pages, Article for 详尽/深入/全面/长文/报告/综述 answers, or free when neither shell fits (
TocandSectionoptional). - Document (experimental) — see next section.
Document mode (experimental)
A deployment may enable document mode (Plugin detail page → Experimental). When the injected tool:intelligent-ui prompt opens with the document contract:
- For an ordinary answer that benefits from a page, write the whole answer as one complete program (prose, headings, tables, code and interactive/visual blocks in reading order).
- Pass
style: "free", omitstyleIdandtemporaryStyle, callrender_uionce, and stop — write no Markdown outside the call and do not use inlineopenuifences. If no page serves the answer, answer in plain Markdown. - The client renders it without card chrome (still a turn-tail result: copy/search/transcript export omit it, and there is no editing or revision history).
- For ordinary answers, document mode overrides the session's answer style (including any selected saved template). On-demand results and Artifact edit requests keep their own recorded card contract and layout.
Conditional workflows (read the linked reference when triggered)
On-demand generation and custom templates
Triggered when the prompt carries an ON-DEMAND UI note or a selected custom style template (styleId). Ground missing content with ask_user_question first, compose the user-requested layout directly (If the layout is materially unclear, ask one focused layout question), pass style: "free" + complete temporaryStyle (omitting styleId) for new on-demand generation, and do not use inline openui fences in a bound on-demand turn. Read references/on-demand.md for the full snapshot schema, theme contrast rules, clarification loop, and adjustment/template contracts.
Artifact block edits
Triggered when the latest user message carries one or more <artifact-edit-request> envelopes. Route targeted block content edits and nested additions to edit_ui_blocks (mini program root = Col([...]) with only the target expressions in request order — never rewrite the full page); route order-only, global-only, nested orderByParent, and kind: "style" requests to render_ui (with editRequestId). Read references/artifact-editing.md for exact rules on nested blocks, strict mode, multi-artifact batches, and recorded styles.
Workflow (standalone render_ui pages)
- Outline & choose the medium. For Article, outline every major part and its concrete facts/examples first. For Card, pick 1–3 hero blocks (
Chartfor trends/categories,Tablefor exact comparisons,Map+MapMarkerfor places/routes,SearchImage/Imagefor visuals,Svgfor mechanisms,SegmentedControl/Slider/Pressablefor choices,Flashcard/HtmlViewfor learning/games). - Design the state model. List 2–6
$variables with literal defaults; every control must have a visible consumer, and derived values belong in ordinary statements (total = @Sum(...)), never$state. When revising an earlier page, keep its$names and re-seed chosen values. - Write in stable order.
root = Col([...])first →$declarations → component statements → data statements last. One statement per line. - Call the tool. Call
render_ui({ program: <the complete program>, style: <"card"|"article"|"free">, title: "Short noun phrase" }). AddstyleId(withouttemporaryStyle) for a selected saved template, ortemporaryStylefor a bound on-demand turn. When the page is the whole answer, write at most one short intro sentence before the call and at most one short closing sentence after; when it accompanies an inline explanation, write the Markdown explanation and itsopenuifences first without duplicating page content. Never paste therender_uiprogram into prose.- The call is the preflight. It validates the program and never partially renders a rejected call; fix fatal findings and retry at most twice in the same turn, then fall back to text. Keep the extension checkout read-only while answering (never write drafts or build output into the plugin's tree, including
test/renderer/.build/; use a temporary directory outside the repository). Hard rule 12 carries the full version.
- The call is the preflight. It validates the program and never partially renders a rejected call; fix fatal findings and retry at most twice in the same turn, then fall back to text. Keep the extension checkout read-only while answering (never write drafts or build output into the plugin's tree, including
- Handle the result.
- Success (no warnings): done; do not re-call.
- Success (with warnings): page is already on screen; do not re-call in the same turn. Mention significant dropped content briefly for a follow-up (for further style changes on a temporary result, the user can open the card's Edit canvas under Style → Change style, or re-arm Adjust style on older Hosts).
- Render-time component crash: contained to that subtree (
render_uistill reports success); when the user reports a blank area, simplify that block on the next turn. - Fatal error: read every finding after
render_ui:, fix all of them, and retry at most twice; if still failing, fall back to text and say so. - Tool missing: answer in prose and see references/integration.md.
Hard rules (OpenUI Lang)
- One program, one statement per line:
name = expression. Starts withroot, which must evaluate to a component (conventionallyCol). - Arguments are positional. Omit optional arguments from the end; skip middle ones with
null. Named syntax (children: [...]) is rejected. - Every referenced name is declared, and every non-root statement is reachable from
root. - Use only the shipped vocabulary: 57 components, 14 core + 59 library
@functions, 5 action steps — exact names, case-sensitive. Never invent@If,@Map,@Length, or components. $state is declared with literal defaults. Inputs bind their first argument to$var; only actions (@Set,@Reset) mutate state.- No control flow:
cond ? a : bpicks values or components,nullhides a block,@Eachrepeats. No user-defined functions, no string interpolation — concatenate with+. @Each(array, "x", template): inline the template (the loop variable exists only inside it).- Format numbers/dates for humans with
@Format/@Plural/@FormatDate; relative dates start from@Today(), ordered with@DaysBetween(a, b) > 0. - Complete programs only: no
..., no TODO, no placeholder comments. - One successful
render_uicall per turn (rejected calls may be retried). - Inline fences and page artifacts may coexist when roles differ: each
openuifence holds one complete program, an answer has at most one page artifact, and content is never duplicated in both. - Keep the extension checkout read-only while answering. Never add scratch programs, tests, fixtures or build output under the skill base directory or the plugin's source tree (including
test/renderer/.build/).render_uiis the preflight; save drafts in a temporary directory outside the repository. Only an explicit request to develop the extension lifts this rule.
Exact signatures/enums: references/components.md. Syntax & wrong-vs-right snippets: references/language.md.
Design playbook
The compactness rules below apply to Card pages and side cards inside an Article (not Article prose). For Free-form layout, Auto-chosen free layouts, authorized free results, and selected free templates, page shape and typography guidance is advisory while language, theme, and safety rules still apply.
- Layout and spacing contract. The renderer owns vertical rhythm (section 24 / group 12 / inner 8). Leave
gapunset on the page rootCol,Sectionchildren, andCardcontents; usegaponly onRow,Grid,Carousel, a listCol(2–3), and compact control stacks (1–2 inner, 3–4 grouped). Never create vertical space withSpacer(), emptyBox/Col/Card/Text/Markdown, or a blankDivider. Do not wrap a whole Section body in a manual-gapCol, and do not put a whole Card/Article page side by side. The Host warns about root gaps, vertical Spacers, empty Sections/Text, andgap: 0block stacks. - Article layout. One readable column:
Title(xl/2xl), shortTextsummary,Toc, then collapsibleSectionblocks with substantialMarkdownprose first and at most a couple of supplemental blocks. Never hide core reading content behind aCarouselor skeleton bullets. - Card hierarchy.
Title(xl/2xl), one shortText, then 2–4 mixed blocks grouped inCards (never wrap the whole page in one card). Inside aCard,Gridcell, orCarouselitem, titles are capped (lg18 →3xl30px) and bodyTextis 15px: usemd/smfor card titles andxlonly for a KPI number. Typical Card page: 20–80 statements (cut blocks past ~120); Article pages are content-driven. - Media rows & thumbnail lists. Keep
SearchImageto ~1–3 feature photos per page (exact 2–4 word subjects), never one per list row. For a photo beside copy, wrap it inBox([SearchImage(..., 1.33)], ..., width)and top-align theRow. For repeated lists/rankings useTableorList; if rows genuinely need thumbnails, leave the listColgap unset (or 2–3), center-align (Row(..., 2, "center")), size thumbnails explicitly (Box(..., 44)), and give ranks a fixed26pxBoxso 9 and 10 align. - Use the file path for an image you already have. Pass workspace-relative (
Image("figures/chart.png", "Quarterly revenue")) or absolute paths for local PNG/JPEG/WebP/GIF files directly toImageor Markdown. Never start a local HTTP server or invent a URL. Missing/unsupported/SVG local files render a clear error placeholder;HtmlViewcannot load local paths. - Draw the mechanism, don't describe its shape. For processes, loops, request paths or state machines, lead with a labeled
Svgdiagram (viewBox ~240 wide, tokens for strokes/fills,SvgTextlabels,Line+Polygonarrows), driven by$stepwhen interaction teaches the sequence. - Self-running & guarded. Compute all totals/filters locally with
@functions. Guard numeric inputs with@Clamp(@Default($n, 1), 1, ...)and guard divisions with$n > 0 ? ... : 1.@ToAssistantforwards only the message string (not the optionalcontextobject), so interpolate needed values directly into the short first-person string. - Theme & DSH chrome. Use semantic
Colortokens (auto light/dark; avoid hardcoded white/black). Turn-tail cards render at turn end (full chat width; useGridminChildWidthandRowwrap, avoid fixed widths >600px). UseHtmlViewonly when components +Svgcannot express a canvas game or animation loop (sandboxed opaque iframe; script/style/font CDNs + https images only; no shared state).
Common pitfalls & quick pre-flight
Before calling render_ui (or closing an openui fence), double-check the top failure causes:
- Positional args only (no
key: value, no extra args; usenullto skip middle optional args). - Inline
@Eachtemplates (never extract to a separate statement); declare every$binding and connect every control to a visible consumer. - Exact keys/types:
Chartkeys match row keys (key/valuefor@GroupBy/@Bucket);MapMarker(label, lat, lng)order; strings forTitle/Text($n + ""or@Format);@DaysBetweeninstead of<on dates. - Respect the spacing contract (no root/Section/Card
gap, no manual verticalSpacer()), feature-photo discipline (noSearchImageper list row), and read-only checkout rule.
Reference index
| File | Read it when |
| references/components.md | You need an exact signature, default, enum, optional argument position, or the full list of 57 components, 73 functions and 5 action steps. |
| references/language.md | You are unsure about syntax, hoisting, $ state, actions, @Each, comments, coercion, or want wrong-vs-right snippets. |
| references/examples.md | You want validated interactive inline examples or complete page programs (itinerary, calculator, SVG tutorial, dashboard, form, quiz + HtmlView, detailed article). |
| references/on-demand.md | The prompt carries an ON-DEMAND UI note or selected custom template (styleId), or you are adjusting a temporary-style result. |
| references/artifact-editing.md | The user message carries one or more <artifact-edit-request> envelopes (block edits, nested additions, reorders, or style edits). |
| references/troubleshooting.md | A call failed, carried warnings, rendered wrong, or media/map/HtmlView degraded (verbatim host errors + retry loop). |
| references/integration.md | Installing/adopting the extension, render_ui or the skill is missing, or you need the render_ui/edit_ui_blocks tool contracts and limits. |
Resolve all links relative to the skill's base directory.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

