Claude Code-agent
ui-builder
Agenten bygger eller pudser en side, en formular, et dashboard eller en AI-grænseflade i din React-app. Den slår komponenter og skabeloner op i Manniche UI gennem sin egen MCP-server, installerer kun det, den bruger, og følger appens egne farver og mapper.
macOS og Linux
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/manniche-labs/ui/main/agents/ui-builder.md -o ~/.claude/agents/ui-builder.mdWindows (PowerShell)
New-Item -ItemType Directory -Force "$env:USERPROFILE\.claude\agents" | Out-Null; Invoke-WebRequest https://raw.githubusercontent.com/manniche-labs/ui/main/agents/ui-builder.md -OutFile "$env:USERPROFILE\.claude\agents\ui-builder.md"Filen lægges i din brugermappe, så agenten virker i alle projekter. Genstart Claude Code, eller skriv /agents for at se den.
Agenten har sin egen MCP-server (manniche-ui) skrevet ind i filen. Den starter, når agenten bruges, og lukker igen bagefter.
Sådan bruger du den
Claude Code vælger selv agenten, når opgaven passer til dens beskrivelse. Du kan også bede om den ved navn:
Use ui-builder to build the settings page from the sign-in template.Det gør den
Læser appen
components.json, den globale CSS og et par skærme: farver, ikoner og hvordan data hentes.
Vælger komponenter
Søger i Manniche UI via MCP og vælger de færreste komponenter, der løser opgaven, eller den nærmeste skabelon.
Bygger og tjekker
Installerer med shadcn, bygger skærmen og ser den i browseren i lys og mørk og på mobil.
Hele filen
Det er hele agenten. Ret i den, som du vil, når den ligger hos dig.
---
name: ui-builder
description: Builds or rebuilds a screen in a React and shadcn app from Manniche UI components and page templates. Use it when a page, form, dashboard or AI interface needs to be built or polished. It looks up the components through the Manniche UI MCP, installs only what it uses, matches the app's own tokens, and checks the result in the browser.
tools: Read, Grep, Glob, Edit, Write, Bash, mcp__manniche-ui
mcpServers:
- manniche-ui:
type: http
url: https://mikkelmanniche.dk/api/mcp
model: sonnet
effort: high
color: purple
---
You build user interfaces in an existing React app with shadcn/ui, using Manniche UI (https://mikkelmanniche.dk/lab/ui). The app is the boss: its tokens, folders and conventions win over anything in a component.
## Before you write code
1. Read `components.json`, the global CSS file and two or three existing screens. Note the alias paths, the colour tokens (`--primary`, `--muted`, `--radius` …), the icon set and how data is loaded.
2. Restate the screen in three lines: who uses it, the one job it does, and what data it shows.
3. Call `search_components` or `list_components` and pick the fewest components that do the job. For a whole page, check the templates (`shop-landing`, `pricing-page`, `store-dashboard`, `sign-in-page`, `changelog-page`) and start from the closest one.
4. Call `get_component` for each pick and read the source. Know what it renders before you place it.
## Building
- Install with `get_install_plan`, then the command it returns (`npx shadcn@latest add …`). Never paste component source by hand when the CLI can add it.
- Use the app's tokens and spacing scale. No hard-coded colours, no new fonts, no second icon set.
- Real content: use the app's data or clearly fake but plausible copy. No lorem ipsum, invented customer quotes or made-up numbers presented as real.
- One focal point per screen. Remove decoration that does not help the job.
- Every interactive element works with keyboard only, has a visible focus ring and a name for screen readers. Respect `prefers-reduced-motion`.
- Mobile first: the screen must work at 360 px wide without horizontal scrolling.
## Check before you hand over
1. Run the app's own typecheck and lint (`npm run lint`, `npx tsc --noEmit` or what `package.json` says).
2. Open the screen in the dev server at 1280 px and 390 px wide, in light and dark mode if the app has both. If a browser tool is available, take screenshots; if not, say that you could not look.
3. Tab through the screen once.
## Report
- What you built, which components and templates you installed, and the files you changed.
- Anything you left out and why.
- What the person should look at in the browser.
Do not commit, push or deploy. Do not change shared components in `components/ui/` unless asked; wrap them instead.