AgentUI: Instructions file for Claude Code

CLAUDE.md

AgentUI CLAUDE.md is an instructions file for Claude Code from skulitom/AgentUI. It costs 1,508 tokens per session, scanned A, original, MIT.

A set of Claude Code instructions for developing AgentUI, an MCP server that lets a coding agent ask people for input through forms, sliders, diffs, and previews.

In plain words
What is it for?
Use it when modifying AgentUI or running its build, tests, or type checks.
Why use it?
It documents how to build, test, and type-check the project, along with security and setup details that can cause failures.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is skulitom/AgentUI's own configuration. It tells Claude Code how to work on AgentUI itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything AgentUI configures →

Reuse

Borrowing it

Nothing to install: this file belongs to skulitom/AgentUI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/skulitom/AgentUI/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/skulitom/AgentUI

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for AgentUI CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/skulitom/agentui/claude-md/github.svg)](https://agentmods.dev/instructions/skulitom/agentui/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/skulitom/agentui/claude-md"><img src="https://agentmods.dev/badge/instructions/skulitom/agentui/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for AgentUI CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/skulitom/agentui/claude-md"><img src="https://agentmods.dev/badge/instructions/skulitom/agentui/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,508 This file is loaded in full into every session.
When invoked 1,508 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01508 $0.01508
Opus 5.5 $0.00603 $0.00603
Sonnet 5.5 $0.00302 $0.00302
Haiku 4.5 $0.00151 $0.00151

Measured 2mo ago against content hash 2ac385b14b00, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

AgentUI CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AgentUI

Interactive UIs for coding agents: an MCP server that lets any agent ask its human with sliders, forms, diffs and live previews instead of guessing.

  • How to use the tools: skills/agentui/SKILL.md
  • Why it is built this way: the design decisions and their evidence are in the header comments of the files they affect — particularly packages/server/src/core/{waiters,session,library}.ts, packages/server/src/web/preview.ts and packages/ui/public/agentui/preview.js.

Working on it

pnpm build     # shared -> ui -> server (vendors three.js, copies the shell into server/web)
pnpm test      # 394 tests; the server suite runs against the real built binary over stdio
pnpm typecheck

pnpm build before running anything: the server serves the built shell, and the installer registers the built dist/mcp.js by absolute path.

Examples in packages/server/examples/ are dogfood — each asks something real about this project, so building the tool and using it are the same activity.

Things that will bite you

  • Loopback is the entire security model, until it is not. There is no login anywhere in this server: 127.0.0.1 is what makes it safe. AGENT_UI_HOST=lan (or an explicit address) trades that for reachability and MUST carry the token in web/access.ts — the shell, the preview origin AND the WebSocket upgrade. Anyone who reaches a widget can read what the agent attached and answer as you. It is off by default and prints what it is giving away.
  • stdout belongs to the MCP transport. protectStdout() redirects console.* to stderr and blocks stray writes; the transport gets the only remaining handle. A single stray print corrupts every message after it.
  • The preview frame is a second origin (shell port + 1). Sandboxing on one origin gives an opaque origin, and module imports then fail the CORS check — the DevTools error blames CSP and sends you the wrong way.
  • values_interim must never wake a waiter. It is drag noise. If it wakes ui_wait, one slider drag wakes the agent hundreds of times.
  • touched is replaced, not merged. Clearing a flag is how a user says "no opinion here" after poking a control.
  • Previews animate only agent-sourced changes. update(values, meta) gets meta.source; "user" frames must track 1:1 — animating under a live drag is the forbidden failure. The shell's motion tokens (--t-* in styles/tokens-and-base.css) are hand-mirrored in packages/ui/public/agentui/motion.js; change both.
  • A visual must encode something the agent went and got. sample, compare and bind render in the SHELL, not the frame, and read local values — live at 60fps, nothing on the wire. sample.source is required on purpose: a table of invented numbers is worse than a sentence, and the field is what makes that visible instead of asking anyone to remember.
  • Closing has no message of its own. A tab learns a session ended from the relayed closed event — nothing sends a closed frame — so anything that ends a session (ui_close, the user dismissing it) reaches the browser only through store.ts's event case. Miss it and the page keeps offering controls the server has already stopped accepting.
  • A new control type is four edits, and the compiler names two of them. A schema in shared/src/spec/control-schemas.ts, a member of the Control union, an entry in CONTROLS (spec/control-registry.ts), and an entry in CONTROL_INPUTS (ui/src/components/controls/index.tsx). Both registries are mapped Records over the union, so a missing entry will not compile. Content kinds work the same way via CONTENT_BLOCKS and BLOCK_RENDERERS. This used to be ~15 sites across 8 files, two of which failed silently.
  • shared/src/vocab.js is plain JS on purpose, and it is COPIED. The preview frame is a second origin with no bundler, so anything both halves must agree on (hint regexes, SELF_SHOWN, display rounding) lives there and is synced to ui/public/agentui/vocab.js by a prebuild/predev script. The copy is checked in; vocab-sync.test.ts compares the two byte for byte.
  • One function decides whether a preview opens AND what goes in it. planPreview (shared/src/preview-plan.js, synced to the frame) returns an ordered list of panels; shouldAutoPreview is just "does any planned view draw". These used to be two implementations a test compared, and they disagreed — a "type_scale" control landed in the frame's font bucket while the gate said there was nothing to show, so the frame never opened.
  • A new preview view is two entries. PREVIEW_VIEWS in preview-plan.js (the vocabulary — label, accepted control types, and whether drawing it justifies opening a frame) and VIEW_IMPLS in preview.js (the DOM). A test asserts the key sets match: a view with draws: true and no implementation opens a frame and then renders nothing, which is worse than not having it.
  • A preview can write back, and must do it through the shell's own path. setValues in the frame posts set_values; PreviewFrame replays it through setLocalValue/commit. Going around that would lose touched, animate under the user's finger, skip the interim throttle, and ignore whether the session is still open — every invariant lives on that path.
  • MCP tool schemas are shallow on purpose. ui_ask and ui_create advertise the containers and the enumerated vocabulary, not the full spec — inlining the real schemas costs ~5,000 tokens on every request. Detail comes from ui_schema on demand. A size budget in mcp-e2e.test.ts guards it, and nothing exposed may use .default(): zod 4 emits defaulted fields as required, turning a convenience into a mandatory argument.

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 93 lines · 1,508 tokens per session scan A 2ac385b14b00

Subscribe to this mod's changes

AgentUI CLAUDE.md is an instructions file published in the GitHub repository skulitom/AgentUI (0 stars, last pushed 1mo ago), licensed MIT. It adds 1,508 tokens to every session, about $0.0060 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

AgentUI CLAUDE.md compared with instructions from other repositories

AgentUI CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
AgentUI CLAUDE.mdskulitom/AgentUIInstructions file01mo agoMITA1,508Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode