writing-skills

Create and refine AI Skills using a Test-Driven Development methodology.

7|2|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/PracticalSwan/agent-skills --skill writing-skills-practicalswan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-skills
Source: https://github.com/PracticalSwan/agent-skills/tree/main/writing-skills
Command: npx skills add https://github.com/PracticalSwan/agent-skills --skill writing-skills-practicalswan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a rigorous, test-driven framework for creating and refining AI Skills, ensuring they are discoverable, effective, and resistant to misuse.

Core Features & Use Cases

  • Skill Creation Framework: Adapts Test-Driven Development (TDD) principles to the process of writing Skill documentation.
  • Rationalization Countermeasures: Provides techniques to prevent AI agents from bypassing Skill instructions under pressure.
  • Use Case: When developing a new Skill for managing code reviews, use this Skill's methodology to write failing test scenarios first, then craft the Skill to address those failures, and finally, refactor to close any loopholes identified during testing.

Quick Start

Follow the RED-GREEN-REFACTOR cycle to create a new skill.

Frequently Asked Questions about writing-skills

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

FAQPage Schema
How do I use TDD to write AI agent skills?

TDD for AI agent skills involves writing failure scenarios first, crafting minimal documentation to pass those tests, and refactoring to close loopholes. This cycle ensures the skill is effective and resistant to misuse.

What is the best way to prevent AI agents from bypassing skill instructions?

To prevent AI agents from bypassing skill instructions, use test-driven development to identify failure modes and apply rationalization countermeasures. This methodology refines skill documentation to close loopholes where agents bypass instructions under pressure.

How do I create a test scenario for AI skill documentation?

Create a test scenario for AI skill documentation by identifying specific failure modes first. Write minimal documentation to make the scenario pass, then refactor to close loopholes, ensuring the skill effectively enforces the intended agent behavior.

Does the test-driven skill creation methodology work for all skill types?

Yes, the test-driven skill creation methodology works for all skill types. It is explicitly applicable to discipline-enforcing, technique, pattern, and reference skills, providing a rigorous framework for refining agent behavior across different categories.

Why does my AI skill fail under pressure despite clear instructions?

AI skills fail under pressure because agents can rationalize and bypass instructions. The test-driven development methodology addresses this by identifying failure modes early and applying rationalization countermeasures to close documentation loopholes.