testing-framework

testing-framework is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 84 tokens per session (2,473 once invoked), scanned A, original, MIT.

A testing guide for AI agents, including unit, integration, end-to-end, and adversarial tests. It treats an agent as software that may call tools, use a language model, and manage state.

In plain words
What is it for?
Use it to plan an agent test suite, test isolated components and tool workflows, check complete scenarios, and add quality gates to CI/CD.
Why use it?
It helps separate different kinds of failures and catch regressions after changing prompts, logic, or tools.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is - run: python scripts/check_quality_gate.py --min-score 0.85 --max-latency-p95 3.0.

Good fit Use it to plan an agent test suite, test isolated components and tool workflows, check complete scenarios, and add quality gates to CI/CD.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection
agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/testing-framework

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 testing-framework

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/testing-framework/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/testing-framework)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/testing-framework"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/testing-framework/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 testing-framework

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/testing-framework"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/testing-framework.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,473 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: 1 finding, 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 Data Exfiltration · line 73
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00084 $0.02473
Opus 5 $0.00042 $0.01236
Sonnet 5 $0.00017 $0.00495
Haiku 4.5 $0.00008 $0.00247

Measured 8d ago against content hash 2c9429ddaf6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

testing-framework 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 8d 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.

agent-skills/testing-framework/SKILL.md · 260 lines

How it starts

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

Agent Testing Framework

Quand utiliser ce skill

Utilise ce skill pour :

  • Mettre en place une stratégie de test pour un agent IA (simple ou multi-agents)
  • Détecter des régressions après modification de prompts, logique ou outils
  • Intégrer la qualité agent dans une pipeline CI/CD avec quality gates

Workflow en étapes

1. Définir la pyramide de tests

Couche Proportion Vrai LLM ? Objectif
Unitaire ~60 % Non Composants isolés (parsing, routing, état)
Intégration ~25 % Mock Chaînes d'outils, flux multi-étapes
E2E ~10 % Oui Scénarios complets sur golden dataset
Adversarial ~5 % Oui Robustesse, injections, hors-domaine

Critère de décision : si le test appelle un vrai LLM → c'est au minimum un test d'intégration. Ne jamais le compter comme unitaire.


2. Tests unitaires — composants isolés

Tester sans LLM : parsing de sorties, templates de prompts, transitions d'état, logique de routing.

# pytest — test unitaire de parsing tool call
from agent.parser import parse_tool_call

def test_parse_tool_call_valid():
    raw = '{"tool": "search", "args": {"query": "prix BTC"}}'
    result = parse_tool_call(raw)
    assert result.tool == "search"
    assert result.args["query"] == "prix BTC"

def test_parse_tool_call_malformed_returns_none():
    assert parse_tool_call("not json") is None
# Tester une transition d'état sans LLM
from agent.state import AgentState, handle_event

def test_state_transition_tool_called():
    state = AgentState(step="thinking")
    new_state = handle_event(state, event="tool_called")
    assert new_state.step == "waiting_tool_result"

3. Tests d'intégration — chaînes d'outils mockées

Mocker le LLM pour injecter des réponses contrôlées et tester la logique de chaînage.

# respx (httpx) — mock de l'API OpenAI/Anthropic
import respx, httpx, pytest

@pytest.fixture
def mock_llm():
    with respx.mock:
        respx.post("https://api.anthropic.com/v1/messages").mock(
            return_value=httpx.Response(200, json={
                "content": [{"type": "text", "text": "Paris"}]
            })
        )
        yield

def test_retrieval_to_llm_pipeline(mock_llm):
    result = run_pipeline(query="Capitale de la France ?")
    assert result.answer == "Paris"
    assert result.sources_used >= 1

Read the full file on GitHub · 260 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. 8d ago First seen · 260 lines · 84 tokens per session scan A 2c9429ddaf6e

Subscribe to this mod's changes

testing-framework is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 15d ago), licensed MIT. It adds 84 tokens to every session and 2,473 once invoked, about $0.0004 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-30.