writing-skills

Apply test-driven development to validate skills with subagents before deployment.

4|Updated Dec 7, 2020
One-click install
npx skills add https://github.com/charly3pins/dotfiles --skill writing-skills-charly3pins
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-skills
Source: https://github.com/charly3pins/dotfiles/tree/main/.config/opencode/skills/writing-skills
Command: npx skills add https://github.com/charly3pins/dotfiles --skill writing-skills-charly3pins

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Untested skills often fail to achieve their intended purpose, are easily rationalized away by agents, or lack clarity, leading to ineffective automation and wasted effort.

Core Features & Use Cases

  • TDD for Documentation: Applies the Red-Green-Refactor cycle to skill creation, ensuring skills are rigorously tested and effective.
  • Rationalization Bulletproofing: Guides closing loopholes, addressing "spirit vs. letter" arguments, and building rationalization tables to ensure compliance.
  • Claude Search Optimization (CSO): Provides techniques for rich descriptions, keyword coverage, and token efficiency to ensure skill discoverability.
  • Use Case: When developing a new skill, use this to rigorously test it with subagents, identify and counter potential rationalizations, and optimize its discoverability, ensuring it's robust and effective.

Quick Start

I am creating a new skill. Guide me through the Test-Driven Development process for writing and testing this skill.

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 skill documentation follows the RED-GREEN-REFACTOR cycle: write failing tests first, implement the skill to pass those tests, then refactor. This ensures your skill behaves as intended before deployment and resists rationalization by agents.

What's the best way to prevent skills from being rationalized away by agents?

Build rationalization tables that identify loopholes and spirit-vs-letter arguments, then close them through precise YAML frontmatter with name and description fields. Test edge cases with subagents under pressure scenarios to surface rationalization patterns early.

How do I test a skill before deploying it across Claude Code and Codex environments?

Use subagents to validate skills in pressure scenarios that expose failure modes. Run minimal, testable patterns through the RED-GREEN-REFACTOR cycle, then verify compliance against your rationalization table before rollout.

What should a skill's YAML frontmatter include?

Skill YAML frontmatter requires at minimum a name field and description field. These support Claude Search Optimization through keyword coverage and token efficiency, improving discoverability while documenting the skill's exact scope.

Can I use this approach when editing existing skills?

Yes. Apply TDD to skill edits by writing tests for the changed behavior, verifying the edit passes those tests, and checking for new rationalization loopholes. This ensures edits don't degrade reliability or introduce unintended agent workarounds.

Why do untested skills fail to achieve their intended purpose?

Untested skills lack clarity around edge cases and lack verification that agents follow intent rather than circumvent it through rationalization. TDD surfaces these gaps before deployment, ensuring the skill performs reliably in real usage.