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

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/samibs/skillfoundry/testloop
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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testloop

Your own site · 80×15
<a href="https://agentmods.dev/skills/samibs/skillfoundry/testloop"><img src="https://agentmods.dev/badge/skills/samibs/skillfoundry/testloop.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 358
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 361
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.1 $0.00010 $0.03323
Opus 5.5 $0.00004 $0.01329
Sonnet 5.5 $0.00002 $0.00665
Haiku 4.5 $0.00001 $0.00332

Measured 1mo ago against content hash a0b117babf5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

.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. 1mo ago 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 18d ago), licensed MIT. It adds 10 tokens to every session and 3,323 once invoked, about $0.0000 per session on Opus 5.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.