Use when creating new skills, editing existing ones, or verifying skill quality before deployment.
This skill enforces a Test-Driven Development (TDD) approach to documentation and skill authoring. By defining what a skill must achieve before writing its content, we ensure functional clarity and prevent "hallucinated utility" or generic, ungrounded advice.
NO SKILL WITHOUT A FAILING TEST FIRST
Skills written without a prior test case often drift into generic filler that doesn't solve a specific user problem. The test case grounds the skill in reality.
digraph writing_skills_flow {
"Start" [shape=doublecircle];
"Step 1: Define User Problem" [shape=box];
"Step 2: Write Failing Test Case" [shape=box];
"Step 3: Define Acceptance Criteria" [shape=box];
"Step 4: Author Skill Content" [shape=box];
"Step 5: Run Test Case" [shape=box];
"Gate: Pass Test?" [shape=diamond];
"Done" [shape=doublecircle];
"Start" -> "Step 1: Define User Problem";
"Step 1: Define User Problem" -> "Step 2: Write Failing Test Case";
"Step 2: Write Failing Test Case" -> "Step 3: Define Acceptance Criteria";
"Step 3: Define Acceptance Criteria" -> "Step 4: Author Skill Content";
"Step 4: Author Skill Content" -> "Step 5: Run Test Case";
"Step 5: Run Test Case" -> "Gate: Pass Test?";
"Gate: Pass Test?" -> "Done" [label="pass"];
"Gate: Pass Test?" -> "Step 4: Author Skill Content" [label="fail"];
}
Identify the specific failure mode or knowledge gap the user is facing. What happens when the user doesn't have this skill? (Source: system design)
Draft a sample prompt or scenario where a generic LLM (or the current skill) would fail. This is the "Red" phase of TDD. (Source: system design)
List 3-5 specific, testable behaviors the skill MUST exhibit to be considered successful. (Source: system design)
Write the skill following the appropriate rigor template (full rigor or standard rigor). Every principle must directly address the failure mode identified in Step 1. (Source: system design)
Execute the failing test case from Step 2 against the newly authored skill. If the output meets the acceptance criteria, the skill passes. (Source: system design)
REQUIRED SUB-SKILL: None RECOMMENDED SUB-SKILL: prompt-optimizer — to refine the test case and skill instructions.
| Thought | Reality | |---------|---------| | "I know what I want to say, I don't need a test case." | Without a test, you won't know if the skill actually changes the LLM's behavior. | | "Writing the test takes too much time." | Fixing a broken skill after deployment takes 10x more time. | | "This skill is too simple for TDD." | Simple skills are where generic filler is most likely to hide. | | "I'll write the test after I finish the skill." | This defeats the purpose; you will subconsciously write a test the skill can already pass. |
These thoughts mean STOP — you are about to shortcut:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer