testing-skills-with-subagents

testing-skills-with-subagents is a skill for Claude Code, Codex from JPM1118/Threadwork. It costs 57 tokens per session (1,043 once invoked), scanned A, original, MIT.

A testing method for skills, where a coding agent first runs a task without the instructions, then the instructions are written and tested under pressure. TDD means test-driven development: test first, then build or change the thing to pass.

In plain words
What is it for?
Use it before deploying skills that enforce testing, discipline, or other rules an agent might try to bypass.
Why use it?
It reveals whether a skill prevents the failures and shortcuts it was designed to address.

Skill for Claude CodeCodex

Part of the threadwork plugin — 20 skills, 4 commands, 1 agent, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jpm1118/threadwork/testing-skills-with-subagents
Any agent
npx skills add JPM1118/Threadwork --skill testing-skills-with-subagents
Clone the repo
git clone --depth 1 https://github.com/JPM1118/Threadwork

Made for: Claude Code, Codex.

Or install threadwork, the plugin that ships this one along with the rest of its 20 skills, 4 commands, 1 agent, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing-skills-with-subagents

README.md
[![agentmods](https://agentmods.dev/badge/skills/jpm1118/threadwork/testing-skills-with-subagents.svg)](https://agentmods.dev/skills/jpm1118/threadwork/testing-skills-with-subagents)
Your own site
<a href="https://agentmods.dev/skills/jpm1118/threadwork/testing-skills-with-subagents"><img src="https://agentmods.dev/badge/skills/jpm1118/threadwork/testing-skills-with-subagents.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,043 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00057 $0.01043
Opus 5 $0.00028 $0.00522
Sonnet 5 $0.00011 $0.00209
Haiku 4.5 $0.00006 $0.00104

Measured 5d ago against content hash 92e49de870d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing-skills-with-subagents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/testing-skills-with-subagents/SKILL.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

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

RED Phase: Baseline Testing

Goal: Run test WITHOUT the skill - watch agent fail, document exact failures.

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?

Example scenario:

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.

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 148 lines · 57 tokens per session scan A 92e49de870d2

Subscribe to this mod's changes

testing-skills-with-subagents is a skill published in the GitHub repository JPM1118/Threadwork (5 stars, last pushed 9mo ago), licensed MIT. It adds 57 tokens to every session and 1,043 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.