跳到正文
Skillpedia
网站与界面(前端)48k · #5717

senior-frontend

它能做什么

这个智能体可以帮助你使用 React、Next.js、TypeScript 和 Tailwind CSS 等技术创建和优化 Web 开发项目。它可以启动新项目、生成组件,并分析代码体积,让网站运行得更快。

适用场景

  • ✓开始搭建一个新的网站或 Web 应用时。
  • ✓想创建一个新的界面元素,比如按钮或表单时。
  • ✓检查网站代码是否过大、加载过慢时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/senior-frontend/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/senior-frontend/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“为我的网上商店创建一个新的 React 项目,包含身份验证和表单功能。”

每周 5 个新技能,1 分钟读完。

工作原理

它会使用预先配置好的工具来搭建项目的基础结构,或生成项目中的特定部分。在优化方面,它会分析文件大小,并针对拖慢网站速度的部分提出替换建议。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Senior Frontend

Frontend development patterns, performance optimization, and automation tools for React/Next.js applications.

When to Use

  • Use when scaffolding a new React or Next.js project with TypeScript and Tailwind CSS.
  • Use when generating new components or custom hooks.
  • Use when analyzing and optimizing bundle sizes for frontend applications.
  • Use to implement or review advanced React patterns like Compound Components or Render Props.
  • Use to ensure accessibility compliance and implement robust testing strategies.

Table of Contents


Project Scaffolding

Generate a new Next.js or React project with TypeScript, Tailwind CSS, and best practice configurations.

Workflow: Create New Frontend Project

  1. Run the scaffolder with your project name and template:

    python scripts/frontend_scaffolder.py my-app --template nextjs
    
  2. Add optional features (auth, api, forms, testing, storybook):

    python scripts/frontend_scaffolder.py dashboard --template nextjs --features auth,api
    
  3. Navigate to the project and install dependencies:

    cd my-app && npm install
    
  4. Start the development server:

    npm run dev
    

Scaffolder Options

Option Description
--template nextjs Next.js 14+ with App Router and Server Components
--template react React + Vite with TypeScript
--features auth Add NextAuth.js authentication
--features api Add React Query + API client
--features forms Add React Hook Form + Zod validation
--features testing Add Vitest + Testing Library
--dry-run Preview files without creating them

Generated Structure (Next.js)

my-app/
├── app/
│   ├── layout.tsx        # Root layout with fonts
│   ├── page.tsx          # Home page
│   ├── globals.css       # Tailwind + CSS variables
│   └── api/health/route.ts
├── components/
│   ├── ui/               # Button, Input, Card
│   └── layout/           # Header, Footer, Sidebar
├── hooks/                # useDebounce, useLocalStorage
├── lib/                  # utils (cn), constants
├── types/                # TypeScript interfaces
├── tailwind.config.ts
├── next.config.js
└── package.json

Component Generation

Generate React components with TypeScript, tests, and Storybook stories.

Workflow: Create a New Component

  1. Generate a client component:

    python scripts/component_generator.py Button --dir src/components/ui
    
  2. Generate a server component:

    python scripts/component_generator.py ProductCard --type server
    
  3. Generate with test and story files:

    python scripts/component_generator.py UserProfile --with-test --with-story
    
  4. Generate a custom hook:

    python scripts/component_generator.py FormValidation --type hook
    

Generator Options

Option Description
--type client Client component with 'use client' (default)
--type server Async server component
--type hook Custom React hook
--with-test Include test file
--with-story Include Storybook story
--flat Create in output dir without subdirectory
--dry-run Preview without creating files

Generated Component Example

"use client";

import { useState } from "react";
import { cn } from "@/lib/utils";

interface ButtonProps {
  className?: string;
  children?: React.ReactNode;
}

export function Button({ className, children }: ButtonProps) {
  return <div className={cn("", className)}>{children}</div>;
}

Bundle Analysis

Analyze package.json and project structure for bundle optimization opportunities.

…

常见问题

什么是“脚手架”?

就像为项目搭建一个初始结构,所有基础文件夹和文件都已经整理好,方便你直接开始开发。

什么是“打包体积”?

指用户浏览器需要下载的全部代码文件的总大小,才能显示你的网站。文件越小,网站加载就越快。

什么是“组件”?

可以把组件想象成可以重复使用的界面积木。比如一个按钮或一张商品卡片,都可以做成一个组件。

详情

作者的原始描述

Frontend development skill for React, Next.js, TypeScript, and Tailwind CSS applications. Use when building React components, optimizing Next.js performance, analyzing bundle sizes, scaffolding frontend projects, implementing accessibility, or reviewing frontend code quality.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5717
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能