Adds in-app agent capabilities to Boring UI: custom tools, workspace file access, approvals, ask_user, sub-agents, schedules, sandboxes, and self-evolving tools. Use when asked to add tools, gate actions, or delegate.
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.
None: SKILL.md is the whole skill.
Every capability is a native Pi tool or extension that you hand to defineAgent (from @hachej/boring-agent/agents). The host decides what the agent may do. Start from the server in the build-agent-app skill.
const agent = defineAgent({
id: 'writer', model: { provider: 'openai', modelId: 'gpt-5-mini' }, instructions: '...',
tools: [/* tool registrations */],
extensions: [/* native extensions, in order */],
delegates: [/* sub-agents */],
});
agent.install(registry); // before Harness.open
Use Pi's defineTool with parameters as a plain JSON Schema object (as const, so execute gets typed arguments). Return text in output.
import { defineTool } from '@earendil-works/pi-durable';
const lookupOrder = defineTool({
name: 'lookup_order', description: 'Look up a fictional order by its number.',
parameters: { type: 'object', properties: { number: { type: 'string' } }, required: ['number'], additionalProperties: false } as const,
execute: async ({ number }) => ({ output: [{ type: 'text', text: JSON.stringify(await orders.get(number)) }] }),
});
The host's execute owns the data access, credentials and limits. For a tool described by a raw JSON Schema (an MCP inputSchema), use jsonSchemaTool({ name, description, parameters, execute }) from /agents.
createReadTool(), createWriteTool(), createEditTool() (and createBashTool() with a shell) from @earendil-works/pi-durable/tools, in one defineExtension.createFileGuard({ workspace: { files, root, access } }) from /file-guard after that extension. It routes read/write/edit through the workspace provider, refuses writes to files the conversation has not read at their current revision, and records agent edits in file history.createPresentTool({ workspace }) from /artifacts so the agent can open a file in the page.files provider everywhere (guard, present, revision route). Never a second copy.@hachej/boring-agent/workspaces (Workspace per call).Gate a tool so each call waits for the person's Approve or Deny. Deny returns an error starting with DENIED_PREFIX, and the tool never runs. Pending approvals survive a restart.
Gate stock or third-party tools by name with an extension:
import { createApprovalExtension } from '@hachej/boring-agent/approval';
const approvals = createApprovalExtension({ tools: {
write: true, edit: true,
bash: { summarize: args => `Run: ${args.command}` },
http_request: { when: args => args.method !== 'GET', summarize: args => `${args.method} ${args.url}` },
} });
defineAgent({ ..., extensions: [fileTools, createFileGuard({ workspace }), approvals] });
To turn it on for some conversations only, leave it out of defineAgent, call registry.install(approvals), then conversation.configure({ extensions: { add: [approvals] } }) (and remove to turn it off).
Gate a tool you define with requireApproval(tool, { summarize, when? }):
tools: [requireApproval(cancelOrder, { summarize: args => `Cancel order ${args.number}` })]
The chat transport must accept answers, or the card cannot be answered. Return answer from its authenticate:
import { answerUserQuestion } from '@hachej/boring-agent/ask-user';
return { conversation, context, abortSubmission, answer: (callId, answer) => answerUserQuestion(conversation, callId, answer, context) };
The page passes chat.actions from useRemoteChat to the chat (see the build-agent-app page template).
bash is not enough. Pi's write and edit change files without bash. Gate them too, or keep them out of the agent.selfEvolving: true, gating bash is bypassable. Agent-written tools in .agent/tools/*.json run their run command through the conversation's ExecutionEnv.exec, not through the bash tool, so a bash gate never sees them. The agent can write such a tool with write, call reload, then run any command. Gate write and edit (the way into .agent/), and choose an ExecutionEnv whose isolation you accept, because isolation is where exec runs (SELF-EVOLUTION.md).run_code); its nested calls cannot reach a person. Give it read tools only and filter with isApprovalGated(tool).summarize text is what the person approves: make it name the effect.import { createAskUserTool } from '@hachej/boring-agent/ask-user';
tools: [createAskUserTool()]
ask_user({ question, options?, allowFreeText?, questions? }) waits durably for the person's answer and shows a question card. It needs the same answer wiring as approvals. Tell the agent in instructions when to ask instead of guessing. Details: Asking the person.
Define the child with defineAgent, then list it in delegates. Each becomes a delegate-style tool; install(registry) installs the child too.
const researcher = defineAgent({ id: 'researcher', model, instructions: 'Read and summarise. Never write.', extensions: [readOnlyFiles] });
const writer = defineAgent({ id: 'writer', model, delegates: [{ agent: researcher, name: 'research' }], extensions: [fileTools] });
The child runs in its own conversation with only its own tools and returns its final text. Give children the narrowest tools. Gates on the parent do not apply to the child: gate the child's tools on the child.
import { createScheduleExtension } from '@hachej/boring-agent/schedule';
defineAgent({ ..., extensions: [createScheduleExtension()] });
The agent gets schedule({ instruction, delaySeconds | at }), list_schedules() and cancel_schedule({ id }). A schedule is a Pi task that sleeps on the Harness clock and then submits the instruction to its conversation, so it survives restarts. Hosts schedule from code with addSchedule, cancelSchedule and listSchedules. On a host with one wake-up timer (a Durable Object alarm), use onDeadline and scheduledDeadline. Details: Sub-agents and schedules.
createSandboxExtension({ tools, flags? }) from /sandbox records calls to mutating tools instead of running them, and blocks any tool it does not name. Select it per conversation as the last wrap, after any approval extension, and check the order with assertSandboxLast(selected, sandbox) over the complete list you pass to conversation.configure({ extensions: selected }). See Approval gate.
defineAgent({ ..., selfEvolving: true, workspace }) lets the agent keep instructions, skills and tools in .agent/ and apply them with reload. Off by default. Agent-written code only runs through the conversation's ExecutionEnv; never import or eval workspace content in the host. Read the gating rules above before turning it on.
execute, resolved per call. Never put them in instructions or tool output.node server.mjs starts and agent.install(registry) throws nothing (a duplicate tool or extension name throws).selfEvolving: true: ask the agent to add a tool in .agent/tools/. The write must ask for approval first.test/packages/agent-ask-user.test.mjs (approvals and questions), test/packages/agent-sandbox.test.mjs (sandbox order).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
agent-capabilities, boring-ui, tool-gating, file-guard, approvals
/boring-ui-kit:agent-capabilitiesfrom 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-kit6 skills in this plugin
/add-blocksFind, install, update, check and theme Boring UI registry blocks (shadcn items such as pi-chat, pi-ambient, 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-*./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, AmbientChat, 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./build-agent-appBuild a React + Node app with an AI agent inside using Boring UI, or add one to an existing app. Use when asked to "create an agent app", "add an AI assistant/chat/copilot to my app", "scaffold a Boring UI app", "wire AgentWorkspace/PiChat to a server", "set up the Pi Harness with the kit", or to connect the pi-app, pi-chat or pi-ambient blocks to defineAgent, createChatTransportHandler, createConversationsHandler and createRevisionHandler. Gives the verified smallest setup (one Node server, one page) and how to extend it.Other plugins' skills for the same job