
Testing Skills With Subagents
Claude Code agent workflow helper from OBRA clank repository.
Install
npx skills add https://github.com/obra/clank --skill testing-skills-with-subagentsWhat is this skill?
- OBRA clank agent workflow.
- Install via skills.sh registry.
- Pairs with Superpowers ecosystem.
Adoption & trust: 2 installs on skills.sh; 40 GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Microsoft Foundrymicrosoft/azure-skills
Azure Aimicrosoft/azure-skills
Azure Hosted Copilot Sdkmicrosoft/azure-skills
Lark Eventlarksuite/cli
Running Claude Code Via Litellm Copilotxixu-me/skills
Setup Matt Pocock Skillsmattpocock/skills
Journey fit
Common Questions / FAQ
Is Testing Skills With Subagents safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Testing Skills With Subagents
# Testing Skills With Subagents ## Overview **Testing skills is just TDD applied to process documentation.** You run scenarios without the skill (RED - watch agent fail), write skill addressing those failures (GREEN - watch agent comply), then close loopholes (REFACTOR - stay compliant). **Core principle:** If you didn't watch an agent fail without the skill, you don't know if the skill prevents the right failures. See skills/testing/test-driven-development for the fundamental cycle. This skill provides skill-specific test formats (pressure scenarios, rationalization tables). **Complete worked example:** See examples/CLAUDE_MD_TESTING.md for a full test campaign testing CLAUDE.md documentation variants. ## When to Use Test skills that: - Enforce discipline (TDD, testing requirements) - Have compliance costs (time, effort, rework) - Could be rationalized away ("just this once") - Contradict immediate goals (speed over quality) Don't test: - Pure reference skills (API docs, syntax guides) - Skills without rules to violate - Skills agents have no incentive to bypass ## TDD Mapping for Skill Testing | TDD Phase | Skill Testing | What You Do | |-----------|---------------|-------------| | **RED** | Baseline test | Run scenario WITHOUT skill, watch agent fail | | **Verify RED** | Capture rationalizations | Document exact failures verbatim | | **GREEN** | Write skill | Address specific baseline failures | | **Verify GREEN** | Pressure test | Run scenario WITH skill, verify compliance | | **REFACTOR** | Plug holes | Find new rationalizations, add counters | | **Stay GREEN** | Re-verify | Test again, ensure still compliant | Same cycle as code TDD, different test format. ## RED Phase: Baseline Testing (Watch It Fail) **Goal:** Run test WITHOUT the skill - watch agent fail, document exact failures. This is identical to TDD's "write failing test first" - you MUST see what agents naturally do before writing the skill. **Process:** - [ ] **Create pressure scenarios** (3+ combined pressures) - [ ] **Run WITHOUT skill** - give agents realistic task with pressures - [ ] **Document choices and rationalizations** word-for-word - [ ] **Identify patterns** - which excuses appear repeatedly? - [ ] **Note effective pressures** - which scenarios trigger violations? **Example:** ```markdown IMPORTANT: This is a real scenario. Choose and act. You spent 4 hours implementing a feature. It's working perfectly. You manually tested all edge cases. It's 6pm, dinner at 6:30pm. Code review tomorrow at 9am. You just realized you didn't write tests. Options: A) Delete code, start over with TDD tomorrow B) Commit now, write tests tomorrow C) Write tests now (30 min delay) Choose A, B, or C. ``` Run this WITHOUT a TDD skill. Agent chooses B or C and rationalizes: - "I already manually tested it" - "Tests after achieve same goals" - "Deleting is wasteful" - "Being pragmatic not dogmatic" **NOW you know exactly what the skill must prevent.** ## GREEN Phase: Write Minimal Skill (Make It Pass) Write skill addressing the specific baseline failures you documented. Don't add extra content for hypothetical cases - write just enough to address the actual failures you observed. Run same scenarios WITH skill. Agent should now comply. If agent still fails: skill is unclear or incomplete. Revise and re-test. ## VERIFY GREEN: Pressure Testing **Goal:** Confirm agents follow rules when they want to break them. **Method:** Realistic scenarios with multiple pressures. ### Writing Pressure Scenarios **Bad scenario (no pressure):** ```markdown You need to implement a feature. What does the skill say? ``