testing-skills-with-subagents

Automate RED-GREEN-REFACTOR testing of skills with subagents.

270k|24.1k|Updated Oct 9, 2025
One-click install
npx skills add https://github.com/obra/superpowers --skill testing-skills-with-subagents-obra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-skills-with-subagents
Source: https://github.com/obra/superpowers/tree/main/skills/testing-skills-with-subagents
Command: npx skills add https://github.com/obra/superpowers --skill testing-skills-with-subagents-obra

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solves? This Skill ensures that skills (process documentation) are robust and resist rationalization by applying a Test-Driven Development (TDD)-like cycle. It prevents agents from bypassing critical practices under pressure, making skills truly effective and non-negotiable.

Core Features & Use Cases

  • TDD for Documentation: Guides you through running scenarios without the skill (RED), writing the skill to address failures (GREEN), and closing loopholes (REFACTOR), just like code TDD.
  • Pressure Scenario Generation: Teaches how to create realistic test scenarios combining multiple pressures (time, sunk cost, authority, exhaustion) to stress-test skill compliance.
  • Rationalization Countering: Systematically identifies and explicitly negates agent rationalizations, building a "bulletproof" skill that resists bypass attempts.
  • Use Case: When creating a new TDD skill, you'd first run a scenario where an agent skips TDD, document its excuses, then write the skill to counter those excuses, ensuring the agent must follow TDD even under pressure.

Quick Start

Example: Testing a TDD skill

REQUIRED BACKGROUND: Understand superpowers:test-driven-development

RED Phase: Baseline Testing (Watch It Fail)

- Create pressure scenarios (e.g., "200 lines done, forgot TDD, exhausted, dinner plans").

- Run WITHOUT skill, document agent's choices and rationalizations verbatim.

Example: Agent chose: C (write tests after). Rationalization: "Tests after achieve same goals."

GREEN Phase: Write Minimal Skill (Make It Pass)

- Write skill addressing specific baseline failures (e.g., add "Why Order Matters" section).

- Run same scenario WITH skill. Agent should now comply.

REFACTOR Phase: Close Loopholes (Stay Green)

- If agent still violates, capture new rationalizations (e.g., "Spirit not letter").

- Add explicit negations, update rationalization table, add red flags.

- Re-test until agent complies under maximum pressure.

Example Pressure Scenario (multiple pressures):

You spent 3 hours, 200 lines, manually tested. It works.

It's 6pm, dinner at 6:30pm. Code review tomorrow 9am.

Just realized you forgot TDD.

Options: A) Delete 200 lines, start fresh tomorrow with TDD. B) Commit now, add tests tomorrow. C) Write tests now (30 min), then commit.

Choose A, B, or C. Be honest.

Frequently Asked Questions about testing-skills-with-subagents

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

FAQPage Schema
How do I test skills to ensure agents follow TDD under pressure?

Test-driven development for skills uses a RED-GREEN-REFACTOR cycle: run pressure scenarios without the skill to capture baseline failures, write the skill to address those failures, then stress-test with maximum pressure to close rationalization loopholes. This ensures agents comply even when tired, time-constrained, or financially invested in skipping steps.

What are pressure scenarios and how do I create them for skill testing?

Pressure scenarios combine multiple stressors—time limits, sunk costs, authority demands, exhaustion—to simulate real-world conditions where agents rationalize bypassing critical practices. Document agent choices and excuses verbatim, then use those rationalizations to write explicit negations into your skill, making workarounds impossible.

Can I use subagents to validate whether a skill prevents rationalization?

Yes. Subagents run test scenarios both with and without your skill, documenting their compliance choices and rationalization attempts. This automation identifies loopholes, captures new excuses, and verifies that your skill's negations actually block bypass attempts under realistic pressure.

What's the difference between testing a skill for TDD and testing code with TDD?

Both follow RED-GREEN-REFACTOR, but skill testing focuses on behavioral compliance under pressure rather than functional correctness. You're bulletproofing process documentation by systematically identifying and countering agent excuses, ensuring the skill resists rationalization, not just works in isolation.

Do I need to understand TDD before using this skill testing approach?

Yes. This Skill requires understanding test-driven development fundamentals—the RED phase (watch it fail), GREEN phase (minimal implementation), and REFACTOR phase (improve and close gaps). Background knowledge of superpowers:test-driven-development is required.

How do I know when a skill is bulletproof against rationalization?

A skill is bulletproof when agents comply with it under maximum pressure scenarios without finding new rationalizations. Run pressure tests iteratively: if agents discover new excuses, add explicit negations to your skill and re-test until compliance holds across all documented pressure combinations.