用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/G1Joshi/Agent-Skills --skill nextjs命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | nextjs |
| description | Next.js React framework with SSR, App Router, and server components. Use for full-stack React. |
Next.js is the leading full-stack framework for React. Next.js 15 (2025) stabilizes the App Router and Server Actions, making it a robust platform for modern web apps.
// app/page.tsx (Server Component by default)
import { db } from "@/lib/db";
export default async function Page() {
const posts = await db.post.findMany(); // Direct DB access!
return (
<main>
<h1>Blog</h1>
{posts.map((post) => (
<p key={post.id}>{post.title}</p>
))}
</main>
);
}
app/ dir)File-system based routing where page.tsx is the UI, layout.tsx wraps children, and loading.tsx defines Suspense boundaries.
Components in app/ are Server Components by default. They can't use useState or useEffect. To add interactivity, add 'use client' to the top of a file.
Functions that run on the server, callable from the client (forms, buttons).
// actions.ts
'use server'
export async function create(formData) {
await db.post.create({ data: ... });
}
Do:
useEffect.revalidatePath: Revalidate cache on-demand after mutations (Server Actions).Don't:
'use server' files don't export sensitive data.use client everything: Only put 'use client' at the leaves of your tree (buttons, inputs). Keep high-level layouts as Server Components.