/ceh-ag-ui:add-canvas-componentfrom ceh-ag-ui
Load this skill when adding or changing a component in an AG-UI canvas catalogue: a card, chart, or form the agent can place on screen. Trigger on "add a component the agent can show", "let the agent render a <thing>", or an edit under `catalogue/`.
Ships in ceh-ag-ui. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A catalogue entry does three jobs: it is a tool the agent can call, a schema the canvas
enforces, and a component the theme styles. Get all three right, or the agent calls the wrong
component, sends content it cannot render, or ends up controlling how it looks. The work is done when the five checks in step 3 pass and
bun run typecheck is clean.
Check the existing catalogue first. A new entry costs tokens on every run, since the whole catalogue is sent as tools each time. It also gives the agent one more option to confuse with the others.
show_table.One file per component in catalogue/, registered with one line in catalogue/index.ts. Every
part of it follows the Rules below:
import { z } from "zod";
import { card, cardTitle } from "../ui";
import { defineComponent } from "./define";
export const timeline = defineComponent({
name: "show_timeline",
description:
"Dated events in order. Use when the user asks what happened when; use show_table for records without an order.",
schema: z.object({
title: z.string(),
events: z
.array(
z.object({ date: z.string().describe("ISO date"), label: z.string() }),
)
.min(1)
.max(20),
}),
example: {
title: "Launch",
events: [
{ date: "2026-03-01", label: "Beta" },
{ date: "2026-05-10", label: "GA" },
],
},
Component: ({ title, events }) => (
<article className={card}>
<h2 className={cardTitle}>{title}</h2>
<ol className="flex flex-col gap-1">
{events.map((e) => (
<li key={e.date + e.label}>
<span className="font-mono text-muted-foreground">{e.date}</span>{" "}
{e.label}
</li>
))}
</ol>
</article>
),
});
With the mock agent and the canvas running (see the template README.md):
show_timeline {"title":"x","events":[{"date":"2026-01-01","label":"y"}]}
renders.show_timeline {"title":"x"} is refused, and the chat shows which field failed."style":{"color":"red"},"className":"x" to the arguments from check 2.
The component renders exactly as it did in check 2.theme.css in place. This proves
it uses only tokens.Then run bun run typecheck. The Component props are inferred from the schema, so a mismatch is a
type error, not a runtime blank.
show_<noun> in snake_case. defineComponent rejects anything else, and LLM tool APIs reject
spaces and dots. The mock agent listens for the part after show_, with underscores turned into
spaces ("show a timeline"). Pick a noun a user would actually say.
The agent chooses a component from its description alone. Say what the component shows and when to pick it instead of its nearest neighbour in the catalogue: "use show_table for records without an order". Give size limits that affect the choice ("up to 12 bars"). If two descriptions could both answer the same request, the agent will pick between them at random.
.describe() wherever
the format is not obvious (units, ISO dates, percent vs fraction).style, className, color, size, variant, width, font…, or
theme. defineComponent throws at startup when it finds one, including inside nested objects
and arrays. Do not rename a styling key to get past the check (accent, look, emphasis). A
reviewer should reject that just as the regex would.tone: "info" | "success" | "warning" | "danger" in show_callout. The component maps each
value to token utilities. The agent picks what the content means, and the theme decides what that looks like..min(1), .max(n) on arrays, .nonnegative() on bar values. Limits keep
a runaway answer from breaking the layout, and the agent sees them in the JSON Schema it receives..default() instead of making the component guess.Keep the example realistic and small. It is parsed against the schema at startup, so an example that drifts from the schema fails loudly. The mock agent sends it when the user names the component. It also shows the agent the expected shape, because it goes out in the tool's metadata.
Build against the theme of ceh-ui-design:design-ui (see Hands off to), shadcn's tokens wired
into Tailwind:
@ui-sdk/react/<name>. Style
it and every other element with token utilities (bg-card, text-muted-foreground,
bg-chart-N, font-mono, tabular-nums) and the shared nova-shaped classes in src/ui.ts
(card, cardTitle, eyebrow, the buttons, input). No hex values, pixel sizes, arbitrary
values such as p-[13px], or inline styles.text-destructive and its
sign carries the direction in words, and a series index picks the bg-chart-N colour, written
as a whole class name so Tailwind finds it.fetch, no global state, and no dangerouslySetInnerHTML with
agent text.<table> with scope. When a visual (bars, dots) carries meaning, show the value as text too.Treat the name and schema as a public API that the agent's prompts and past conversations depend on. Adding an optional field is safe. Renaming or removing a field, or renaming the tool, breaks any agent prompt or few-shot example that uses the old shape. Update those in the same change.
ceh-ag-ui:build-ag-ui.What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/add-human-approvalLoad this skill when an AG-UI agent must stop for the user's decision before an irreversible or costly step (a delete, a payment, a send), using AG-UI 1.0 interrupts and resume. Trigger on "ask the user before", "human in the loop", "approval step"./add-live-state-panelLoad this skill when adding a live panel to an AG-UI canvas: one fixed area the agent keeps updating while it works, wired from STATE_SNAPSHOT and STATE_DELTA. Trigger on "show the agent's progress live", "shared state", "sync state with the agent"./build-ag-uiLoad this skill when starting a generative-UI frontend for an AG-UI agent: a canvas where the agent answers by placing components from a catalogue. Trigger on "build a UI with AG-UI", "generative UI for my agent", or @ag-ui/client with no canvas yet.Other plugins' skills for the same job
npx claudepluginhub cheneeheng/ceh-claude-code-library --plugin ceh-ag-ui