Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计异常

nextjs-boilerplateNext.js boilerplate 前端

Agent Skill

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

总安装

256

周安装

11

GitHub Stars

35

下载量

90
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/petekp/claude-code-setup --skill nextjs-boilerplate

简介

用于辅助前端页面、组件和样式开发。nextjs-boilerplate 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

  • 适合生成或审查 React、Next.js 相关代码。
  • 需要结合项目现有设计系统和路由方式使用。
  • 避免生成孤立片段,涉及页面改动应配合预览检查。
  • 建议先确认构建方式和视觉效果再实施改动。

SKILL.md

Next.js Boilerplate Setup

Bootstrap a production-ready Next.js project with modern tooling.

When to Use

  • User asks to create a new Next.js project
  • User wants to set up a React app with Tailwind CSS
  • User needs shadcn/ui components
  • User wants to build an AI chat interface
  • Starting a fresh frontend project with modern tooling

Stack Overview

LayerTechnologyPurpose
FrameworkNext.js 14+ (App Router)React framework with SSR/SSG
StylingTailwind CSSUtility-first CSS
Componentsshadcn/uiAccessible, customizable components
AI Chatassistant-uiPre-built AI chat interface components
TypeScriptStrict modeType safety

Setup Process

Step 1: Create Next.js Project

npx create-next-app@latest my-app --typescript --tailwind --eslint --app --src-dir --import-alias "@/*"
cd my-app

Flags explained:

  • --typescript: TypeScript support
  • --tailwind: Tailwind CSS pre-configured
  • --eslint: ESLint for code quality
  • --app: App Router (not Pages Router)
  • --src-dir: Use src/ directory structure
  • --import-alias: Clean imports with @/

Step 2: Initialize shadcn/ui

npx shadcn@latest init

Recommended configuration:

  • Style: Default
  • Base color: Slate (or user preference)
  • CSS variables: Yes
  • React Server Components: Yes
  • Import alias for components: @/components
  • Import alias for utils: @/lib/utils

Step 3: Add Common Components

npx shadcn@latest add button card input label
npx shadcn@latest add dialog dropdown-menu
npx shadcn@latest add form (includes react-hook-form + zod)

Step 4: Add assistant-ui (Optional - for AI Chat)

npx assistant-ui@latest create

Or manual installation:

pnpm add @assistant-ui/react @assistant-ui/react-markdown

Project Structure

src/
├── app/
│   ├── layout.tsx      # Root layout with providers
│   ├── page.tsx        # Home page
│   ├── globals.css     # Tailwind imports + custom styles
│   └── (routes)/       # Route groups
├── components/
│   ├── ui/             # shadcn/ui components
│   └── ...             # Custom components
├── lib/
│   └── utils.ts        # Utility functions (cn, etc.)
└── hooks/              # Custom React hooks

Essential Configurations

tailwind.config.ts

shadcn/ui sets this up, but verify:

  • Dark mode: class strategy
  • Content paths include all component locations
  • CSS variables for theming

TypeScript (tsconfig.json)

Ensure strict mode:

{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true
  }
}

ESLint

Add helpful rules to .eslintrc.json:

{
  "extends": ["next/core-web-vitals"],
  "rules": {
    "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
  }
}

Common Patterns

Layout with Theme Provider

// src/app/layout.tsx
import { ThemeProvider } from "@/components/theme-provider"

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en" suppressHydrationWarning>
      <body>
        <ThemeProvider attribute="class" defaultTheme="system" enableSystem>
          {children}
        </ThemeProvider>
      </body>
    </html>
  )
}

cn() Utility Usage

import { cn } from "@/lib/utils"

<div className={cn(
  "base-styles",
  condition && "conditional-styles",
  className
)} />

Form Pattern with react-hook-form + zod

import { useForm } from "react-hook-form"
import { zodResolver } from "@hookform/resolvers/zod"
import * as z from "zod"

const schema = z.object({
  email: z.string().email(),
})

function MyForm() {
  const form = useForm({
    resolver: zodResolver(schema),
  })
  // ...
}

assistant-ui Integration

Basic Chat Setup

import { Thread } from "@assistant-ui/react"
import { useVercelAIRuntime } from "@assistant-ui/react-ai-sdk"
import { useChat } from "ai/react"

export function Chat() {
  const chat = useChat({ api: "/api/chat" })
  const runtime = useVercelAIRuntime(chat)

  return <Thread runtime={runtime} />
}

API Route (App Router)

// src/app/api/chat/route.ts
import { openai } from "@ai-sdk/openai"
import { streamText } from "ai"

export async function POST(req: Request) {
  const { messages } = await req.json()
  const result = await streamText({
    model: openai("gpt-4o"),
    messages,
  })
  return result.toDataStreamResponse()
}

Verification Checklist

After setup, verify:

  • pnpm dev starts without errors
  • Tailwind styles apply correctly
  • shadcn/ui Button renders properly
  • Dark mode toggle works (if added)
  • TypeScript has no errors: pnpm tsc --noEmit
  • ESLint passes: pnpm lint

Common Issues

Tailwind Not Working

  1. Check globals.css has Tailwind directives
  2. Verify tailwind.config.ts content paths
  3. Restart dev server after config changes

shadcn/ui Component Not Found

npx shadcn@latest add [component-name]

Hydration Mismatch

Add suppressHydrationWarning to <html> tag when using theme providers.

Import Errors

Verify tsconfig.json paths match shadcn/ui init choices.

Quick Reference Commands

# Development
pnpm dev

# Build
pnpm build

# Type check
pnpm tsc --noEmit

# Lint
pnpm lint

# Add shadcn component
npx shadcn@latest add [name]

# List available components
npx shadcn@latest add

When NOT to Use This Stack

  • Simple static sites (use Astro or plain HTML)
  • Apps requiring different styling approach (CSS Modules, styled-components)
  • Non-React projects
  • When the user has an existing project with different tooling

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.41%
按下载量换算33

Claude

30.02%
按下载量换算27

Cursor

16.05%
按下载量换算14

Gemini CLI

7.9%
按下载量换算7

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills