writing-skills

Guide RED-GREEN-REFACTOR cycles for creating and refining AI agent skills.

8|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/hxk622/TokenDance --skill writing-skills-hxk622
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-skills
Source: https://github.com/hxk622/TokenDance/tree/main/backend/app/skills/builtin/superpowers/writing-skills
Command: npx skills add https://github.com/hxk622/TokenDance --skill writing-skills-hxk622

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures that new and updated skills are robust, well-documented, and effectively guide AI agents by applying Test-Driven Development (TDD) principles to the process of creating and refining documentation.

Core Features & Use Cases

  • TDD for Documentation: Adapts the RED-GREEN-REFACTOR cycle to skill authoring.
  • Bulletproofing Skills: Helps close loopholes and prevent rationalizations that lead to non-compliance.
  • Use Case: When creating a new skill for enforcing coding standards, use this skill to first define scenarios where an agent might break the standard, then write the skill to enforce it, and finally test against new rationalizations.

Quick Start

Use the writing-skills skill to create a new skill by following the TDD process.

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 AI agent skill creation?

Applying Test-Driven Development to skill creation involves defining baseline failure scenarios first, writing minimal documentation to pass those scenarios, and refactoring to close loopholes. This enforces robust agent behavior through a structured RED-GREEN-REFACTOR cycle.

What is the best way to bulletproof process documentation against AI rationalizations?

Bulletproofing process documentation requires using a TDD approach to anticipate rationalizations that lead to non-compliance. You write tests for loopholes, refine the documentation to enforce compliance under pressure, and verify the agent cannot bypass the rules.

How do I write AI agent skills that remain compliant under pressure?

Writing compliant AI agent skills requires defining scenarios where an agent might break standards, then writing the skill to enforce it. Refactoring the documentation closes loopholes and ensures the agent maintains compliance under pressure.

When should I use a TDD cycle for refining documentation?

Use a TDD cycle for refining documentation when creating new or updated skills that must effectively guide AI agents. It is necessary when you need to ensure robustness and prevent agents from rationalizing their way around established rules.

Does my coding standards skill need baseline failure scenarios before writing the rules?

Yes, defining baseline failure scenarios before writing the rules is the core requirement. Starting with scenarios where an agent might break the standard ensures the minimal documentation you write directly addresses and enforces those specific failures.

Why does my AI agent keep finding loopholes in my process documentation?

AI agents find loopholes in process documentation when it lacks refactoring against new rationalizations. Using a TDD cycle helps close these gaps by continuously testing the documentation against scenarios where the agent attempts to rationalize non-compliance.