← 返回
未分类 中文

Senior Frontend

Build, optimize, and review React and Next.js applications with TypeScript and Tailwind CSS. Use when scaffolding a frontend project, generating components,...
使用 TypeScript 和 Tailwind CSS 构建、优化和审查 React 与 Next.js 应用。适用于前端项目脚手架、生成组件等场景。
felix-antonio-sl
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 411
下载
💾 1
安装
1
版本
#latest

概述

Senior Frontend

React, Next.js, TypeScript, and Tailwind CSS — from scaffold to production.

Activation

Use this skill when the user asks to:

  • scaffold a new Next.js or React + Vite project
  • generate a React component, custom hook, or Storybook story
  • analyze or reduce bundle size
  • optimize Next.js (Server vs Client Components, image loading, data fetching)
  • implement accessibility (WCAG, ARIA, keyboard navigation)
  • review or improve frontend code quality

Workflow

  1. Classify the request: scaffold | component | bundle | optimize | accessibility | review.
  2. Load the relevant reference:
    • React patterns (compound components, custom hooks, render props) → {baseDir}/references/react_patterns.md
    • Next.js optimization (Server Components, Suspense, images, caching) → {baseDir}/references/nextjs_optimization_guide.md
    • accessibility, testing strategy, Tailwind conventions → {baseDir}/references/frontend_best_practices.md
  3. Run the appropriate script when a project or component name is provided:

```bash

# Scaffold a new Next.js or React project

python {baseDir}/scripts/frontend_scaffolder.py my-app --template nextjs

python {baseDir}/scripts/frontend_scaffolder.py my-app --template nextjs --features auth,api,forms,testing

# Generate a component (client | server | hook) with optional test and story

python {baseDir}/scripts/component_generator.py Button --dir src/components/ui

python {baseDir}/scripts/component_generator.py UserProfile --type server --with-test --with-story

# Analyze bundle for heavy dependencies and optimization opportunities

python {baseDir}/scripts/bundle_analyzer.py ./project --verbose

```

  1. Emit the artifact: component file, project structure, bundle report, or optimization recommendation.

Output Contract

  • Open with the classification and the primary issue or decision.
  • Emit one primary artifact per response (component, config, or report).
  • For bundle analysis: grade (A–F), list heavy packages with lighter alternatives.
  • Annotate non-obvious TypeScript patterns or accessibility choices.
  • Close with the next recommended step (e.g., "add Storybook story", "add sizes prop to Image").

Key Rules

  • Default to Server Components in Next.js. Add 'use client' only when state, effects, or browser APIs are required.
  • Default to TypeScript for all generated code.
  • Use cn() from @/lib/utils for conditional Tailwind classes — not string concatenation.
  • Every generated component must have explicit prop types; no implicit any.
  • Bundle score below 70 (grade C or worse) triggers a dependency replacement recommendation.

Proactive Triggers

Flag these without being asked:

  • moment → replace with date-fns or dayjs
  • lodash full import → switch to lodash-es with tree-shaking
  • COPY . . before npm install in Dockerfile → reorder (defer to docker-development)
  • Missing alt on or → accessibility issue
  • useEffect with data fetching in Next.js → suggest Server Component or use() hook
  • No sizes on responsive → layout shift risk

Guardrails

  • Do not generate backend API routes or database schemas — stay within frontend scope.
  • Do not add 'use client' to components that only render static markup.
  • Do not recommend @mui/material — prefer shadcn/ui or Radix UI primitives.
  • For large-scale bundle or architecture concerns refer to senior-architect.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 08:40 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Arquitecto Categórico

felix-antonio-sl
使用范畴论设计和审计数据架构与API。适用于需要将领域模型形式化为PostgreSQL DDL、JSON Schema、OpenAPI等场景。
★ 0 📥 436

Salubrista HaH

felix-antonio-sl
Use this skill when the user needs analysis, design, implementation, evaluation, dashboards, decision scenarios, or norm
★ 0 📥 357

OPM Modeler

felix-antonio-sl
使用对象过程方法论(OPM/ISO 19450)对系统建模,适用于用户请求建模系统、创建SD、构建OPD、编写OPL句子等。
★ 0 📥 358