Краткое содержание
Test-driven documentation for creating reusable agent techniques, patterns, and reference guides.
-
Сначала опишите неуспешные тестовые сценарии (базовое поведение без skills), затем напишите минимальную документацию навыка, чтобы устранить конкретные нарушения, следуя циклa RED-GREEN-REFACTOR
-
Навыки live in agent-specific директориях и должны включать YAML frontmatter (name, description), обзор, core patterns, quick reference, и common mistakes sections
-
поля Description field должно начинаться с "Use when..." и перечислять только triggering conditions — никогда не summarize workflow, as Claude may follow description instead of reading full skill content
-
Requires understanding superpowers:test-driven-development; дисциплина-enforcing skills need explicit loophole closures and rationalization tables to resist workarounds under pressure
-
Keep getting-started skills under 150 words, other frequently-loaded skills under 200 words total; use cross-references and tool help to compress token usage
Навыки написания
Обзор
Навыки написания IS Test-Driven Development applied to process documentation.
Личные навыки находятся в вашем runtime's skills directory (~/.claude/skills/ on Claude Code) — см. codex-tools.md or gemini-tools.md для пути на тех рантаймах. Codex, Copilot CLI, and Gemini CLI all also recognize ~/.agents/skills/ as a cross-runtime alias.
Вы пишете тестовые кейсы (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes).
Core principle: If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.
REQUIRED BACKGROUND: You MUST understand superpowers:test-driven-development before using this skill. That skill defines the fundamental RED-GREEN-REFACTOR cycle. This skill adapts TDD to documentation.
Official guidance: For Anthropic's official skill authoring best practices, see anthropic-best-practices.md. This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.
Что такое навык?
A skill is a reference guide for proven techniques, patterns, or tools. Skills help future agents find and apply effective approaches.