npx claudepluginhub subframeapp/subframe --plugin subframeThis skill uses the workspace's default tool permissions.
Import an existing design system into Subframe by discovering files on disk, building a manifest, and uploading via the CLI.
Implements Subframe designs into codebases via MCP: fetches design, syncs components, creates pages, adds business logic. For package.json projects post /subframe:design or with URL/ID.
Automates design system construction from repository analysis: extracts patterns, builds OKLCH token hierarchies, implements accessible components with tests, verifies via multi-reviewer panels.
Create, import, browse, and maintain design system components and tokens. Useful for developers managing UI design assets across projects.
Share bugs, ideas, or general feedback.
Import an existing design system into Subframe by discovering files on disk, building a manifest, and uploading via the CLI.
Goal state: All design system files are uploaded to Subframe for processing.
The CLI needs an auth token and project ID. If the user hasn't provided these, use MCP tools to get these automatically:
list_projects to get the list of projects. Each project includes a projectId, name, teamId, and teamName.
teamName to disambiguate. If the user already mentioned a specific team or project name, match it against the teamName and name fields — but still confirm before proceeding. Never silently pick a project when multiple exist.generate_auth_token with the teamId from the user's selected project. Do not use a teamId from a different project.The project ID is also visible in any Subframe URL: app.subframe.com/<PROJECT_ID>/...
Fallback: If the MCP tools are not available, direct the user to https://app.subframe.com/cli/auth to get their auth token and project ID.
We only want visual/presentational layer files — the reusable UI primitives that make up the design system. Skip anything that's deeply coupled to business logic, data models, API calls, or application state.
Include:
Exclude:
Use Glob and Read tools to find files. Look for:
Theme files (global styling):
tailwind.config.*globals.css, global.css, app.css, index.css)tokens.json, tokens.ts, theme.ts)Component files:
.tsx, .jsx) in component directories.stories.tsx, .stories.jsx, .stories.ts)Use these search strategies:
tailwind.config.* at the project rootsrc/styles/, src/, app/, styles/src/components/, components/, src/ui/, ui/, lib/components/When unsure whether a component is a design system primitive or an application component, quickly read the file — if it imports data-fetching libraries, stores, or API clients, skip it.
For each component, separate files into two categories:
entrypoint — the path to the main component file. Must reference one of the sourceFiles.
sourceFiles — the primary component implementation:
.tsx, .jsx) containing markup and stylessupportingFiles — everything else that helps understand the component:
.stories.tsx, .stories.jsx, .stories.ts).module.css, .module.scss).md)Group by logical design system component — e.g. Button.tsx is a source file, while Button.stories.tsx, Button.module.css, and Button.md are supporting files for the "Button" component.
Create the .subframe/ directory if it doesn't exist, then write the manifest:
mkdir -p .subframe
Write the manifest to .subframe/import-design-system.json:
{
"theme": [
"tailwind.config.ts",
"src/styles/globals.css"
],
"components": [
{
"name": "Button",
"entrypoint": "src/components/Button.tsx",
"sourceFiles": [
"src/components/Button.tsx"
],
"supportingFiles": [
"src/components/Button.stories.tsx",
"src/components/Button.module.css"
]
}
]
}
Component names must be unique. If there are conflicting component names, ask the user how they would like to resolve them, e.g. by adding a prefix based on the directory.
Before running the CLI, print a summary so the user can spot any issues:
Then proceed with the upload. The user can interrupt if something looks wrong.
Run the CLI to submit the design system for import. This uploads the files to Subframe and kicks off an asynchronous import job — it does not complete the import inline.
Always pass the auth token so the CLI doesn't prompt interactively.
npx @subframe/cli@latest import -p {PROJECT_ID} --manifest .subframe/import-design-system.json --auth-token {TOKEN}
If any files are missing the CLI will abort with an error. Otherwise, report to the user that the import has been submitted and will be processed shortly.
generate_auth_token, or suggest the user re-authenticate at https://app.subframe.com/cli/auth