用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/oimiragieo/agent-studio --skill nextjs-expert命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Agent frontmatter enhancements — disallowedTools, mcpServers scoping, fork_eligible field
Context management — pre-compact persistence, threshold alignment, microcompact/circuit breaker detection
Hook enhancements — updatedInput for bash safety prefixes, suppressOutput for verbose blocks, denial-based routing feedback
基于 SOC 职业分类
正在显示 SKILL.md
| name | nextjs-expert |
| description | Next.js framework expert including App Router, Server Components, and API routes |
| version | 1.1.0 |
| model | sonnet |
| invoked_by | both |
| user_invocable | true |
| tools | ["Read","Write","Edit","Bash","Grep","Glob"] |
| consolidated_from | 1 skills |
| best_practices | ["Follow domain-specific conventions","Apply patterns consistently","Prioritize type safety and testing"] |
| error_handling | graceful |
| streaming | supported |
| verified | true |
| lastVerifiedAt | "2026-02-22T00:00:00.000Z" |
| source | builtin |
| trust_score | 100 |
| provenance_sha | c52c60e1fcb5aa26 |
When reviewing or writing code, apply these guidelines:
When reviewing or writing code, apply these guidelines:
app directory, following Next.js 14 conventions.fetch API with appropriate caching and revalidation strategies.When reviewing or writing code, apply these guidelines:
This expert skill consolidates 1 individual skills:
app/ directory) for all new Next.js 13+ routes — the Pages Router is legacy; mixing both creates conflicting rendering contexts and blocks Server Components.'use client' by default — every component is a Server Component unless it needs browser APIs, event listeners, or client state; unnecessary 'use client' negates streaming and server caching.cookies(), headers(), params, searchParams) in Next.js 15+ — synchronous access throws in strict mode and breaks PPR behavior.error.tsx and loading.tsx at route segments — without them, errors bubble to root and unmount the entire page; segment-level files enable granular error recovery and streaming UI.next/image with fill and sizes for fluid images — hard-coded width/height on fluid images causes layout shift that fails Core Web Vitals (CLS).| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| Using Pages Router for new routes | Cannot use Server Components, streaming, or cacheComponents | Use App Router (app/ directory) for all new routes; migrate incrementally |
Adding 'use client' by default | Forces client-side rendering; inflates bundle; loses streaming and caching | Keep server-only; add 'use client' only when browser APIs or event handlers are required |
Synchronous cookies() / headers() in Next.js 15+ | Throws in strict mode; breaks PPR; deprecated API | Await all Request APIs: const cookieStore = await cookies() |
| Hard-coded width/height on fluid images | Layout shifts fail CLS Core Web Vitals | Use fill with sizes for fluid containers; exact dimensions only for fixed-size images |
Missing error.tsx at route segments | Errors bubble to root; entire page unmounts on any error | Add error.tsx and loading.tsx at each segment; use Suspense for streaming |
Before starting:
cat .claude/context/memory/learnings.md
After completing: Record any new patterns or exceptions discovered.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.