Scaffolds a minimal React + Node app with an AI agent using Boring UI, or adds agent chat/copilot to an existing app. Covers server setup, UI blocks, and wiring.
Ships in boring-ui-kit. 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.
Read when SKILL.md points to them.
The smallest whole agent app is one Node server (about 90 lines) and one React page (about 50 lines). The repository's reference is examples/workspace-app. This skill gives the same composition with nothing repository-internal.
Shape of the result:
server.mjs): opens Pi's Harness, one workspace provider and one agent, and serves three routes: /api/conversations, /api/chat, /api/resources.src/App.tsx): the pi-app block's AgentWorkspace (sessions, chat, artifact viewers) over those routes.npm view @hachej/boring-ui-kit version
Use that version (written <v> below) for every @hachej/boring-* package and every registry URL. Pi packages stay on ~1.6.0.
A new app uses the pinned shadcn CLI with Base UI and the nova preset (blocks support the Base UI base-nova style only):
npx [email protected] init -t vite -b base -p nova -n app -y --no-monorepo
cd app
An existing app needs React 19, Tailwind v4 and a components.json with a Base UI style. Without one, run npx [email protected] init in it first.
npm i @hachej/boring-ui-kit@<v> @hachej/boring-agent@<v> @hachej/boring-files@<v> \
@earendil-works/pi-durable@~1.6.0 @earendil-works/pi-ai@~1.6.0 @earendil-works/chord@~1.6.0
Blocks use the app's own shadcn components (its ui alias) and tokens, so install the components once first (what the app needs). Then pick the block from the table in registry/README.md. For a whole agent page:
npx boring-ui-blocks add alert attachment avatar badge bubble button card checkbox collapsible dialog drawer dropdown-menu empty input input-group item label message message-scroller native-select popover progress scroll-area separator sidebar spinner switch table textarea toggle toggle-group tooltip trace
npx boring-ui-blocks add https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@<v>/r/pi-app.json https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@<v>/r/pi-app-kinds.json
Add .../r/theme.json once if the app has no shadcn tokens. This copies pi-app, pi-app-kinds (the default artifact kinds and their viewers), pi-chat and pi-workspace into src/components/, and writes SHADCN-GENERATED.json. Never edit those files; see the add-blocks skill.
Other placements use the same server:
| Placement | Block | Component |
|---|---|---|
| Whole page: sessions, chat, viewers | pi-app | AgentWorkspace |
| Floating bar over an existing site | app-shell | FloatingComposer |
| One agent above any app (phone drawer, desktop panel) | app-shell | AppShell |
| Only the conversation, your own layout | pi-chat | PiChat |
Copy references/server.md to server.mjs. In order, it:
createModels() from @earendil-works/pi-ai/models, then models.setProvider(openaiProvider()) (reads OPENAI_API_KEY).createFolderEnv (@hachej/boring-execution/folder: Pi's NodeExecutionEnv with no-follow file access) over a directory, openNodeConnection + createWorkspaceJournal, then one createWorkspaceProvider({ identity, fs: env, journal }).defineAgent({ id, model, instructions, tools: [createPresentTool({ workspace })], extensions: [fileTools, createFileGuard({ workspace })] }). fileTools is Pi's own createReadTool, createWriteTool and createEditTool in one defineExtension; the guard routes them through the provider.agent.install(registry), Harness.open(storage, { registry, models, env: () => env }, context), createConversations({ harness, context }), harness.resume().authenticate/resolve:
createConversationsHandler({ conversations, authenticate }): authenticate returns { owner, start }.createChatTransportHandler({ authenticate }): authenticate returns { conversation, context, abortSubmission }.createRevisionHandler({ resolve }): resolve returns { provider: files, access }.webRequest and sendWebResponse from @hachej/boring-files/node-http, and closes everything on SIGINT/SIGTERM.Replace the development bearer check (allowed) with your own authentication before anything leaves your machine.
Copy references/page.md to src/App.tsx. It:
connectRevisionProvider({ endpoint, fetch }) from @hachej/boring-files/revision;useConversations({ endpoint, fetch, activeId, onSelect });useRemoteChat({ conversationId, endpoint: id => ..., fetch, identity });<AgentWorkspace artifactKinds={defaultKinds()} conversationId conversations revisionProvider controller chat /> inside TooltipProvider (defaultKinds from pi-app-kinds, built once outside render).Pass controller={chat.status === 'ready' ? chat.controller : undefined} and chat.actions (question and approval answers) only when ready. The identity (runtimeId, scopeId, principalId, initiatorId) must match the access the server resolves.
Add a proxy to vite.config.ts so the page reaches the server on the same origin:
server: {
// Development only: forward the API and add the server's dev bearer token.
proxy: { '/api': { target: 'http://127.0.0.1:8787', headers: { authorization: `Bearer ${process.env.APP_TOKEN ?? 'dev-token'}` } } },
},
Run both:
OPENAI_API_KEY=... node server.mjs
npm run dev
Open the page and click Draft a plan. The agent writes a Markdown file and present opens it in the panel.
present, the file guard and the revision route all get the same files.import() them into the server.node server.mjs prints API on http://127.0.0.1:8787.APP_TOKEN=dev-token; curl -H "authorization: Bearer $APP_TOKEN" http://127.0.0.1:8787/api/conversations returns {"conversations":[...]}; without the header it returns 401.npx tsc -p tsconfig.app.json --noEmit reports nothing in src/App.tsx, and npx vite build succeeds.npx boring-ui-blocks check --design src prints ok.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/add-blocksFind, install, update, check and theme Boring UI registry blocks (shadcn items such as pi-chat, app-shell, pi-workspace, pi-app, app-shell, viewers, file-tree, documents, feedback, windows) with the boring-ui-blocks command. Use when asked to "add a chat/agent block", "install pi-app", "upgrade/update the Boring blocks", "boring-ui-blocks check fails", "blocks edited", "restyle/rebrand the agent UI", "change the chat labels/icons/actions", "dark mode for the chat", or when tempted to edit a file under src/components/pi-*./agent-capabilitiesGive a Boring UI in-app agent capabilities and gate them safely - custom tools, workspace file access (file guard, present), Approve/Deny approvals, ask_user questions, sub-agents (delegate), schedules, sandboxes and self-evolving tools. Use when asked to "add a tool to the agent", "let the agent edit files", "require approval before X", "ask the user a question", "add a sub-agent/delegate", "schedule a follow-up/reminder", "dry-run/sandbox the agent", "let the agent write its own tools", or when choosing which tools to gate with requireApproval or createApprovalExtension./app-layout-and-agentLay out a Boring UI app and place its agent. Use for AppShell (layouts screen, workspace, chat), nav items, ListDetail, screen headers, the phone tab bar or sheet, the collapsed left pane, where the agent lives (shell layer, full page, embedded screen, ambient bar, placed), and for customising the chat from the app side (AgentSpec, chatProps, labels, conversations, mentions beyond files, tool cards, natural presentation). Pick this before writing any layout code or any PiChat prop./boring-design-systemHow every Boring app gets its look: theme tokens plus the app's own components built from kit parts, checked by one command. Use for any UI work in a Boring app (a new screen or component, restyling, rebranding, dark mode, phone layout, "make it look like X") and whenever `boring-ui-blocks design` reports a design-* or kit rule. Takes precedence over generic design skills on fonts, colours, icons and libraries./boring-uiEntry point for building with Boring UI (the @hachej/boring-* npm packages and shadcn registry blocks for apps with an AI agent inside, on the Pi agent harness). Use when a task mentions boring-ui, @hachej/boring-ui-kit, @hachej/boring-agent, @hachej/boring-files, boring-ui-blocks, PiChat, AgentWorkspace, FloatingComposer, AppShell, or asks to "add an agent/assistant/chat to my app", "build an app with an agent inside", or "use the Boring kit". Explains the packages, the rules every change must follow, and which boring-ui skill to load next./boring-ui-kit:build-agent-appfrom boring-ui-kit
boring-ui-kit@boring-stack is listed by hachej/boring-stack — review the source before installing
npx claudepluginhub hachej/boring-stack --plugin boring-ui-kitOther plugins' skills for the same job