npx skills add https://github.com/subframeapp/subframe --skill import将现有设计系统导入 Subframe,通过发现磁盘上的文件、构建清单并通过 CLI 上传。
目标状态:所有设计系统文件均已上传至 Subframe 进行处理。
CLI 需要一个认证令牌和项目 ID。如果用户尚未提供这些信息,请使用 MCP 工具自动获取:
list_projects 以获取项目列表。每个项目都包含 projectId、name、teamId 和 teamName。
* 一个项目:自动使用它。
* 多个项目:始终询问用户要使用哪个项目。展示每个项目及其 teamName 以消除歧义。如果用户已经提到了特定的团队或项目名称,请将其与 teamName 和 name 字段进行匹配——但在继续操作之前仍需确认。当存在多个项目时,切勿静默选择项目。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
teamId 调用 generate_auth_token。不要使用来自其他项目的 teamId。项目 ID 在任何 Subframe URL 中也可视:app.subframe.com/<PROJECT_ID>/...
备用方案:如果 MCP 工具不可用,请引导用户访问 https://app.subframe.com/cli/auth 以获取其认证令牌和项目 ID。
我们只需要视觉/表现层文件——构成设计系统的可重用 UI 基础组件。跳过任何与业务逻辑、数据模型、API 调用或应用程序状态深度耦合的内容。
包含:
排除:
使用 Glob 和 Read 工具查找文件。寻找:
主题文件(全局样式):
tailwind.config.*globals.css、global.css、app.css、index.css)tokens.json、tokens.ts、theme.ts)组件文件:
.tsx、.jsx).stories.tsx、.stories.jsx、.stories.ts)使用以下搜索策略:
tailwind.config.*src/styles/、src/、app/、styles/ 中查找全局 CSSsrc/components/、components/、src/ui/、ui/、lib/components/如果不确定某个组件是设计系统基础组件还是应用程序组件,请快速阅读该文件——如果它导入了数据获取库、存储或 API 客户端,则跳过它。
对于每个组件,将文件分为两类:
entrypoint — 主组件文件的路径。必须引用 sourceFiles 中的一个文件。
sourceFiles — 主要的组件实现:
.tsx、.jsx)supportingFiles — 有助于理解组件的所有其他文件:
.stories.tsx、.stories.jsx、.stories.ts).module.css、.module.scss).md)按逻辑上的设计系统组件进行分组——例如,Button.tsx 是一个源文件,而 Button.stories.tsx、Button.module.css 和 Button.md 是 "Button" 组件的支持文件。
如果 .subframe/ 目录不存在,则创建它,然后编写清单:
mkdir -p .subframe
将清单写入 .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"
]
}
]
}
组件名称必须唯一。如果存在冲突的组件名称,请询问用户希望如何解决,例如根据目录添加前缀。
在运行 CLI 之前,打印摘要,以便用户发现任何问题:
然后继续上传。如果看起来有问题,用户可以中断。
运行 CLI 以提交设计系统进行导入。这会将文件上传到 Subframe 并启动一个异步导入作业——它不会内联完成导入。
始终传递认证令牌,以便 CLI 不会交互式地提示。
npx @subframe/cli@latest import -p {PROJECT_ID} --manifest .subframe/import-design-system.json --auth-token {TOKEN}
如果有任何文件缺失,CLI 将中止并报错。否则,向用户报告导入已提交并将很快处理。
generate_auth_token 生成新令牌,或建议用户在 https://app.subframe.com/cli/auth 重新认证每周安装量
110
代码仓库
GitHub 星标数
379
首次出现
2026年3月4日
安全审计
安装于
cursor86
codex42
claude-code21
opencode20
gemini-cli20
github-copilot20
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/authWeekly Installs
110
Repository
GitHub Stars
379
First Seen
Mar 4, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
cursor86
codex42
claude-code21
opencode20
gemini-cli20
github-copilot20
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
120,000 周安装
Azure Cloud Migrate:AWS Lambda到Azure Functions迁移工具 - 微软官方评估与代码迁移
38,700 周安装
内容策略指南:如何规划可搜索与可分享内容,驱动流量与潜在客户
39,800 周安装
社交媒体内容策略指南:创建、优化与互动全流程 | 营销技能
40,400 周安装
AI驱动移动应用设计工具Sleek.design - 快速创建美观应用原型
42,300 周安装
Web应用测试指南:使用Python Playwright自动化测试本地Web应用
42,800 周安装
teach-impeccable:AI辅助设计上下文收集与持久化工具,提升UI/UX设计一致性
45,800 周安装