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-code

Installs 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
1theqtcompanyrnd avatarqt-cpp-docstheqtcompanyrnd/agent-skills>-866skills.sh installs
2alirezarezvani avatarquality-documentation-manageralirezarezvani/claude-skillsDocument control system management for medical device QMS. Covers document numbering, version control, change management, and 21 CFR Part 11 compliance. Use whe819skills.sh installs
3theqtcompanyrnd avatarqt-qml-docstheqtcompanyrnd/agent-skills>-801skills.sh installs
4aradotso avatarawesome-marketing-science-guidearadotso/marketing-skillsawesome marketing science guide793skills.sh installs
5sickn33 avatarplan-writingsickn33/antigravity-awesome-skillsplan writing772skills.sh installs
6kagurananaga avatarofficial-document-writingkagurananaga/official-document-writing-skill专业的党政机关公文写作指南。当用户需要撰写、修改或审核党政机关公文(如请示、通知、函、总结、纪要等)时使用。提供GB/T 9704-2012格式规范指导、常用公文模板、语言规范建议和公文质量检查。适用于以下场景:(1) 撰写新公文,(2) 修改完善公文,(3) 检查公文格式规范,(4) 提供公文写作指导,(5) 审核公754skills.sh installs