name: nextjs description: 使用nextjs.org/docs上的官方文档指导Next.js。当用户需要Next.js概念、配置、路由、数据获取或API参考详情时使用。 license: 完整条款在LICENSE.txt中
何时使用此技能
每当用户想要:
- 遵循Next.js文档主题(App Router、Pages Router、架构、社区)
- 实现Next.js路由、数据获取、缓存或部署
- 使用官方API和配置选项
如何使用此技能
- 从用户请求中识别主题。
- 在
examples/中打开匹配的示例文件。 - 遵循文件中链接的官方Next.js文档。
映射规则(与https://nextjs.org/docs一一对应)
examples/目录镜像官方文档结构:
examples/index.md→ https://nextjs.org/docsexamples/app/...→ https://nextjs.org/docs/app/…examples/pages/...→ https://nextjs.org/docs/pages/…examples/architecture/...→ https://nextjs.org/docs/architecture/…examples/community/...→ https://nextjs.org/docs/community/…
路径规则:
- 从文档文件夹和文件名中移除数字前缀(例如,
01-app→app)。 index.mdx页面映射到对应目录中的index.md。
资源
关键词
Next.js, App Router, Pages Router, 路由, 数据获取, 缓存, 服务器组件, 客户端组件, 中间件, 部署, 配置