documentation-writing by rysweet/amplihack
npx skills add https://github.com/rysweet/amplihack --skill documentation-writing遵循八项规则和 Diataxis 框架,创建高质量、易于发现的文档。确保所有文档都正确放置、链接,并包含真实可运行的示例。
当您提到以下内容时,我会自动加载:
docs/ 目录下切勿放入 docs/:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
临时信息应存放的位置:
# [功能名称]
关于此功能的简要一句话描述。
## 快速开始
最少的入门步骤(最多 3-5 步)。
## 目录
- [配置](#configuration)
- [使用](#usage)
- [故障排除](#troubleshooting)
## 配置
包含真实示例的分步设置说明。
## 使用
包含可运行代码的常见用例。
## 故障排除
常见问题及解决方案。
| 类型 | 目的 | 位置 | 用户问题 |
|---|---|---|---|
| 教程 | 学习 | docs/tutorials/ | "教我如何做" |
| 操作指南 | 执行 | docs/howto/ | "帮我做 X" |
| 参考 | 信息 | docs/reference/ | "有哪些选项?" |
| 概念解释 | 理解 | docs/concepts/ | "为什么是这样?" |
提问:读者想要完成什么?
docs/
├── tutorials/ # 面向学习
├── howto/ # 面向任务
├── reference/ # 面向信息
├── concepts/ # 面向理解
└── index.md # 链接到所有文档
每个概念都需要一个可运行的示例:
# 示例:分析文件复杂度
from amplihack import analyze
result = analyze("src/main.py")
print(f"Complexity: {result.score}")
# Output: Complexity: 12.5
在 docs/index.md 中添加条目:
- [新功能指南](./howto/new-feature.md) - 如何配置 X
完成前的检查清单:
docs/ 目录下reference.md - 当您需要时阅读:
examples.md - 当您需要时阅读:
| 反模式 | 为何不好 | 更好的方法 |
|---|---|---|
| "点击这里" 链接 | 缺乏上下文 | "参见 auth config" |
| foo/bar 示例 | 不真实 | 使用真实项目代码 |
| 文字墙 | 难以浏览 | 使用标题和项目符号 |
| 孤立文档 | 无法被发现 | 从索引链接 |
| 文档中的状态信息 | 会过时 | 使用 Issues/PRs |
在实现之前编写文档时(文档驱动开发):
# [计划中 - 待实现]
本文档描述了功能 X 的预期行为。
## 计划接口
```python
# [PLANNED] - 此 API 将实现
def future_function(input: str) -> Result:
"""Process input and return result."""
pass
```
一旦实现,移除 [PLANNED] 标记并用真实示例更新。
---
**完整参考**:参见 [reference.md](./reference.md) 获取完整规范。
**模板**:参见 [examples.md](./examples.md) 获取可复制的模板。
每周安装次数
161
仓库
GitHub 星标数
39
首次出现
Jan 21, 2026
安全审计
安装于
opencode148
codex136
gemini-cli133
cursor129
github-copilot128
claude-code122
Creates high-quality, discoverable documentation following the Eight Rules and Diataxis framework. Ensures all docs are properly located, linked, and contain real runnable examples.
I load automatically when you mention:
docs/ directoryNever put indocs/:
Where temporal info belongs:
# [Feature Name]
Brief one-sentence description of what this is.
## Quick Start
Minimal steps to get started (3-5 steps max).
## Contents
- [Configuration](#configuration)
- [Usage](#usage)
- [Troubleshooting](#troubleshooting)
## Configuration
Step-by-step setup with real examples.
## Usage
Common use cases with runnable code.
## Troubleshooting
Common problems and solutions.
| Type | Purpose | Location | User Question |
|---|---|---|---|
| Tutorial | Learning | docs/tutorials/ | "Teach me how" |
| How-To | Doing | docs/howto/ | "Help me do X" |
| Reference | Information | docs/reference/ | "What are the options?" |
| Explanation | Understanding | docs/concepts/ | "Why is it this way?" |
Ask: What is the reader trying to accomplish?
docs/
├── tutorials/ # Learning-oriented
├── howto/ # Task-oriented
├── reference/ # Information-oriented
├── concepts/ # Understanding-oriented
└── index.md # Links to all docs
Every concept needs a runnable example:
# Example: Analyze file complexity
from amplihack import analyze
result = analyze("src/main.py")
print(f"Complexity: {result.score}")
# Output: Complexity: 12.5
Add entry to docs/index.md:
- [New Feature Guide](./howto/new-feature.md) - How to configure X
Checklist before completion:
docs/ directoryreference.md - Read when you need:
examples.md - Read when you need:
| Anti-Pattern | Why It's Bad | Better Approach |
|---|---|---|
| "Click here" links | No context | "See auth config" |
| foo/bar examples | Not realistic | Use real project code |
| Wall of text | Hard to scan | Use headings and bullets |
| Orphan docs | Never found | Link from index |
| Status in docs | Gets stale | Use Issues/PRs |
When writing documentation BEFORE implementation (document-driven development):
# [PLANNED - Implementation Pending]
This document describes the intended behavior of Feature X.
## Planned Interface
```python
# [PLANNED] - This API will be implemented
def future_function(input: str) -> Result:
"""Process input and return result."""
pass
```
Once implemented, remove the [PLANNED] markers and update with real examples.
---
**Full reference**: See [reference.md](./reference.md) for complete specification.
**Templates**: See [examples.md](./examples.md) for copy-paste templates.
Weekly Installs
161
Repository
GitHub Stars
39
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode148
codex136
gemini-cli133
cursor129
github-copilot128
claude-code122
任务估算指南:敏捷开发故事点、计划扑克、T恤尺码法详解
10,500 周安装
列表布局设计指南:何时使用、结构、变体与最佳实践 | UX/UI设计
159 周安装
依赖项与复用审计器 - 代码安全漏洞扫描、依赖管理优化工具
159 周安装
GCP开发最佳实践指南:Terraform、Cloud Functions、Cloud Run、Firestore与BigQuery
159 周安装
从AI工作流中移除技能指南 - 清理未使用或弃用技能完整教程
159 周安装
Hyvä Playwright 测试指南:解决 Alpine.js 冲突,编写可靠电商自动化测试
159 周安装
Clojure开发技能:REPL驱动开发与函数式编程最佳实践指南
159 周安装