/polymorph:polymorph-setupfrom Polymorph
Sets up the Polymorph design system in new or existing projects across React, Vue, Svelte, Solid, Angular, or plain HTML. Handles init, packages, vendoring, and native app routes.
Ships in Polymorph. 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.
Read when SKILL.md points to them.
Polymorph is a design system: a closed vocabulary of interface components for React, Vue, Svelte,
Solid and Angular, and as custom elements for an HTML page with no build, with a theme engine and
lint rules (the red rules) that keep design decisions out of application code. Its tools are one
npm package, @metamorph-labs/polymorph, which every command here runs. Always run that scoped
name: the unscoped polymorph package on npm is someone else's.
| You find | The route |
|---|---|
| No app yet | A new app: init, with --platform ios or android for a native one |
@polymorph/* packages in package.json, often as npm aliases of @metamorph-labs/polymorph-* | Packages: the app installs the vocabulary |
polymorph.json with files, and member source under its dir (src/polymorph/) | Vendoring: the members are copied into the repository as source the team owns |
polymorph.json with "framework": "elements" | A page with no build: the elements are copied into a static directory |
| An app with none of these | An existing app without polymorph: packages or vendoring, by the table below |
Package.swift or an Xcode project with PolymorphUI, a Gradle build with dev.polymorph or com.github.metamorph-labs.polymorph, or a pubspec.yaml that names polymorph_tokens | A native app: the polymorph-native skill |
An existing app takes one of two routes:
| The team wants | Route |
|---|---|
| No member source in the repository, with fixes taken by raising the packages' version | Packages: a few manual steps |
The members as source it can read and edit, with upstream changes taken by update | Vendoring: one command |
npx -y @metamorph-labs/[email protected] init my-app
npx -y @metamorph-labs/[email protected] init my-app --template app
npx -y @metamorph-labs/[email protected] init my-app --framework vue
npx -y @metamorph-labs/[email protected] init my-app --system plain --no-install
npx -y @metamorph-labs/[email protected] init my-site --framework elements
npx -y @metamorph-labs/[email protected] init my-app --platform ios --id com.example.myapp
npx -y @metamorph-labs/[email protected] init my-app --platform android --id com.example.myapp
init writes a new Vite app into an empty directory: the packages, a theme from a catalogue system
(desktop, dew, flint, glassmorphic, harbor, journal, pastel, pebble, plain, pop, press, terminal), the red rules wired into ESLint and Stylelint, a first screen written as a spec and
emitted, the agent files (AGENTS.md, the skills, the MCP entries) and the system card. Then it
installs the packages with the package manager that ran it. --framework takes
react, vue, svelte, solid, angular or elements. --framework elements writes a page with no build that loads the elements from copied files, and
installs nothing. --template app writes a starter in place of the first screen, in any
framework but elements: an AppShell with a ListPage and a SettingsPage, the app's own router
given once to PageTransitions, and a test that measures each page with measureLayout.
Start there when the app has more than one page.
--platform ios or --platform android writes a native app instead, from the platform's
starter: an Xcode project and a Swift package, or a Gradle build with its wrapper, with AppShell,
a list page, a settings page and tests. --name names the app (by default the directory's name
as MyApp), --id is its bundle identifier or application id (by default
com.example.<name>, which no store accepts, so ask the person for theirs), and --package is
the Kotlin package on Android. Polymorph is named at this release, by URL in Package.swift or by
its JitPack coordinates. It installs nothing; the polymorph-native skill takes over from there.
npx -y @metamorph-labs/[email protected] plan button dialog theme:pastel --framework <framework>
npx -y @metamorph-labs/[email protected] add button dialog theme:pastel --framework <framework>
npx -y @metamorph-labs/[email protected] diff
npx -y @metamorph-labs/[email protected] update
<framework> is the app's framework: the one polymorph.json records, or, in an app with no
polymorph.json yet, the one its package.json depends on (vue for a Vue app). Name it on
every plan and add. The first add records the framework in polymorph.json, and with no
--framework it records react and copies React members, whatever the app is written in.
plan prints what add would copy and install, and writes nothing. add copies the members you
name, and every member they need, as source into src/polymorph/ (--dir changes it), installs a
theme (theme:<system>, or palette:<name> for a palette alone), adds the packages the members
import to package.json, and links the red rules into the project's ESLint and Stylelint configs.
Install the new dependencies afterwards with the project's package manager. polymorph.json
records each file with a hash of what was written.
diff lists the files you have edited and the files that changed upstream. update copies again
the files you have not edited and keeps the ones you have; --force takes upstream's copy.
The packages route installs @polymorph/engine, the framework's foundation and vocabulary, and
@polymorph/rules as npm aliases of their published names, adds the theme plugin to
vite.config, and spreads the red rules into the lint configs.
references/packages.md has each step with the exact lines. init writes
the same files for a new app, so an app it wrote is a working example.
npx -y @metamorph-labs/[email protected] agents
npx -y @metamorph-labs/[email protected] agents --harness claude,codex
npx -y @metamorph-labs/[email protected] agents --dry-run
agents writes what a coding agent reads in this repository: a marked block in AGENTS.md (and a
CLAUDE.md that includes it), these skills in .claude/skills/ and .agents/skills/, the MCP
server's entry for each harness (.mcp.json, .cursor/mcp.json, .codex/config.toml), and the
system card in polymorph/system-card.md. --harness takes claude, codex, cursor,
generic or all. It records what it wrote in polymorph/agents.json.
Run it again at any time, in a project that has these files already. Each file, block or server
entry is written where it is absent and replaced where it is as agents recorded writing it. One
someone edited, or one agents did not write, is kept and named as kept yours, and
--force replaces it. unchanged counts the parts already as this release writes them. Text
outside its block in AGENTS.md and other servers in an MCP config are left as they are.
--remove <harness> stops writing for a harness and removes the files only it reads that nobody
edited. An older release refuses to write over a newer one's files.
With Codex among the harnesses, the report ends with a codex mcp add line. It is for the
person to run once in their own shell: Codex reads .codex/config.toml only in a project it
trusts, and the line gives the server to Codex in every project. The project's files are complete
without it.
Each MCP entry runs npx -y @metamorph-labs/[email protected] mcp --project <path>, which starts the server over stdio for the
harness's client. Run it by hand only to see that it starts. With --read-only in place of the
project it offers no tool that writes a file.
Every command in this skill names the release it runs. To move to a newer one, run the same
commands with the newer version in place of this one's. In every project, agents rewrites the
agent files and the card for that release. In a vendoring project, update copies the new
members. In a packages project, raise the ranges of the @polymorph/* aliases and of
@metamorph-labs/polymorph in package.json, and install.
npx -y @metamorph-labs/[email protected] check src
npx -y @metamorph-labs/[email protected] card --framework <framework>
check runs the red rules over a directory with no lint config and exits 1 on any violation. The
card should list the members the app uses.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub metamorph-labs/polymorph --plugin polymorph7 skills in this plugin
/polymorph-agent-bridgeLet an AI agent on a running page read and operate the polymorph members through the agent bridge, instead of scraping the DOM or clicking coordinates. Use when asked to let an in-app assistant or chatbot fill a form or operate a screen, make a page usable by an AI agent or a browser agent, expose a page’s actions as tools for a model, add WebMCP (document.modelContext) tools, keep a field such as a card number or an action such as placing an order from an agent (data-agent-key), ask the person before an agent acts, put data-agent on a page with no build, read the agent segment of the polymorph system card, or drive a page built with polymorph from an agent. Covers @polymorph/engine/agent (createAgentBridge, snapshot, query, act, confirm, the policy, secrets, agentTools, registerWebMCP), @polymorph/engine/webmcp (registerWebMCPOnCall, applyAgentSetting, AGENT_TOOL_DEFINITIONS), one bridge shared by an assistant and WebMCP and loaded on its first use, loadAgentBridge in polymorph.js, and testing a bridge./polymorph-nativeBuild or change a SwiftUI or Jetpack Compose screen with the polymorph design system's native members, or add them to a new or existing iOS or Android app. Use when Swift code imports PolymorphUI or PolymorphTokens, when Package.swift or an Xcode project names github.com/metamorph-labs/polymorph, when a Gradle build depends on com.github.metamorph-labs.polymorph (JitPack) or dev.polymorph and Kotlin imports dev.polymorph.ui, when pubspec.yaml names polymorph_tokens, or when asked to use polymorph on iOS, Android, SwiftUI, Compose or Flutter. Covers the Swift package and JitPack lines, the PM-prefixed names (PMButton, PMBadgeTone, PMDateRange) and where they are declared, the native screen contract (model, actions, a stateless view, four load states), emitting it from a spec, a list screen (ListPage, FilterBar, DataTable) with its store and navigation, installing a pairing with pmTheme or ProvidePMTheme and its fonts, the members and parts a platform adapts or lacks, and checking a screen no lint reads./polymorph-rulesResolve a polymorph red-rule violation, a lint error whose rule starts with polymorph/ such as polymorph/no-raw-styles, polymorph/no-raw-interactive or polymorph/no-app-css, or a design need the polymorph vocabulary does not seem to cover. Use when ESLint, Stylelint, polymorph validate or polymorph check reports a polymorph/ rule, before adding any eslint-disable comment, and when a screen needs a style, a control, an icon, a chart, motion or another library's component that no member provides. Walks the exception ladder rung by rung./polymorph-runtime-screenLet a product answer with real interface while it runs. A model writes a polymorph-screen/1 document, the server checks it with checkAnswer, the page draws it as it streams with ScreenView from @polymorph/react/screen or the <poly-screen> element from @polymorph/elements-ui/screen, and each press or submit becomes an action the product handles. Use when asked for generative UI, to render a model or agent response as components, to let an assistant show a form, a choice or a confirmation, or when code imports @polymorph/screen, runtimeCard, checkAnswer, parsePartial, ScreenView or loadScreen. Covers the members a model may use and refusing links and images, the card and the host’s rules in the system prompt, checking and asking again, drawing the prose and the screen while they stream, actions and values, confirming an action with consequences, and what a request costs./polymorph-screenBuild or change a screen, page, form, dialog or layout in an app that uses the polymorph design system, in React, Vue, Svelte, Solid, Angular or an HTML page. Use for any UI work in a repository whose package.json depends on a @polymorph/* or @metamorph-labs/polymorph-* package, or that has a polymorph.json or polymorph/system-card.md. Covers reading the system card, choosing members, writing a screen spec or framework code, validating it against the red rules, fixing violations, emitting a spec, and rendering it at phone and desktop width to read its layout faults. Its references cover a screen written in code and its container, an AI chat or assistant screen, charts and dashboards, and rich text with mentions and comments./polymorph-themeChange how an app built with polymorph looks, its colours, type, density, shape, motion or overall feel, or how it offers light and dark mode. Use when asked to restyle or rebrand a polymorph app, to make it calmer, denser, warmer, darker or more editorial, to pick or adjust a theme, system or palette, to set an exact brand colour or turn a brand's hex colour into a palette's accentHue, to set a font or a type size, to add a dark mode toggle or a more-contrast palette, to edit a system or palette JSON document, when polymorph theme validate or the build reports a theme law, or when tempted to write a colour, font or length in application code. Proposes a theme from plain words, checks it against the theme laws and saves it.