Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

setup设置

Agent Skill

setup 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

10,428

周安装

426

GitHub Stars

382

下载量

3,374
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:setup(设置)
来源仓库:https://github.com/subframeapp/subframe
仓库路径:skills/setup
安装命令:
npx skills add https://github.com/subframeapp/subframe --skill setup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/subframeapp/subframe --skill setup

简介

在项目中初始化 Subframe,以在本地开发环境中渲染像素完美的设计页面。

  • 检测项目类型(新的、现有的非子框架或已设置)并遵循 CLI 脚手架或集成的适当设置路径
  • 配置 Tailwind CSS(v3 或 v4)、导入别名并将所有 Subframe 组件同步到指定目录
  • 需要根据您的项目主题通过 Google Fonts 链接进行手动字体配置
  • 支持 Vite、Next.js 和 Astro 框架,并具有特定于框架的 CSS 和布局文件处理
  • 通过启动开发服务器并根据子帧设计测试组件渲染来验证设置

SKILL.md

Set up 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.

MCP Authentication

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.

Workflow Overview

  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 pathNew Project, Already Setup, or Existing Project
  • You *must* follow one of the above paths otherwise Subframe will not work for the user. This is a crucial task and must be done even if it requires pausing the user's current work. Do not skip any step of the path.
  1. Configure fonts — required for all paths
  2. Verify setup — start dev server and test with a Subframe page

Get Credentials

The user may paste in an installation prompt copied from Subframe. Extract:

  • Project ID — a shorter alphanumeric string (also found in Subframe URLs: app.subframe.com/<PROJECT_ID>/...)
  • Auth token — a long string, usually prefixed or labeled

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.

- One project: Use it automatically. - Multiple projects: Always ask the user which project to use. Present each project with its 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.

  1. 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.


Detect Project Type

Check for package.json and .subframe/ folder in the current directory:

ConditionProject TypePath
No package.jsonNew projectNew Project
Has package.json AND has .subframe/ folderAlready setupAlready Setup
Has package.json but NO .subframe/ folderExisting non-Subframe projectAsk user, then New Project or Existing Project

Handling existing non-Subframe projects

If the current directory has a package.json but no .subframe/ folder, prompt the user with two options:

  • Create a new project (recommended) — Scaffold a brand-new Subframe project in a separate directory. This is the easiest path, especially if you're trying out Subframe for the first time. Follow New Project.
  • Add Subframe to this project — Install Subframe into the current project. Follow Existing Project.

Already Setup Path

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:

  • Reinstall / re-sync — Re-run the CLI init and sync to refresh components and configuration. Useful if things are out of date or broken. Follow Existing Project to re-initialize.
  • Nothing, it's already set up — Skip setup entirely. Suggest next steps like /subframe:design or /subframe:develop.

Do not proceed with setup unless the user confirms they want to reinstall.


New Project Path

This is the happy path. The CLI will scaffold a complete project with Subframe pre-configured.

1. Ask User Preferences

Prompt the user to choose:

  • Project name: Name for the new project directory (default: subframe-app). The name cannot conflict with an existing directory — check that the directory doesn't already exist before running the CLI.
  • Framework: Vite (recommended), Next.js, or Astro
  • Tailwind version: v3 (tailwind) or v4 (tailwind-v4)

2. Run CLI Init

This command must be run outside of a sandbox, so it can correctly setup all the necessary files. Pass all arguments directly to avoid interactive prompts:

npx @subframe/cli@latest init \
  --name {PROJECT_NAME} \
  --auth-token {TOKEN} \
  -p {PROJECT_ID} \
  --template {FRAMEWORK} \
  --css-type {TAILWIND_VERSION} \
  --dir ./src/ui \
  --alias "@/ui/*" \
  --tailwind \
  --css-path {CSS_PATH} \
  --install \
  --sync

Where:

  • {PROJECT_NAME} is the project directory name (e.g., subframe-app)
  • {FRAMEWORK} is nextjs, vite, or astro
  • {TAILWIND_VERSION} is tailwind (v3) or tailwind-v4
  • {CSS_PATH} is the global CSS file path:

- Vite: src/index.css - Next.js: src/app/globals.css - Astro: src/styles/global.css

Important: All arguments must be passed explicitly to avoid interactive prompts, which can cause the CLI to exit silently when run non-interactively.

The CLI will:

  • Download the starter kit template
  • Create .subframe/sync.json
  • Configure Tailwind
  • Sync all components
  • Install dependencies

3. Configure Fonts

See Configure Fonts below — this is required even for new projects.

4. Verify Setup

See Verify Setup below.


Existing Project Path

Existing projects may require more configuration. The CLI handles most setup, but some projects need manual fixes.

1. Detect Framework

Check for framework indicators:

FrameworkIndicators
Next.jsnext in package.json dependencies, next.config.* file
Vitevite in package.json devDependencies, vite.config.* file
Astroastro in package.json dependencies, astro.config.* file

2. Check Prerequisites

Verify the project has required dependencies:

  • React 16+react in package.json
  • Tailwind CSS 3.4+tailwindcss in package.json
  • TypeScripttypescript in package.json

If any are missing, let the user know before proceeding.

3. Run CLI Init

This command must be run outside of a sandbox, so it can correctly setup all the necessary files. Pass all arguments directly to avoid interactive prompts:

npx @subframe/cli@latest init \
  --auth-token {TOKEN} \
  -p {PROJECT_ID} \
  --dir ./src/ui \
  --alias "@/ui/*" \
  --install \
  --sync

Important: All arguments must be passed explicitly to avoid interactive prompts, which can cause the CLI to exit silently when run non-interactively.

The CLI will attempt to:

  • Create .subframe/sync.json
  • Detect and configure Tailwind
  • Set up import aliases
  • Sync all components
  • Install @subframe/core

4. Verify Configuration

After init, verify everything was set up correctly. If the CLI missed something (common with non-standard setups), apply manual fixes.

Check .subframe/sync.json exists with directory, importAlias, and projectId.

Check Tailwind configuration:

  • Tailwind v3tailwind.config.js should have the Subframe preset: presets: [require("./src/ui/tailwind.config")], And the content array should include the Subframe directory: content: ["./index.html", "./src/**/*.{js,jsx,ts,tsx}"], If the Subframe project has dark mode enabled, the CLI also syncs a theme.css file with CSS variables for light and dark modes. The global CSS file must import it: @import "./ui/theme.css";
  • Tailwind v4 — Global CSS file should import the theme: @import "tailwindcss"; @import "./ui/theme.css";

Check import aliases@/* should resolve correctly. If not working:

  • Vite: Add baseUrl and paths to tsconfig.app.json, and add resolve.alias to vite.config.ts
  • Astro: Add baseUrl and paths to tsconfig.json
  • Next.js: Usually already configured; check tsconfig.json

5. Troubleshooting

If issues arise, use the SearchSubframeDocs MCP tool to find solutions:

SearchSubframeDocs({ query: "tailwind configuration troubleshooting" })
SearchSubframeDocs({ query: "manual installation" })

The docs include a comprehensive manual installation guide for troubleshooting.

6. Configure Fonts

See Configure Fonts below.

7. Verify Setup

See Verify Setup below.


Configure Fonts

The CLI does not configure fonts. Use the get_theme MCP tool to get font information:

get_theme({ projectId: "PROJECT_ID" })

The theme config includes fontFamily entries referencing Google Fonts. Add the corresponding <link> tags:

Vite / Astro — Add to <head> in index.html:

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous" />
<link href="https://fonts.googleapis.com/css2?family=Font+Name:wght@400;500;600;700&display=swap" rel="stylesheet" />

Next.js (App Router) — Add to <head> in app/layout.tsx:

<head>
  <link rel="preconnect" href="https://fonts.googleapis.com" />
  <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
  <link href="https://fonts.googleapis.com/css2?family=Font+Name:wght@400;500;600;700&display=swap" rel="stylesheet" />
</head>

Next.js (Pages Router) — Add to pages/_document.tsx inside the <Head> component.

Font link formatting:

  • Replace spaces with + in font names (e.g., Inter+Tight)
  • Include weights from the theme in the wght@ parameter (semicolon-separated)
  • Add one <link> per font family, but only one set of preconnect links

Verify Setup

After configuration, verify that Subframe pages render correctly.

1. Ask About Existing Pages

Ask the user: "Do you have a page already designed in Subframe that you'd like to test with?"

  • If yes: Use /subframe:develop to implement it and verify rendering
  • If no: Suggest they design a page using /subframe:design, or simply start the dev server to confirm no errors

2. Start Dev Server

npm run dev

3. Summarize

Recap what was set up:

  • .subframe/sync.json configured
  • Tailwind configured (v3 preset or v4 import)
  • Components synced to src/ui/ (or configured directory)
  • Fonts configured

Mention next steps:

  • /subframe:design — Design new pages with AI
  • /subframe:develop — Implement Subframe designs in your codebase

Important Notes

  • Use SearchSubframeDocs MCP tool for troubleshooting any setup issues.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.96%
按下载量换算1,112

Claude

31.94%
按下载量换算1,078

Cursor

20.99%
按下载量换算708

Gemini CLI

10.4%
按下载量换算351

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills