npx skills add https://github.com/vercel/next.js --skill write-guide创作一份技术指南,通过渐进式示例教授一个真实世界的用例。仅在读者需要时才引入概念。
每份指南解决一个具体问题。不是一类问题。如果大纲包含 5 个以上步骤或涵盖多种方法,请将其拆分。
每份指南都遵循以下脉络:引言、示例设置、2-5 个渐进步骤、后续步骤。
每个步骤遵循以下循环:可运行的代码 → 新需求 → 阻碍 → 解释 → 解决方案 → 可观察的证明。
章节:引言(无标题,最多 2 段)、## 示例(我们要构建什么 + 源代码链接)、### 步骤 N(以行动为导向的标题,2-4 个步骤)、## 后续步骤(总结 + 相关链接)。
标题本身应该能讲述一个故事。如果读者只看到标题,他们就能理解指南的核心要点。
---
title: {以行动为导向,例如 "构建 X" 或 "如何 Y"}
description: {一句话描述}
nav_title: {用于导航的简短标题}
---
{读者将完成什么以及为什么它很重要。遇到的阻碍以及本方法如何解决它。最多 2 段。}
## 示例
作为示例,我们将构建 {我们要构建的东西}。
我们将从 {步骤 1} 开始,然后是 {步骤 2},以及 {步骤 3}。
{源代码链接。}
### 步骤 1: {以行动为导向的标题}
{简要背景,1-2 句话。}
```tsx filename="path/to/file.tsx"
// 最小可运行代码
```
{解释发生了什么。}
{引入阻碍:警告、限制或约束。}
{解决方案:解释选择,应用修复。}
{通过可观察的证明验证修复。}
### 步骤 2: {以行动为导向的标题}
{相同模式:背景 → 代码 → 解释 → 阻碍 → 解决方案 → 证明。}
### 步骤 3: {以行动为导向的标题}
{相同模式。}
## 后续步骤
你现在知道如何 {总结}。
接下来,学习如何:
- [相关指南 1]()
- [相关指南 2]()
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
function Header() {} 折叠未更改的函数。| 避免使用 | 应该使用 |
|---|---|
| "在管道中产生摩擦" | "阻塞响应" |
| "需要动态信息" | "依赖于请求时的数据" |
| "需要动态处理" | "输出无法提前预知" |
| "组件阻塞了响应——导致延迟" | "组件阻塞了响应。这会导致延迟。" |
在写作前,请阅读 docs/01-app/02-guides/ 中的这些指南。它们展示了上述模式。
public-static-pages.mdx — 引言 → 示例 → 3 个渐进步骤 → 后续步骤。在解决方案点命名概念。用构建输出展示问题。forms.mdx — 渐进式功能构建,没有明确的"步骤"标签。每个部分增加一项能力。每周安装数
112
代码仓库
GitHub 星标数
138.5K
首次出现
11 天前
安全审计
安装于
opencode106
gemini-cli105
github-copilot105
codex105
cursor105
kimi-cli104
Produce a technical guide that teaches a real-world use case through progressive examples. Concepts are introduced only when the reader needs them.
Each guide solves one specific problem. Not a category of problems. If the outline has 5+ steps or covers multiple approaches, split it.
Every guide follows this arc: introduction, example setup, 2-5 progressive steps, next steps.
Each step follows this loop: working code → new requirement → friction → explanation → resolution → observable proof.
Sections: introduction (no heading, 2 paragraphs max), ## Example (what we're building + source link), ### Step N (action-oriented titles, 2-4 steps), ## Next steps (summary + related links).
Headings should tell a story on their own. If readers only saw the headings, they'd understand the guide's takeaway.
---
title: {Action-oriented, e.g., "Building X" or "How to Y"}
description: {One sentence}
nav_title: {Short title for navigation}
---
{What the reader will accomplish and why it matters. The friction and how this approach resolves it. 2 paragraphs max.}
## Example
As an example, we'll build {what we're building}.
We'll start with {step 1}, then {step 2}, and {step 3}.
{Source code link.}
### Step 1: {Action-oriented title}
{Brief context, 1-2 sentences.}
```tsx filename="path/to/file.tsx"
// Minimal working code
```
{Explain what happens.}
{Introduce friction: warning, limitation, or constraint.}
{Resolution: explain the choice, apply the fix.}
{Verify the fix with observable proof.}
### Step 2: {Action-oriented title}
{Same pattern: context → code → explain → friction → resolution → proof.}
### Step 3: {Action-oriented title}
{Same pattern.}
## Next steps
You now know how to {summary}.
Next, learn how to:
- [Related guide 1]()
- [Related guide 2]()
function Header() {}.| Don't | Do |
|---|---|
| "creates friction in the pipeline" | "blocks the response" |
| "needs dynamic information" | "depends on request-time data" |
| "requires dynamic processing" | "output can't be known ahead of time" |
| "The component blocks the response — causing delays" | "The component blocks the response. This causes delays." |
Read these guides in docs/01-app/02-guides/ before writing. They demonstrate the patterns above.
public-static-pages.mdx — intro → example → 3 progressive steps → next steps. Concepts named at point of resolution. Problems shown with build output.forms.mdx — progressive feature building without explicit "Step" labels. Each section adds one capability.Weekly Installs
112
Repository
GitHub Stars
138.5K
First Seen
11 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode106
gemini-cli105
github-copilot105
codex105
cursor105
kimi-cli104
任务估算指南:敏捷开发故事点、计划扑克、T恤尺码法详解
10,500 周安装
Encore API 端点开发指南:TypeScript API 创建与配置教程
226 周安装
Kibana Vega 技能:使用 ES|QL 与 Vega 语法创建高度定制化 Kibana 仪表板和数据可视化
223 周安装
TanStack Query (React Query) 教程:React 异步状态管理与数据获取库
227 周安装
React/React Native 组件脚手架生成器 - 自动化创建生产级组件
228 周安装
WCAG无障碍审计与测试工具 - 自动化扫描与手动验证,确保网站可访问性合规
228 周安装
安全套件 (security-suite) - 二进制与仓库安全测试、行为契约分析与CI门控工具
237 周安装