·nextjs-server-client-components
</>

nextjs-server-client-components

wsimmonds/claude-nextjs-skills

在 Next.js App Router 中选择服务器组件和客户端组件的指南。对于useSearchParams(需要Suspense +“使用客户端”)、导航(链接、重定向、useRouter)、cookies/标头访问和“使用客户端”指令至关重要。当提示提及 useSearchParams、Suspense、导航、路由、链接组件、重定向、路径名、searchParams、cookie、标头、异步组件或“使用客户端”时激活。对于避免混合服务器/客户端 API 至关重要。

50安装·2热度·@wsimmonds

安装

$npx skills add https://github.com/wsimmonds/claude-nextjs-skills --skill nextjs-server-client-components

SKILL.md

Provide comprehensive guidance for choosing between Server Components and Client Components in Next.js App Router, including cookie/header access, searchParams handling, pathname routing, and React's 'use' API for promise unwrapping.

CRITICAL RULE: This codebase has @typescript-eslint/no-explicit-any enabled. Using any will cause build failures.

All components in the App Router are Server Components by default. No directive needed.

在 Next.js App Router 中选择服务器组件和客户端组件的指南。对于useSearchParams(需要Suspense +“使用客户端”)、导航(链接、重定向、useRouter)、cookies/标头访问和“使用客户端”指令至关重要。当提示提及 useSearchParams、Suspense、导航、路由、链接组件、重定向、路径名、searchParams、cookie、标头、异步组件或“使用客户端”时激活。对于避免混合服务器/客户端 API 至关重要。 来源:wsimmonds/claude-nextjs-skills。

查看原文

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/wsimmonds/claude-nextjs-skills --skill nextjs-server-client-components
分类
</>开发工具
认证
收录时间
2026-02-01
更新时间
2026-02-18

快速解答

什么是 nextjs-server-client-components?

在 Next.js App Router 中选择服务器组件和客户端组件的指南。对于useSearchParams(需要Suspense +“使用客户端”)、导航(链接、重定向、useRouter)、cookies/标头访问和“使用客户端”指令至关重要。当提示提及 useSearchParams、Suspense、导航、路由、链接组件、重定向、路径名、searchParams、cookie、标头、异步组件或“使用客户端”时激活。对于避免混合服务器/客户端 API 至关重要。 来源:wsimmonds/claude-nextjs-skills。

如何安装 nextjs-server-client-components?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/wsimmonds/claude-nextjs-skills --skill nextjs-server-client-components 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用

这个 Skill 的源码在哪?

https://github.com/wsimmonds/claude-nextjs-skills