nextjs-pathname-id-fetch
✓在 Next.js 中使用 URL 参数获取数据的集中模式。涵盖创建动态路由([id]、[slug])以及访问服务器组件中的路由参数以从 API 获取数据。在构建基于 URL 参数显示单个项目(产品页面、博客文章、用户个人资料)的页面时使用。使用简化的常见情况模式补充 nextjs-dynamic-routes-params。
SKILL.md
Use this pattern whenever a page needs to load data based on whatever identifier appears in the URL. Common scenarios include:
If the requirement says the data should change depending on the current URL path, the route segment must be dynamic (e.g., [id], [slug], [...slug]).
Unless requirements explicitly call for /products/[id], keep the structure at the top level (app/[id]/page.tsx).
在 Next.js 中使用 URL 参数获取数据的集中模式。涵盖创建动态路由([id]、[slug])以及访问服务器组件中的路由参数以从 API 获取数据。在构建基于 URL 参数显示单个项目(产品页面、博客文章、用户个人资料)的页面时使用。使用简化的常见情况模式补充 nextjs-dynamic-routes-params。 来源:wsimmonds/claude-nextjs-skills。
可引用信息
为搜索与 AI 引用准备的稳定字段与命令。
- 安装命令
npx skills add https://github.com/wsimmonds/claude-nextjs-skills --skill nextjs-pathname-id-fetch- 分类
- </>开发工具
- 认证
- ✓
- 收录时间
- 2026-02-01
- 更新时间
- 2026-02-18
快速解答
什么是 nextjs-pathname-id-fetch?
在 Next.js 中使用 URL 参数获取数据的集中模式。涵盖创建动态路由([id]、[slug])以及访问服务器组件中的路由参数以从 API 获取数据。在构建基于 URL 参数显示单个项目(产品页面、博客文章、用户个人资料)的页面时使用。使用简化的常见情况模式补充 nextjs-dynamic-routes-params。 来源:wsimmonds/claude-nextjs-skills。
如何安装 nextjs-pathname-id-fetch?
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/wsimmonds/claude-nextjs-skills --skill nextjs-pathname-id-fetch 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用
这个 Skill 的源码在哪?
https://github.com/wsimmonds/claude-nextjs-skills
详情
- 分类
- </>开发工具
- 来源
- skills.sh
- 收录时间
- 2026-02-01