Token导航 LogoToken导航

Agent Skill · 前端设计

frontend-scaffold(前端脚手架)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

frontend-scaffold 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 9,864。

总安装 192周安装 8GitHub Stars 11下载 64核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/parhumm/jaan-to --skill frontend-scaffold

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。适合处理 React、Next.js、Vue、Tailwind、CSS 等主流技术栈的代码生成与审查。可整理组件结构、定位布局问题,并建议性能优化方案。需结合项目现有设计系统和构建流程使用,避免生成孤立代码片段。涉及页面改动时应配合本地预览和构建检查确认实际效果。

来源仓库内路径:skills/frontend-scaffold

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/parhumm/jaan-to --skill frontend-scaffold;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

frontend-scaffold 怎么安装?

在终端执行 npx skills add https://github.com/parhumm/jaan-to --skill frontend-scaffold。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

frontend-scaffold 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

frontend-scaffold 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

frontend-scaffold 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

frontend-scaffold 用的人多吗?

公开数据是累计安装 192 次,近一周安装 8 次,下载 64 次,GitHub 11 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

frontend-scaffold 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
frontend-scaffold

前端脚手架 · 本页

19211操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

frontend-scaffold

Convert designs and specs into production-ready React/Next.js component scaffolds with typed API hooks.

Context Files

  • $JAAN_CONTEXT_DIR/tech.md - Tech stack context (CRITICAL — determines framework, styling, versions)

- Uses sections: #current-stack, #frameworks, #constraints

  • $JAAN_CONTEXT_DIR/design.md - Design system guidelines (optional)
  • $JAAN_CONTEXT_DIR/brand.md - Brand guidelines (optional)
  • $JAAN_TEMPLATES_DIR/jaan-to-frontend-scaffold.template.md - Output template
  • $JAAN_LEARN_DIR/jaan-to-frontend-scaffold.learn.md - Past lessons (loaded in Pre-Execution)
  • ${CLAUDE_PLUGIN_ROOT}/docs/extending/language-protocol.md - Language resolution protocol
  • ${CLAUDE_PLUGIN_ROOT}/docs/extending/frontend-ui-workflow-reference.md - Shared UI workflow reference (CSF3 format)

Input

Upstream Artifacts: $ARGUMENTS

Accepts 1-3 file paths or descriptions:

  • frontend-design — Path to HTML preview or component description (from /jaan-to:frontend-design output)
  • frontend-task-breakdown — Path to FE task breakdown (from /jaan-to:frontend-task-breakdown output)
  • backend-api-contract — Path to OpenAPI YAML (from /jaan-to:backend-api-contract output)
  • Empty — Interactive wizard
  • Cross-role: optionally consumes /jaan-to:ux-microcopy-write output

Pre-Execution Protocol

MANDATORY — Read and execute ALL steps in: ${CLAUDE_PLUGIN_ROOT}/docs/extending/pre-execution-protocol.md Skill name: frontend-scaffold Execute: Step 0 (Init Guard) → A (Load Lessons) → B (Resolve Template) → C (Offer Template Seeding)

Also read context files if available:

  • $JAAN_CONTEXT_DIR/tech.md — Know the tech stack for framework-specific code generation
  • $JAAN_CONTEXT_DIR/design.md — Know the design system patterns
  • $JAAN_CONTEXT_DIR/brand.md — Know brand colors, fonts, tone

Language Settings

Read and apply language protocol: ${CLAUDE_PLUGIN_ROOT}/docs/extending/language-protocol.md Override field for this skill: language_frontend-scaffold

Language exception: Generated code output (variable names, code blocks, schemas, SQL, API specs) is NOT affected by this setting and remains in the project's programming language.

PHASE 1: Analysis (Read-Only)

Thinking Mode

ultrathink

Use extended reasoning for:

  • Analyzing design artifacts to derive component architecture
  • Mapping API contract schemas to TypeScript interfaces and hooks
  • Planning Server Component vs Client Component boundaries
  • Identifying accessibility requirements per component

Step 1: Validate & Parse Inputs

For each provided path:

  • frontend-design: Read HTML preview or component description, extract component list, layout, interactions
  • frontend-task-breakdown: Read markdown, extract component inventory, state matrices, estimates, dependencies
  • backend-api-contract: Read OpenAPI YAML, extract schemas for TypeScript interfaces, endpoints for API hooks
  • Report which inputs found vs missing; suggest fallback for missing

Present input summary:

INPUT SUMMARY
─────────────
Sources Found:    {list}
Sources Missing:  {list with fallback suggestions}
Components:       {extracted component names with atomic level}
API Endpoints:    {count from API contract}
TypeScript Types: {count derivable from schemas}

Step 2: Detect Tech Stack

Read $JAAN_CONTEXT_DIR/tech.md:

  • Extract frontend framework from #current-stack (default: React v19 + Next.js v15)
  • Extract styling approach (default: TailwindCSS v4)
  • Extract state management, testing tools
  • If tech.md missing: ask framework/styling via AskUserQuestion

Storybook detection (check alongside tech stack):

  • Glob:.storybook/main.* — Storybook installed?
  • Grep: "storybook" package.json — Storybook in devDependencies?
  • Glob: src/**/*.stories.tsx — Existing stories pattern?
  • If detected: set storybook_available = true (used in Steps 5, Phase 2 Output, Step 8)

Step 3: Design System Check

Read $JAAN_CONTEXT_DIR/design.md and $JAAN_CONTEXT_DIR/brand.md if available:

  • Extract color tokens, typography, spacing scale
  • Identify existing component patterns to extend
  • Note brand guidelines affecting component appearance

Step 4: Clarify Architecture

AskUserQuestion for items not in tech.md or design.md:

  • State management (TanStack Query only / + Zustand / + URL state via nuqs)
  • Routing (App Router / Pages Router / custom)
  • Testing (Vitest + Testing Library / Playwright / both)
  • Responsive strategy (mobile-first / desktop-first / adaptive)

Step 5: Plan Component Tree

Present component tree with atomic design levels:

COMPONENT TREE
══════════════

STACK: {framework} + {styling} + {state_management}

COMPONENTS ({count} total)
──────────────────────────
Atoms:     {list with estimates}
Molecules: {list with estimates}
Organisms: {list with estimates}
Templates: {list}
Pages:     {list}

API HOOKS ({count})
───────────────────
{list of TanStack Query hooks with endpoints}

TYPES ({count})
───────────────
{list of TypeScript interfaces from API schemas}

STORIES ({count} — if Storybook detected)
──────────────────────────────────────────
{list of CSF3 story files to generate, one per component}

HARD STOP — Review Scaffold Plan

Use AskUserQuestion:

  • Question: "Proceed with generating the frontend scaffold?"
  • Header: "Generate"
  • Options:

- "Yes" — Generate the scaffold code - "No" — Cancel - "Edit" — Let me revise the component tree or architecture first

Do NOT proceed to Phase 2 without explicit approval.


PHASE 2: Generation (Write Phase)

Phase 2 Output — Flat folder

All files in $JAAN_OUTPUTS_DIR/frontend/scaffold/{id}-{slug}/:

{id}-{slug}/
├── {id}-{slug}.md                     # Main doc (architecture + component map)
├── {id}-{slug}-components.tsx          # React components
├── {id}-{slug}-hooks.ts               # Typed API client hooks
├── {id}-{slug}-types.ts               # TypeScript interfaces from API schemas
├── {id}-{slug}-pages.tsx               # Page layouts / routes
├── {id}-{slug}-config.ts              # Package.json + tsconfig + tailwind config
├── {id}-{slug}-stories.tsx            # CSF3 Storybook stories (if Storybook detected)
├── {id}-{slug}-orval-config.ts         # → project root: orval.config.ts
├── {id}-{slug}-msw-handlers.ts         # → src/mocks/handlers.ts
├── {id}-{slug}-msw-browser.ts          # → src/mocks/browser.ts
├── {id}-{slug}-msw-server.ts           # → src/mocks/server.ts
└── {id}-{slug}-readme.md              # Setup + run instructions

Include Source → Destination mapping table in {id}-{slug}-readme.md for dev-output-integrate to consume.

Step 6.5: Generate API Integration Layer (if backend-api-contract provided)

When an API contract (OpenAPI spec) is available from inputs:

  1. Generate {id}-{slug}-orval-config.ts — Orval configuration:

- input.target: relative path to the spec file - output.client: 'react-query' (TanStack Query v5) - output.target: './src/lib/api/generated' - output.schemas: './src/lib/api/schemas' - output.mock: true (generates MSW handlers) - output.mode: 'tags-split'

  1. Generate {id}-{slug}-msw-handlers.ts — MSW request handlers from spec:

- For each endpoint: success handler (200/201), error handler (4xx/5xx with RFC 9457 shape) - Import pattern: import {http, HttpResponse} from 'msw'

  1. Generate {id}-{slug}-msw-browser.ts — MSW browser setup: import {setupWorker} from 'msw/browser'; import {handlers} from './handlers'; export const worker = setupWorker(...handlers);
  2. Generate {id}-{slug}-msw-server.ts — MSW Node.js server setup: import {setupServer} from 'msw/node'; import {handlers} from './handlers'; export const server = setupServer(...handlers);
  3. Update {id}-{slug}-config.ts: add to devDependencies: orval, msw, msw-storybook-addon. Add script: "generate:api": "orval --config./orval.config.ts".
Reference: See ${CLAUDE_PLUGIN_ROOT}/docs/extending/openapi-integration-reference.md for Orval config patterns, MSW handler patterns, and flat output conventions.

Step 7: Generate Content

Read $JAAN_TEMPLATES_DIR/jaan-to-frontend-scaffold.template.md and populate all sections based on Phase 1 analysis.

If tech stack needed, extract sections from tech.md:

  • Current Stack: #current-stack
  • Frameworks: #frameworks
  • Constraints: #constraints

Step 8: Quality Check

Validate generated output against checklist:

  • All components from task breakdown inventory generated
  • Server Components default; 'use client' only where needed
  • TypeScript interfaces match API contract schemas
  • TanStack Query hooks for client-side data fetching
  • Loading/error/empty/success states on all data components
  • Accessibility: ARIA, semantic HTML, keyboard nav
  • No anti-patterns present in generated code
  • Framework-implied build dependencies included (e.g., babel-plugin-react-compiler when reactCompiler: true)
  • CSF3 stories generated for each component (if storybook_available) — see ${CLAUDE_PLUGIN_ROOT}/docs/extending/frontend-ui-workflow-reference.md section "CSF3 Story Format Spec"

If any check fails, fix before preview.

Step 9: Preview & Approval

Present generated output summary. Use AskUserQuestion:

  • Question: "Write scaffold files to output?"
  • Header: "Write Files"
  • Options:

- "Yes" — Write the files - "No" — Cancel - "Refine" — Make adjustments first

Step 10: Generate ID and Folder Structure

source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/id-generator.sh"
SUBDOMAIN_DIR="$JAAN_OUTPUTS_DIR/frontend/scaffold"
mkdir -p "$SUBDOMAIN_DIR"
NEXT_ID=$(generate_next_id "$SUBDOMAIN_DIR")
slug="{project-name-slug}"
OUTPUT_FOLDER="${SUBDOMAIN_DIR}/${NEXT_ID}-${slug}"

Preview output configuration:

Output Configuration - ID: {NEXT_ID} - Folder: $JAAN_OUTPUTS_DIR/frontend/scaffold/{NEXT_ID}-{slug}/ - Main file: {NEXT_ID}-{slug}.md

Step 11: Write Output

  1. Create output folder: mkdir -p "$OUTPUT_FOLDER"
  2. Write all scaffold files to $OUTPUT_FOLDER
  3. Update subdomain index:
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/index-updater.sh"
add_to_index \
  "$SUBDOMAIN_DIR/README.md" \
  "$NEXT_ID" \
  "${NEXT_ID}-${slug}" \
  "{Project Title}" \
  "{Executive summary — 1-2 sentences}"
  1. Confirm completion:
Scaffold written to: $JAAN_OUTPUTS_DIR/frontend/scaffold/{NEXT_ID}-{slug}/ Index updated: $JAAN_OUTPUTS_DIR/frontend/scaffold/README.md

Step 12: Suggest Next Actions

Scaffold generated successfully! Next Steps: - Copy scaffold files to your project directory - Run npm install to install dependencies - Run /jaan-to:frontend-story-generate to generate additional Storybook stories - Run /jaan-to:frontend-visual-verify to visually verify components (requires Playwright MCP) - Run /jaan-to:dev-output-integrate to integrate scaffold into project - Run /jaan-to:qa-test-cases to generate test cases

Step 13: Capture Feedback

Use AskUserQuestion:

  • Question: "How did the scaffold turn out?"
  • Header: "Feedback"
  • Options:

- "Perfect!" — Done - "Needs fixes" — What should I improve? - "Learn from this" — Capture a lesson for future runs

If "Learn from this": Run /jaan-to:learn-add frontend-scaffold "{feedback}"


Key Generation Rules (Research-Informed)

React 19 Patterns (CRITICAL — differs from React 18):

  • Server Components are default — only add 'use client' when needed
  • async/await in Server Components, NOT useEffect + useState
  • use(promise) with Suspense, NOT useEffect; never create promises during render (infinite loops)
  • ref is a regular prop, NOT forwardRef
  • React Compiler (stable v1.0, October 2025) handles memoization — no useMemo/useCallback/React.memo; enable in next.config.ts with {reactCompiler: true}; requires babel-plugin-react-compiler in devDependencies; up to 12% faster initial loads
  • useActionState + useFormStatus (must be in child component of <form>) for forms
  • Server Actions for mutations, ES6 default parameters (NOT defaultProps)
  • <Context.Provider> deprecated — use <Context> directly
  • ref callbacks support cleanup functions

TailwindCSS v4 Patterns:

  • CSS-first config: @import "tailwindcss" + @theme {} — NO tailwind.config.js
  • Dark mode: @custom-variant dark (&:where(.dark,.dark *)) + next-themes
  • cn() helper (clsx + tailwind-merge), OKLCH colors
  • v3→v4 breaking syntax: !bg-red-500 → bg-red-500! (suffix), @layer utilities → @utility, bg-[--my-var] → bg-(--my-var); requires Safari 16.4+, Chrome 111+, Firefox 128+
  • PostCSS uses @tailwindcss/postcss as single plugin — autoprefixer is built-in
  • Content detection is automatic (no content array)

Component Generation:

  • 4 states per data component: loading, error, empty, success
  • Atomic Design: Atoms -> Molecules -> Organisms -> Templates
  • Feature-based organization, aria-* on all interactive elements
  • Minimum 24x24px touch targets (WCAG 2.2 AA); 44x44px recommended (AAA / mobile guideline)
  • Use semantic HTML (<button>, <nav>, <main>) before ARIA; enforce with eslint-plugin-jsx-a11y

API Integration:

  • Orval v7 for TypeScript types + TanStack Query hooks from OpenAPI (ready-to-use useQuery/useMutation with auto-generated keys)
  • Alternative: openapi-typescript (~1.68M weekly downloads) generates only TypeScript types with zero runtime; companion openapi-fetch provides type-safe createClient<paths>() wrapper; requires manually writing TanStack Query hooks but offers more control
  • TanStack Query v5 for client-side fetching; HydrationBoundary for RSC → client data handoff (prefetch with queryClient.prefetchQuery(), dehydrate cache, wrap in <HydrationBoundary state={dehydrate(queryClient)}>)
  • Use queryOptions() factories for type-safe, reusable query definitions with hierarchical key factories
  • Separate generated API code into src/lib/api/generated/ — treated as dependency, never hand-edited
  • Add "generate:api": "orval --config./orval.config.ts" to package.json

State Management:

  • Server/API data → TanStack Query v5
  • Local state → useState/useReducer
  • Global client state → Zustand v5 (no Provider needed, ~1KB gzip); use targeted selectors to minimize re-renders
  • URL state → nuqs v2.5+ (used by Sentry, Supabase, Vercel); type-safe parsers, server-side via createLoader()
  • Form state → useActionState + useFormStatus
  • Optimistic UI → useOptimistic (React 19); instant UI feedback, auto-reconcile or rollback

Next.js 15 Caching:

  • fetch() defaults to no-store (was force-cache in v14); opt into caching with cache: 'force-cache' or next: {revalidate: 3600}
  • unstable_cache deprecated — use 'use cache' directive with cacheTag() and cacheLife()
  • Server Actions for internal mutations; Route Handlers (route.ts) for external consumers
  • ESLint 9 flat config (eslint.config.mjs) replaces .eslintrc.json

CSF3 Story Patterns (when storybook_available):

Reference: See ${CLAUDE_PLUGIN_ROOT}/docs/extending/frontend-ui-workflow-reference.md for CSF3 format spec, CVA variant detection, argTypes controls, and state coverage matrix.
  • Generate one {ComponentName}.stories.tsx per component
  • Use Meta<typeof Component> + StoryObj<typeof meta> pattern
  • Cover: Default, Loading, Error, Empty, each CVA variant
  • Declarative args objects only (no render functions)
  • Match existing story conventions from project's *.stories.tsx files

Anti-Patterns to NEVER Generate

React 19: useEffect for data fetching, forwardRef, manual memoization (useMemo/useCallback/React.memo), defaultProps, PropTypes, <Context.Provider>

Next.js 15: 'use client' everywhere, API routes for internal mutations, unstable_cache (deprecated — use 'use cache' directive with cacheTag()/cacheLife()), next lint (removed in Next.js 16 — use ESLint CLI with eslint.config.mjs flat config)

TailwindCSS v4: tailwind.config.js, dynamic class construction, @tailwind directives, v3 bang syntax (!bg-red-500), @layer utilities

Accessibility: <div onClick>, missing alt, color-only indicators, missing form labels

Package Dependencies (Research-Validated)

Production: react ^19, react-dom ^19, next ^15, @tanstack/react-query ^5.60, zustand ^5, nuqs ^2.5, next-themes ^0.4, clsx ^2.1, tailwind-merge ^2.6, zod ^3.23, axios ^1.7

Dev: typescript ^5.7, @types/react ^19, @types/node ^22, @tailwindcss/postcss ^4, tailwindcss ^4, eslint ^9, prettier ^3.4, orval ^7, vitest ^2, @testing-library/react ^16, eslint-plugin-jsx-a11y, babel-plugin-react-compiler (when reactCompiler: true)


Skill Alignment

  • Two-phase workflow with HARD STOP for human approval
  • Framework-agnostic with tech.md detection
  • Template-driven output structure
  • Output to standardized $JAAN_OUTPUTS_DIR path

Definition of Done

  • All components from frontend-task-breakdown inventory generated
  • Server Components default; 'use client' only where needed
  • TypeScript interfaces from API contract schemas
  • TanStack Query hooks for client-side data fetching
  • Loading/error/empty/success states on all data components
  • Accessibility: ARIA, semantic HTML, keyboard nav
  • TailwindCSS v4 CSS-first config
  • Responsive mobile-first breakpoints
  • CSF3 stories generated per component (if Storybook detected)
  • Setup README complete
  • Output follows v3.0.0 structure
  • Index updated with executive summary
  • User approved final result

平台分布

Codex

38.87%
按下载量换算25

Claude

27.05%
按下载量换算17

Cursor

18.76%
按下载量换算12

Gemini CLI

10.12%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills