writing-skills

Create and refine AI agent skills using RED-GREEN-REFACTOR cycles.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/marcusfelix/barney --skill writing-skills-marcusfelix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-skills
Source: https://github.com/marcusfelix/barney/tree/main/src/prompts/skills/writing-skills
Command: npx skills add https://github.com/marcusfelix/barney --skill writing-skills-marcusfelix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures that new and updated skills are robust, discoverable, and effectively guide AI agents by applying Test-Driven Development (TDD) principles to documentation.

Core Features & Use Cases

  • TDD for Documentation: Follows the RED-GREEN-REFACTOR cycle for skill creation.
  • Pressure Testing: Designs scenarios to test agent compliance under realistic constraints.
  • Rationalization Countermeasures: Identifies and explicitly addresses common excuses agents use to bypass rules.
  • Use Case: When creating a new skill for code review, you'll use this skill's methodology to first write tests that show an agent failing to perform a good review without the skill, then write the skill to make them comply, and finally refactor to close any loopholes they find.

Quick Start

Use the writing-skills skill when creating or editing any new skill documentation.

Frequently Asked Questions about writing-skills

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

FAQPage Schema
How do I apply TDD principles to AI agent skill creation?

To apply TDD principles to skill creation, follow a structured RED-GREEN-REFACTOR cycle for documentation. First, write tests that show an agent failing without the skill, then write the skill to ensure compliance, and finally refactor to close loopholes.

Why does my AI agent bypass documentation rules during testing?

AI agents bypass documentation rules through rationalization. Countermeasures involve explicitly identifying common excuses agents use to bypass rules and designing pressure testing scenarios to test agent compliance under realistic constraints.

What is the best way to pressure test AI agent compliance?

The best way to pressure test agent compliance is by designing scenarios that test the agent under realistic constraints. This structured approach ensures skills remain robust and effectively guide agents even when facing pressure to rationalize rule bypasses.

How do I refactor AI agent skills to close compliance loopholes?

To refactor AI agent skills and close loopholes, complete the RED-GREEN-REFACTOR cycle. After writing the skill to make agents comply, refactor the documentation to address any discovered rationalization patterns and prevent future rule bypasses.

Can I use subagent testing to validate skill documentation?

Yes, you can validate skill documentation using subagent testing. This methodology tests whether an agent fails without the skill, succeeds with it, and prevents rationalization, ensuring the documentation is robust, discoverable, and compliant.

When do I need to use TDD for documentation?

You need to use TDD for documentation when creating or editing any new skill. This ensures that the skills are robust, discoverable, and effectively guide AI agents by addressing authoring, subagent testing, and compliance under pressure.