
Writing Skills
This is a meta-skill for building skills themselves using test-driven development principles. You write pressure scenarios with subagents, watch them fail without the skill (establishing baseline behavior), write the documentation, then verify they follow the rules. The core insight is that if you haven't observed an agent failing without your skill, you don't know if you're teaching the right thing. It maps TDD concepts directly to documentation: test cases become stress scenarios, production code becomes SKILL.md, and refactoring means plugging loopholes in agent rationalization. Includes detailed guidance on frontmatter structure, Claude Search Optimization (never summarize workflow in descriptions), token efficiency tactics, and when to use flowcharts versus tables. The iron rule matches TDD: no skill without a failing test first, no exceptions.
- skills.sh installs
- 967
- GitHub stars
- 8.5K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add jnmetacode/superpowers-zh --skill writing-skills --agent claude-codeInstalls into .claude/skills of the current project.
Files
编写技能
概述
编写技能就是将测试驱动开发应用于流程文档。
个人技能存放在你所用运行环境的技能目录中(Claude Code 上是 ~/.claude/skills/)——其他运行环境的路径见 codex-tools.md 或 gemini-tools.md。Codex、Copilot CLI 和 Gemini CLI 也都认 ~/.agents/skills/,作为跨运行环境的别名。
你编写测试用例(带子智能体的压力场景),观察它们失败(基线行为),编写技能(文档),观察测试通过(智能体遵守规则),然后重构(堵住漏洞)。
核心原则: 如果你没有观察到智能体在没有该技能时失败,你就不知道这个技能是否教了正确的东西。
必需背景: 在使用此技能前,你必须理解 test-driven-development。该技能定义了基本的红-绿-重构循环。本技能将 TDD 适配到文档编写中。
官方指南: Anthropic 官方的技能编写最佳实践请参见 anthropic-best-practices.md。该文档提供了补充本技能 TDD 导向方法的额外模式和指南。
什么是技能?
技能是经过验证的技术、模式或工具的参考指南。技能帮助未来的 Claude 实例找到并应用有效的方法。
技能是: 可复用的技术、模式、工具、参考指南
技能不是: 关于你某次如何解决问题的叙事
TDD 映射到技能
| TDD 概念 | 技能创建 |
|---|---|
| 测试用例 | 带子智能体的压力场景 |
| 生产代码 | 技能文档(SKILL.md) |
| 测试失败(红) | 智能体在没有技能时违反规则(基线) |
| 测试通过(绿) | 智能体在有技能时遵守规则 |
| 重构 | 在保持合规的同时堵住漏洞 |
| 先写测试 | 在编写技能之前先运行基线场景 |
| 观察失败 | 记录智能体使用的确切合理化借口 |
| 最小代码 | 编写针对那些具体违规行为的技能 |
| 观察通过 | 验证智能体现在遵守规则 |
| 重构循环 | 发现新的合理化借口 → 堵住 → 重新验证 |
整个技能创建过程遵循红-绿-重构。
何时创建技能
Sponsors
Details
- Repository
- github.com/jnmetacode/superpowers-zh
- Categories
- Documentation, Skill Development
- First seen
- Jun 3, 2026
More from jnmetacode/superpowers-zh
All 20- Mcp Builder963
- Workflow Runner952
- Using Superpowers1.2K
- Chinese Documentation1.2K
- Brainstorming1.2K
- Systematic Debugging1.2K
- Receiving Code Review1.1K
- Verification Before Completion1.1K
- Writing Plans1.1K
- Test Driven Development1.1K
- Chinese Code Review1.1K
- Chinese Commit Conventions1K
- Subagent Driven Development1K
- Executing Plans1K
- Requesting Code Review1K
- Finishing A Development Branch993
- Using Git Worktrees987
- Chinese Git Workflow979
- Dispatching Parallel Agents970