nextjs
Generate and edit Next.js applications using the App Router, React Server and Client Components, route handlers, layouts, metadata, and Next.js build conventions. Use for framework id nextjs and existing Next.js projects.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- nextjs
- description
- Generate and edit Next.js applications using the App Router, React Server and Client Components, route handlers, layouts, metadata, and Next.js build conventions. Use for framework id nextjs and existing Next.js projects.
02 资源文件 1
- 参考文档agents/openai.yaml193 B
03 SKILL.md 正文
Next.js
Use the App Router for new projects unless the imported source already uses the Pages Router.
Project contract
- Declare compatible
next,react, andreact-domdependencies. - Put routes in
app/orsrc/app/. Provide a required rootlayout.tsxcontaining<html>and<body>and apage.tsxfor/. - Use special files such as
loading.tsx,error.tsx,not-found.tsx, androute.tsaccording to their framework roles. - Keep components server-rendered by default. Add
"use client"only where hooks, browser APIs, mutable state, or event handlers require it. - Use route handlers for HTTP APIs and server functions/actions for trusted application mutations. Validate inputs and authorize on the server.
- Keep static assets in
public/and framework configuration innext.config.*.
Editing rules
- Do not mix Pages Router and App Router conventions in a new tree.
- Do not expose secrets through client components or public environment-variable prefixes.
- Preserve generated type files and existing bundler choices.
- Add every imported package and verify its React peer range.
Verification
Use the manifest's scripts. A conventional project supports next dev, next build, and next start; typecheck separately when the project defines it.
04 同仓库更多 Skills
request-design
Apply the request-scoped design system.
vue
Generate and edit typed Vue applications with Vite, Vue single-file components, Composition API, scoped styles, and optional Vue Router or Pinia integrations. Use for framework id vue when Nuxt server features are not required.
vite
Generate and edit Vite applications while preserving the selected UI renderer, TypeScript setup, plugin chain, environment boundaries, static assets, and production build contract. Use for framework id vite when no meta-framework is selected.
tanstack-start
Generate and edit TanStack Start React applications using TanStack Router file routes, loaders, validated search params, server functions, middleware, SSR, and runtime-neutral deployment output. Use for framework id tanstack-start.
sveltekit
Generate and edit SvelteKit applications using filesystem routes, layouts, load functions, form actions, server endpoints, adapters, and server-only module boundaries. Use for framework id sveltekit and full-stack Svelte projects.
svelte
Generate and edit client-side Svelte applications with typed single-file components, Vite, scoped styles, accessible events, and Svelte state conventions. Use for framework id svelte when a full SvelteKit server is not requested.