Agents
How coding agents discover, install and use the Silkware Design System, and how to keep what they build honest.
A coding agent can install Silkware components on its own once the registry is configured. What it cannot know from the registry is how Silkware expects them to be used: React Aria props instead of the ones it learned from other shadcn bases, one crimson per screen, status colours with a word and an icon and the state square for a flow, Tailwind's standard type steps chosen by role, touch sizing only where a screen is for fingers, copy in Silkware's voice. Four things give it that knowledge: the Silkware skill, an AGENTS.md, the shadcn MCP server and the agent-readable docs.
What each piece does
| Piece | Read by | Gives the agent |
|---|---|---|
| Silkware skill | Claude Code, and any agent that opens the files | The workflow, the hard rules, and reference files for components, AI patterns, tokens, blocks, setup and design rules |
AGENTS.md | Codex, Cursor, Claude Code and other agents that read it | Eleven rules, the workflow and where to find the rest, in one page |
| shadcn MCP server | Agents with MCP | Search, view and install @silkware items without the command line |
/llms.txt and /llms/ | Any agent that can fetch a URL | Every docs page as plain markdown, with its examples inlined as code |
shadcn is the tool, Silkware is the source
The command you run is shadcn, the MCP server is called shadcn, and most components are shadcn's own React Aria code, kept unchanged and themed by tokens. They are still Silkware components: the registry decides which version ships, which fixes it carries and what was checked against the theme. The agent rules keep the two apart.
- Tools: shadcn. The CLI installs, and the MCP server lets an agent search and install. Both read the registry named in
components.json. - Source: Silkware. Components, AI patterns, blocks and the theme come from
@silkware. - Rules: Silkware. The skill and
AGENTS.md. The officialshadcnskill is optional, and the Silkware skill wins wherever the two differ. - Updates: through Silkware. A change in shadcn is taken into Silkware first, checked and released. Your project gets it as a diff from
@silkware, never by adding the component again from shadcn's own registry.
An agent installs from @silkware first. Only when the registry does not have an item, and after asking you, does it install the official shadcn one: on the React Aria base, without overwriting anything, styled with tokens, and listed under an Outside Silkware heading in your AGENTS.md, so it can be added to the registry and replaced. See Registry.
Install the skill
The skill is a registry item. In an application that has the @silkware registry, run:
pnpm dlx shadcn@latest add @silkware/silkware-skillIt writes SKILL.md and its references folder to .claude/skills/silkware-design-system/ in your project, where Claude Code finds it. Commit the folder, so every person and agent on the project gets the same rules. The skill is all an agent needs for UI work in a Silkware project. If the official shadcn skill is installed too, it serves as a manual for the CLI, and the Silkware skill wins wherever the two differ.
Claude Code loads the skill when a task builds, changes or reviews UI in the project. You do not have to name it.
Add the AGENTS.md
The silkware-agents item holds a short AGENTS.md for the root of your application. shadcn init already writes an AGENTS.md with a Next.js block, so append the Silkware rules to it rather than replacing it:
curl -s http://localhost:3000/r/silkware-agents.json | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>process.stdout.write("\n"+JSON.parse(s).files[0].content))' >> AGENTS.mdReplace http://localhost:3000 with the address your registry is served from. In a project without an AGENTS.md, install the file directly:
pnpm dlx shadcn@latest add @silkware/silkware-agentsThe file tells the agent where the system comes from, the rules it must not break, the workflow, the commands, and where the skill and the docs are.
Connect the MCP server
Set up the shadcn MCP server as described on the MCP page. With it, an agent can list the @silkware items, search them by name and description, read an item's files and dependencies, and install it. The skill tells the agent to use the server when it is connected, and the CLI when it is not.
Docs an agent can read
The agent does not render the documentation site. It reads two plain-text routes instead, and a person can hand it the same text from the page.
- /llms.txt lists every page with its one-sentence description, grouped by section, and links each page's markdown version.
/llms/followed by the page path and.mdreturns that page as markdown: /llms/components/dialog.md, /llms/ai-elements/confirmation.md, /llms/guidelines/ux-writing.md. Live previews become the example's source code, install commands become shell commands, and props and keyboard tables become markdown tables.
Copy page
Every docs page has a Copy page control beside its title. The main button copies the page as Markdown, the same text as its /llms/ route, with the examples as code. The menu beside it has four more actions: View as Markdown opens the /llms/ route, Open in Claude and Open in ChatGPT start a conversation that asks the assistant to read the page, and Copy Markdown link copies the address of the Markdown route. Use it to paste a page into an agent that cannot fetch a URL, or to point one at the page you mean.
The two Open in actions send the address of the Markdown route, built from the site's own URL. Until the site is deployed and NEXT_PUBLIC_SITE_URL is set, that address is http://localhost:3000, which an assistant on the web cannot open. Copy page and Copy Markdown link work from any address.
The skill finds the site from your project. The @silkware entry in components.json is the registry address, which ends in /r/{name}.json; the agent removes that ending to get the site address, then reads /llms.txt from it. Nothing is hard-coded, so the same skill works against a local site, a staging site or a private one.
What the agent will do
With the skill, an agent working in a Silkware application:
- Checks that the project is on the React Aria base, has the
@silkwareregistry, the Silkware theme and the fonts, and sets them up if not. - Looks for an installed component, an AI pattern or a block before writing new markup, and reads the closest block before it composes a whole screen.
- Installs and updates from
@silkwareby name. When the registry does not have an item, it asks first, then installs the official shadcn one on the React Aria base and records it inAGENTS.md. - Reads the real API, from the markdown docs or the installed file, before it uses a prop.
- Styles only with semantic tokens, and changes the brand only in
app/globals.css. - Picks type classes by role from Tailwind's standard scale (a page title is
font-heading text-2xl font-semibold), keepstext-display,text-statementandtext-leadfor landing pages, and puts rendered text such as Markdown in atypesetcontainer with a preset. - Adds
touch-controlsto a screen or region used with a finger, and to its menus and sheets, instead of a height class. Controls grow on touch only when it does. - Writes copy in sentence case with a verb on each button, the exact product names (Silkware, Agentic OS, Company Brain, Bridge) and the Brevia Manufacturing sample data.
- Runs the project's type check, lint and build, and goes through the screen checklist before it reports.
What it will not do
- Install a Radix or Base UI version of a component, an item from another registry, or shadcn's own copy of something
@silkwarehas. - Restyle a file in
components/ui, add a hex value, a palette colour or a font name, or add another primitive or animation library. - Put more than one crimson mark on a screen, or show status with colour alone, with no word and no icon.
- Let an agent action with consequences run without a person's approval in the interface.
- Invent a production URL for the registry or the docs. It asks for the address, or says the site is unreachable and works from the installed source.
- Overwrite a file you changed without asking. Updates go through a diff first.
Keep it honest
An agent repeats what its instructions say, so the instructions must match the system.
- The skill is checked against the system.
node scripts/check-skill.mjsin this repository fails when a component, AI pattern, block, token or utility named in the skill is missing fromregistry.json,registry/blocksorapp/globals.css, or when one of those is missing from the skill.node scripts/check-skill.mjs --writeregenerates the block list. Run it after everypnpm registry:build. - The agent reads, it does not remember. The skill sends it to the live registry, the markdown docs and the installed source for every API. If a page is wrong, the agent will be wrong too, so fix the page.
- Review against the checklist. The skill's design rules end with a twelve-point check: one default button, one crimson, tone steps, labels, no raw colours, 375px, React Aria props, copy. Use it when you review an agent's work.
- Try it on a fresh agent. The skill was tested by giving an agent with no other guidance a supplier settings screen with a form, a contacts table and an invite dialog. It followed the React Aria props, the tokens, the state square and the voice, and the build passed. Where it guessed (the page title size, whose names to use in sample data, whether to read a block that did not fit exactly), the skill now says. A second fresh agent then used a breadcrumb, the app title size and other names for the supplier's contacts. Repeat the test when you change the skill.
- Look at the result. No instruction replaces opening the screen at phone width and in dark mode.
Other agents
The skill is written for Claude Code, but its files are plain markdown. Point any agent at .claude/skills/silkware-design-system/SKILL.md from your own AGENTS.md, as the Silkware template does.