跳到正文
cccskills
免费在 GitHub 公开

add-blocks

Find, 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-*.

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md7.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Add and maintain blocks

Blocks are shadcn registry items: React source the shadcn CLI copies into the app. They are generated copies. The app installs them, configures them through props and theme tokens, and updates them with one command. It never edits them.

Prerequisites: React 19, Tailwind v4, a components.json with a Base UI style (only base-nova is supported), and @hachej/boring-ui-kit installed (the boring-ui-blocks command is its bin). A new app starts with npx shadcn@4.21.5 init -t vite -b base -p nova -n app -y --no-monorepo.

Run every command in the directory that holds components.json, or pass --cwd <dir>.

Find a block

The registry for version <v> is https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@<v>/r/. The installed kit ships the same items in node_modules/@hachej/boring-ui-kit/r/. List them with their descriptions:

node -e "const r=JSON.parse(require('fs').readFileSync('node_modules/@hachej/boring-ui-kit/r/registry.json','utf8'));for(const i of r.items)console.log(i.name.padEnd(18),(i.description??'').slice(0,90))"

Pick by placement (full table):

NeedBlock
The conversation only, in your own layoutpi-chat
A floating bar over an existing sitepi-ambient (brings pi-chat, pi-workspace)
Chat plus a resizable artifact panelpi-workspace (brings pi-chat)
A whole agent page: sessions, chat, viewerspi-app (brings pi-chat, pi-workspace, viewers)
One agent above any app, drawer on phonesapp-shell (brings pi-chat, feedback, sidebar, avatar, drawer, dropdown-menu)
Chat and files in resizable docksdock
The Library and file history alonefile-tree, documents, version-history
Viewers for agent artifactsviewers, markdown-editor, html-viewer, mockup-viewer, diagram-viewer, maquette-viewer, record-viewer, board-viewer, task-list-viewer
User feedback (point, dictate, send)feedback, feedback-preview
Model and key pickerprovider-setup
Floating utility windowswindows

Install

npx boring-ui-blocks add https://cdn.jsdelivr.net/npm/@hachej/boring-ui-kit@<v>/r/pi-app.json
  • Use the same <v> as the installed @hachej/boring-ui-kit (npm ls @hachej/boring-ui-kit).
  • add runs npx -y shadcn@4.21.5 add <args>, then records every file under components/ui in SHADCN-GENERATED.json. Use it for plain shadcn components too (npx boring-ui-blocks add dialog).
  • pi-chat, button, dock, feedback, app-shell, windows and agent-target install no tokens. If the app has no shadcn tokens yet, add .../r/theme.json in the same command. The theme keeps tokens the app already defines.
  • When the CLI installs tooltip, wrap the app in TooltipProvider from @/components/ui/tooltip.
  • After a plain npx shadcn add, run npx boring-ui-blocks manifest to record the files.

Files land in src/components/<item>/ (one folder per item) and src/components/ui/.

Configure, never edit

Change a block only through these extension points (source):

To changeUse
Colours, radius, fonts, dark modeThe theme tokens in the app's CSS. --shell and --overlay are the kit's own tokens
Any word, or Frenchlabels (partial) and locale="fr"
Icons, header, panel, message or row actionsicons, headerActions, panelActions, messageActions, conversations.rowActions
Your own artifact type and rendererartifacts.kinds on PiChat/AmbientChat, artifactKinds on AgentWorkspace
A viewer for a file kindviewers on AgentWorkspace
Something under or inside the composerbelowComposer, tools
How a tool result rendersrenderTool, renderEntry, groupTool, replyFooter

Example: rebrand words and add a header action.

<AgentWorkspace
  {...props}
  labels={{ sessionsTitle: 'Notes' }}
  chat={{ labels: { title: 'Notes assistant', placeholder: 'Ask about your notes' },
          headerActions: [{ id: 'help', label: 'Help', icon: LifeBuoyIcon, onSelect: openHelp }] }}
/>

Theme rules (BORING-UI-1):

  • Set core tokens (--background, --foreground, --primary, --muted, --border, --ring, --radius, …) in :root and .dark of the app's CSS.
  • Do not override a block's CSS, set --boring-editor-* or --boring-html-*, or edit copied shadcn components.
  • In app code, use token utilities (bg-primary, rounded-md, text-sm), never literals (#hex, bg-red-500, rounded-[7px]) or dark: variants.

A change no extension point covers is a feature request for this repository, not a local edit.

Update

Check first, because update overwrites edited copies:

npx boring-ui-blocks check --design src
npm i @hachej/boring-ui-kit@<new> @hachej/boring-agent@<new> @hachej/boring-files@<new>
npx boring-ui-blocks update --dry-run    # prints the shadcn command
npx boring-ui-blocks update

update reinstalls every installed block from the installed kit's version (--version <v> or --registry <url> to choose), runs the CLI with --overwrite --yes, rewrites the manifest and keeps your package.json version specifiers. Read the top of MIGRATING.md for the target version before upgrading.

Fix a failing check

Each violation is one line <check> <rule> <file>[:line:col] <detail>. Exit 1 means violations, 2 a usage or configuration error.

Line starts withMeaningFix
blocks editedA block file differs from the installed kitMove the change to an extension point, then npx boring-ui-blocks update
design color, design arbitrary-value, design border-width, design font, design literal-value, design darkApp code uses a literalUse a token utility or set the token in the theme
ui edited, ui unrecorded, ui missingA file under components/ui changed outside the CLIRe-add it with npx boring-ui-blocks add <name>, or run manifest after a deliberate npx shadcn add

Never add an allowlist or change the rule; fix the app.

Verify

  1. npx boring-ui-blocks check --design src prints ok @hachej/boring-ui-kit@<v>: ... and exits 0.
  2. npx tsc -p tsconfig.app.json --noEmit and the app build pass.
  3. The page renders the block in light and dark mode at phone and desktop widths.
  4. git diff src/components after an update shows only kit changes, never local edits.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Give 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.

中文简介正在准备中。当前显示原文说明。

hachej/boring-ui492026年10月23日 更新

boring-pm

免费

The domain expert's product manager in a project repository run by the Boring Factory. Use when the expert brings a need or an idea, wants to clarify, change or resume a feature ("reprends la fiche"), asks what is happening with a feature, has a builder's question to answer, or has a preview to try and accept. Interviews one question at a time, writes the contract and mockups on the contract pull request, and submits the expert's approval only after the expert confirms. Never writes code.

中文简介正在准备中。当前显示原文说明。

hachej/boring-ui492026年10月23日 更新

boring-ui

免费

Entry 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.

中文简介正在准备中。当前显示原文说明。

hachej/boring-ui492026年10月23日 更新

Build 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.

中文简介正在准备中。当前显示原文说明。

hachej/boring-ui492026年10月23日 更新

查看 hachej 的全部技能

报告此技能的问题