testloop

testloop is a skill for Claude Code, Codex from samibs/skillfoundry. It costs 10 tokens per session (3,323 once invoked), scanned A, original, MIT.

An automated feedback loop that runs tests, interprets failures, routes problems back for fixes, and repeats the process until the tests pass or the allowed iterations end.

In plain words
What is it for?
It is for running unit, integration, or end-to-end tests and validating a feature, file, or implementation story through repeated fix-and-test cycles.
Why use it?
It prevents an implementation from being accepted based only on an assumption that it works. It also detects when the same failure keeps recurring and may require a broader design change.

Skill for Claude CodeCodex

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/samibs/skillfoundry/testloop
Any agent
npx skills add samibs/skillfoundry --skill testloop
Clone the repo
git clone --depth 1 https://github.com/samibs/skillfoundry

Made for: Claude Code, Codex.

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 testloop

README.md
[![agentmods](https://agentmods.dev/badge/skills/samibs/skillfoundry/testloop.svg)](https://agentmods.dev/skills/samibs/skillfoundry/testloop)
Your own site
<a href="https://agentmods.dev/skills/samibs/skillfoundry/testloop"><img src="https://agentmods.dev/badge/skills/samibs/skillfoundry/testloop.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,323 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.00010 $0.03323
Opus 5 $0.00005 $0.01662
Sonnet 5 $0.00002 $0.00665
Haiku 4.5 $0.00001 $0.00332

Measured yesterday against content hash a0b117babf5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testloop 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 yesterday.

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.

.agents/skills/testloop/SKILL.md · 395 lines

How it starts

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

TestLoop — Closed-Loop Implementation Validator

Role: Autonomous quality enforcement engine. You run tests, parse results, route failures to the coder for targeted fixes, and loop until the implementation is clean or the iteration budget is exhausted. You never accept "it should work" — only green tests.

Persona: See agents/testloop.md for full persona definition.

Activation Syntax

/testloop                          Auto-detect scope and run all tests
/testloop unit                     Unit tests only
/testloop e2e                      Playwright E2E tests only
/testloop all                      All layers: unit + integration + E2E
/testloop --max 3                  Override max iterations (default: 5)
/testloop --file path/to/test.ts   Run a specific test file only
/testloop --story STORY-001        Run tests tagged to a story
/testloop --exec-mode advisory     Force advisory mode (planning, no shell)

Hard Rules

  • NEVER skip oscillation detection — same failure 3× = architectural problem, not a patch problem
  • NEVER mark the loop complete unless ALL tests pass and coverage meets threshold
  • NEVER guess at what a failure means — parse the actual error message, line number, and stack trace
  • ALWAYS prefer Playwright for UI/browser scenarios; fall back to Jest/Vitest/pytest/xUnit for unit
  • ALWAYS feed the actual failure text (not a summary) to the coder — context precision = faster fixes
  • STOP and escalate after max iterations with a full iteration log — never silently give up

Phase 0: Pre-Flight

Before running any test:

  1. Execution context check (per agents/_execution-context.md): Read .claude/local/execution-context.json if it exists. If not, run detection now.

    • REAL → proceed normally
    • ADVISORY → run in advisory mode (static analysis only — no test claims)
    • DEGRADED → attempt one dependency fix then re-probe; if still degraded → advisory for this run

    Display mode prominently at the start of every run:

    EXECUTION MODE: REAL | ADVISORY | DEGRADED
    

Read the full file on GitHub · 395 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. yesterday First seen · 395 lines · 10 tokens per session scan A a0b117babf5c

Subscribe to this mod's changes

testloop is a skill published in the GitHub repository samibs/skillfoundry (12 stars, last pushed yesterday), licensed MIT. It adds 10 tokens to every session and 3,323 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

test-sweep

Run all test suites (unit, integration, API, E2E) and aggregate results into a summary report. Use after completing execution slices or before the Review Gate.

srnichols/plan-forge · 38 tokens

infra-test

Run the full IaC test suite — Bicep linting, ARM TTK (if applicable), Terraform validate, Pester unit and integration tests. Use before deploying or after making infrastructure changes.

srnichols/plan-forge · 43 tokens

audit-loop

Run a recursive audit drain loop — discover findings from the running system, triage each into bug/spec/classifier lanes, repeat until convergence. USE FOR: end-to-end audit of a deployed or locally-running app, draining findings to zero. DO NOT USE FOR: single-shot tempering runs (use forgetemperingrun), one-off bug…

srnichols/plan-forge · 100 tokens

ds-test

Universal test skill — generate, update, run, and fix tests for any stack. Use when writing, repairing, or running tests, or improving coverage.

sungurerdim/dev-skills · 34 tokens

test-audit

Batch audit of test files against Q1-Q25 quality gates and AP1-AP32 anti-patterns. Detects orphan tests, phantom mocks, untested public methods. Tiered output (A/B/C/D) with critical gate enforcement and optional post-audit fix workflow. Flags: zuvo:test-audit all | [path] | [file] | --deep | --quick | --include-e2e |…

greglas75/zuvo · 100 tokens

execution/testing-executor

Internal: Testing Executor. Writes unit, integration, and e2e tests. Read spec and segment. Write evidence on completion.

dynos-fit/dynos-work · 31 tokens