design
Design and edit anything in Subframe — pages, components, snippets, design documents, the…
Install Subframe into a codebase so you can implement designs locally. Sets up the CLI, syncs components, configures Tailwind and fonts. Only needed when you're ready to write code — you can design without installing.
$ npx -y skills add subframeapp/subframe --skill install --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/installContext preview
The summary Claude sees to decide when to auto-load this skill.
Install Subframe into a codebase so you can implement designs locally. Sets up the CLI, syncs components, configures Tailwind and fonts. Only needed when you're ready to write code — you can design without installing.
name: install description: Install Subframe into a codebase so you can implement designs locally. Sets up the CLI, syncs components, configures Tailwind and fonts. Only needed when you're ready to write code — you can design without installing.
Install Subframe in a project so that pages designed in Subframe render pixel-perfect in the local development environment.
**Goal state**: Dev server runs and Subframe pages render exactly as designed.
> **You don't need to install to design.** `/subframe:design` works directly against a cloud Subframe project — no local setup required. Use `/subframe:install` when you're ready to implement those designs in code with `/subframe:develop`.
If you cannot find any Subframe MCP tools (like `get_theme`, etc.), the MCP server likely needs to be authenticated. Ask the user to authenticate the Subframe MCP server. If the user is using Claude Code or Codex, instruct them to run `/mcp` to view and authenticate their MCP servers, and then say "done" when they're finished.
1. **Get credentials** via MCP tools (or from user input) 2. **Detect project type** — no repo, existing Subframe repo, or existing non-Subframe repo 3. **Follow the appropriate path** — [New Project](#new-project-path), [Already Installed](#already-installed-path), or [Existing Project](#existing-project-path)
4. **Configure fonts** — required for all paths 5. **Verify installation** — start dev server and test with a Subframe page
---
The user may paste in an installation prompt copied from Subframe. Extract:
If the user doesn't provide credentials, use the MCP tools to get credentials automatically — no need to ask the user:
1. **Project ID** — Call `list_projects` to get the list of projects. Each project includes a `projectId`, `name`, `teamId`, and `teamName`.
2. **Auth token** — Call `generate_auth_token` with the `teamId` from the user's selected project. Do not use a `teamId` from a different project.
**Fallback**: If the MCP tools are not available (e.g., MCP server is not authenticated), ask the user to go to `https://app.subframe.com/cli/auth` to get their auth token and project ID.
---
Check for `package.json` and `.subframe/` folder in the current directory:
| Condition | Project Type | Path | | ---------------------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------- | | No `package.json` | **New project** | [New Project](#new-project-path) | | Has `package.json` AND has `.subframe/` folder | **Already installed** | [Already Installed](#already-installed-path) | | Has `package.json` but NO `.subframe/` folder | **Existing non-Subframe project** | Ask user, then [New Project](#new-project-path) or [Existing Project](#existing-project-path) |
If the current directory has a `package.json` but no `.subframe/` folder, prompt the user with two options:
---
If the project already has both `package.json` and a `.subframe/` folder, Subframe has already been initialized. Ask the user what they'd like to do:
Do not proceed unless the user confirms they want to reinstall.
---
This is the happy path. The CLI will scaffold a complete project with Subframe pre-configured.
Prompt the user to choose:
This command must be run outside of a sandbox, so it can correctly setup all the necessary files. Pass all arguments directly so the CLI doesn't prompt. `--yes` accepts safe defaults for anything not specified:
npx @subframe/cli@latest init \
--yes \
--name {PROJECT_NAME} \
--auth-token {TOKEN} \
-p {PROJECT_ID} \
--template {FRAMEWORK} \Subframe is a UI design tool featuring a drag-and-drop visual editor, React + Tailwind code export, and AI-powered design and prototyping features.
Repo: subframeapp/subframe
Design and edit anything in Subframe — pages, components, snippets, design documents, the…
Implement Subframe designs with business logic. Use after designing with /subframe:design or…