writing-skills

Apply test-driven development to SKILL.md documentation and validate skill robustness.

4|1|Updated Oct 29, 2025
One-click install
npx skills add https://github.com/samjhecht/wrangler --skill writing-skills-samjhecht
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-skills
Source: https://github.com/samjhecht/wrangler/tree/main/skills/writing-skills
Command: npx skills add https://github.com/samjhecht/wrangler --skill writing-skills-samjhecht

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Creating effective AI skills requires more than just writing instructions; they must be tested, optimized for discovery, and bulletproofed against agent rationalization to ensure reliable automation.

Core Features & Use Cases

  • TDD for Skills: Applies the RED-GREEN-REFACTOR cycle to skill documentation, testing with subagents before writing and iterating until bulletproof.
  • Skill Structure & Content: Guides on optimal SKILL.md structure, frontmatter, overview, and code examples for clarity and discoverability.
  • Claude Search Optimization (CSO): Provides techniques for rich descriptions, keyword coverage, and token efficiency to ensure skills are easily found by Claude.
  • Anti-Rationalization Techniques: Builds rationalization tables and red flags lists to explicitly counter agent excuses and enforce discipline.
  • Use Case: When creating new AI skills, editing existing ones, or verifying skills before deployment, this skill ensures they are high-quality, discoverable, and reliably followed by agents.

Quick Start

I want to create a new skill for 'database migrations'. Guide me through the process of writing and testing it.

Frequently Asked Questions about writing-skills

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply test-driven development to skill documentation?

Test-driven development for skills follows the RED-GREEN-REFACTOR cycle: write baseline tests for your skill's behavior first, execute them against draft documentation to identify gaps, then iterate your SKILL.md content until tests pass. This ensures skills are bulletproof before deployment and agents follow instructions reliably.

What structure and content should my SKILL.md file include?

An effective SKILL.md combines frontmatter metadata, a clear overview of the skill's purpose, concrete code examples, and anti-rationalization tables that explicitly counter agent excuses. Optimal structure improves both discoverability and enforcement of your skill's logic by Claude agents.

How do I optimize my skill for Claude search discovery?

Claude Search Optimization (CSO) uses rich descriptions, comprehensive keyword coverage, and efficient token use in your skill's overview and metadata. Strategic keyword placement and clear use-case framing ensure Claude agents find and select your skill when matching user problems.

What are anti-rationalization techniques and why do they matter?

Anti-rationalization techniques build explicit tables and red-flags lists that close loopholes agents might exploit to skip your skill's steps. They enforce discipline by preempting agent excuses and ensuring reliable automation of your skill's core task.

When should I use test-driven development for skills?

Apply TDD to skills when creating new ones, editing existing skills, testing under pressure scenarios, or validating readiness before deployment. Testing early catches ambiguities in documentation and prevents skills from failing in production agent workflows.

Can I use this approach for skills that depend on external tools?

Yes. Skills with no dependencies benefit most, but the TDD and anti-rationalization patterns apply universally. Baseline tests verify behavior regardless of downstream dependencies, and anti-rationalization tables clarify when agents should invoke external tools versus skip steps.