ワンクリックで
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when creating new skills, editing existing skills, or verifying skills work before deployment
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Use when implementing any feature or bugfix, before writing implementation code
Use when executing implementation plans with independent tasks in the current session
You MUST use this before creative or behavior-changing work — creating features, building components, adding functionality, modifying behavior, or ambiguous product intent. Explores user intent, requirements and design before implementation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
| name | writing-skills |
| description | Use when creating new skills, editing existing skills, or verifying skills work before deployment |
Writing skills IS Test-Driven Development applied to process documentation.
Personal skills live in your runtime's skills directory
You write test cases (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 wukong-code: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.
Skills are: Reusable techniques, patterns, tools, reference guides
Skills are NOT: Narratives about how you solved a problem once
| TDD Concept | Skill Creation |
|---|---|
| Test case | Pressure scenario with subagent |
| Production code | Skill document (SKILL.md) |
| Test fails (RED) | Agent violates rule without skill (baseline) |
| Test passes (GREEN) | Agent complies with skill present |
| Refactor | Close loopholes while maintaining compliance |
| Write test first | Run baseline scenario BEFORE writing skill |
| Watch it fail | Document exact rationalizations agent uses |
| Minimal code | Write skill addressing those specific violations |
| Watch it pass | Verify agent now complies |
| Refactor cycle | Find new rationalizations → plug → re-verify |
The entire skill creation process follows RED-GREEN-REFACTOR.
Create when:
Don't create for:
skills/
skill-name/
SKILL.md # Main reference (required)
supporting-file.* # Only if needed
Flat namespace — all skills in one searchable namespace.
Separate files for: heavy reference (100+ lines); reusable tools/scripts.
Keep inline: principles, small code patterns (< 50 lines), everything else essential.
Frontmatter (YAML):
name and description (see agentskills.io/specification for all supported fields)name: letters, numbers, hyphens onlydescription: Third-person, ONLY when to use (NOT what it does). Start with "Use when...". NEVER summarize the skill's process or workflow (agents may follow the description and skip the body).---
name: Skill-Name-With-Hyphens
description: Use when [specific triggering conditions and symptoms]
---
# Skill Name
## Overview
What is this? Core principle in 1-2 sentences.
## When to Use
[Small inline flowchart IF decision non-obvious]
Bullet list with SYMPTOMS and use cases
When NOT to use
## Core Pattern (for techniques/patterns)
Before/after code comparison
## Quick Reference
Table or bullets for scanning common operations
## Implementation
Inline code for simple patterns
Link to file for heavy reference or reusable tools
## Common Mistakes
What goes wrong + fixes
## Real-World Impact (optional)
Concrete results
Critical: description = when to use, NOT workflow summary. A description that summarizes process becomes a shortcut agents take instead of reading the skill.
On-demand (rich description examples, keywords, naming, token efficiency, cross-refs):
skills/writing-skills/references/skill-discovery-optimization.md
Flowcharts, code examples, file organization shapes:
skills/writing-skills/references/authoring-patterns.md
Graphviz style: graphviz-conventions.dot. Render: ./render-graphs.js ../some-skill.
NO SKILL WITHOUT A FAILING TEST FIRST
This applies to NEW skills AND EDITS to existing skills.
Write skill before testing? Delete it. Start over. Edit skill without testing? Same violation.
No exceptions:
REQUIRED BACKGROUND: The wukong-code:test-driven-development skill explains why this matters. Same principles apply to documentation.
Discipline skills need pressure scenarios + rationalization counters. Technique/pattern/reference skills need application/retrieval tests.
Match form to failure: rule-skip → prohibition + rationalization table; wrong shape → positive recipe; omitted field → REQUIRED slot; conditional → observable predicate.
Full tables, bulletproofing toolkit, RED-GREEN-REFACTOR detail, micro-tests:
skills/writing-skills/references/testing-and-bulletproofing.md
Testing methodology (pressure scenarios): testing-skills-with-subagents.md
Persuasion research: persuasion-principles.md
Anti-patterns (narrative examples, multi-language dilution, etc.):
skills/writing-skills/references/anti-patterns.md
After writing ANY skill, you MUST STOP and complete the deployment process.
Do NOT:
The deployment checklist below is MANDATORY for EACH skill.
Deploying untested skills = deploying untested code. It's a violation of quality standards.
IMPORTANT: Create a todo for EACH checklist item below.
RED Phase - Write Failing Test:
GREEN Phase - Write Minimal Skill:
name and description fields (max 1024 chars; see spec)REFACTOR Phase - Close Loopholes:
Quality Checks:
Deployment:
How future agents find your skill — searchable terms early:
skills/writing-skills/references/discovery-workflow.md
Creating skills IS TDD for process documentation.
Same Iron Law: No skill without failing test first. Same cycle: RED (baseline) → GREEN (write skill) → REFACTOR (close loopholes). Same benefits: Better quality, fewer surprises, bulletproof results.
If you follow TDD for code, follow it for skills. It's the same discipline applied to documentation.