ak-test

ak-test is a skill for Claude Code, Codex from yaalalabs/agent-kernel. It costs 47 tokens per session (2,497 once invoked), scanned A, original, Apache-2.0.

A testing and debugging guide for Agent Kernel projects, including setup instructions and three ways to compare agent responses. Agent tests check whether an agent gives an acceptable answer for a given input.

In plain words
What is it for?
Use it to add test dependencies, configure fuzzy, judge, or fallback testing, write command-line agent tests, and troubleshoot failures.
Why use it?
It helps configure the test framework and choose a suitable comparison method for exact, open-ended, or mixed responses. It also addresses common testing problems.

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/yaalalabs/agent-kernel/ak-test
Any agent
npx skills add yaalalabs/agent-kernel --skill ak-test
Clone the repo
git clone --depth 1 https://github.com/yaalalabs/agent-kernel

Made for: Claude Code, Codex.

Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,497 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 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.00047 $0.02497
Opus 5 $0.00023 $0.01248
Sonnet 5 $0.00009 $0.00499
Haiku 4.5 $0.00005 $0.00250

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

Security

Grade A, and why

ak-test scanned grade A with 2 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 3d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

5. Test health endpoint: `curl http://localhost:8000/health`

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

# proc = subprocess.Popen(["python3", "app.py"], stdout=sys.stdout, stderr=sys.stderr)
ak-py/src/agentkernel/skills/ak-test/SKILL.md · 341 lines

How it starts

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

Testing & Debugging

Use this skill to set up testing for your Agent Kernel project or debug issues.

Instructions for the Agent

Setting Up Tests

1. Add Test Dependencies

Update pyproject.toml:

[dependency-groups]
dev = [
    "agentkernel[test]>=0.8.1",
    "black>=23.0.0",
    "isort>=5.0.0",
    "mypy>=1.0.0",
]

Run uv sync to install test dependencies.

2. Choose a Test Mode

Update config.yaml:

test:
  mode: fuzzy       # Options: fuzzy | judge | fallback
Mode How it Works Best For
fuzzy String similarity matching (rapidfuzz) Deterministic responses, exact answers
judge LLM evaluates if response is semantically correct Open-ended responses, creative agents
fallback Tries fuzzy first, falls back to judge if fuzzy fails General-purpose testing

For judge mode, configure the judge model:

test:
  mode: judge
  judge:
    model: gpt-4o-mini
3. Write CLI Agent Tests

For agents running via CLI (demo.py):

import pytest
import pytest_asyncio
from agentkernel.test import Test

pytestmark = pytest.mark.asyncio(loop_scope="session")


@pytest_asyncio.fixture(scope="session", loop_scope="session")
async def test_client():
    test = Test("demo.py")       # Path to your agent definition file
    await test.start()
    try:
        yield test
    finally:
        await test.stop()


@pytest.mark.order(1)
async def test_greeting(test_client):
    await test_client.send("Hello!")
    await test_client.expect(["Hello", "Hi", "Greetings"])


@pytest.mark.order(2)
async def test_specific_question(test_client):
    await test_client.send("What is the capital of France?")
    await test_client.expect(["Paris"])


@pytest.mark.order(3)
async def test_follow_up(test_client):
    # Follow-up questions work because session state is maintained
    await test_client.send("What is its population?")
    await test_client.expect(["2 million", "2.1 million", "approximately 2 million"])

Read the full file on GitHub · 341 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 341 lines · 47 tokens per session scan A 096268953b26

Subscribe to this mod's changes

ak-test is a skill published in the GitHub repository yaalalabs/agent-kernel (145 stars, last pushed 6d ago), licensed Apache-2.0. It adds 47 tokens to every session and 2,497 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.