testing

testing is a skill for Claude Code from actionhero/keryx. It costs 17 tokens per session (420 once invoked), scanned A, original, MIT.

A set of testing patterns and helpers for Bun, a JavaScript runtime and test runner. It uses a running server and real HTTP requests instead of a mock server.

In plain words
What is it for?
Use it to write Bun tests for HTTP endpoints, check JSON responses, and structure setup and cleanup around a server. It also documents how automatically discovered files affect tests.
Why use it?
It gives tests a consistent way to start and stop the full server, use its changing port, and avoid conflicts between tests. It also makes missing tests for code changes easier to spot.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is import "../index"; // Sets api.rootDir.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/actionhero/keryx/testing.svg)](https://agentmods.dev/skills/actionhero/keryx/testing)
Your own site
<a href="https://agentmods.dev/skills/actionhero/keryx/testing"><img src="https://agentmods.dev/badge/skills/actionhero/keryx/testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 420 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.1 $0.00017 $0.00420
Opus 5 $0.00009 $0.00210
Sonnet 5 $0.00003 $0.00084
Haiku 4.5 $0.00002 $0.00042

Measured today against content hash 50094d415f6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

testing scanned grade A with 1 finding 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 today.

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.

const res = await fetch(serverUrl() + "/api/status");
.claude/skills/testing.skill.md · 55 lines

What it actually says

Testing Patterns

For full details, see docs/guide/testing.md.

Test File Structure

Each test file boots and stops the full server:

import "../index"; // Sets api.rootDir
import { api } from "keryx";
import { HOOK_TIMEOUT, serverUrl } from "./../setup";

beforeAll(async () => { await api.start(); }, HOOK_TIMEOUT);
afterAll(async () => { await api.stop(); }, HOOK_TIMEOUT);

test("...", async () => {
  const res = await fetch(serverUrl() + "/api/status");
  const body = (await res.json()) as ActionResponse<Status>;
});

Key Helpers

  • serverUrl() — returns the base URL with dynamic port
  • HOOK_TIMEOUT — timeout for beforeAll/afterAll hooks

Conventions

  • Real HTTP requests via fetch — no mock server
  • Non-concurrent execution — tests run sequentially to avoid port conflicts
  • Every code change needs tests — if a PR has no test changes, that's a red flag

Auto-Discovery

Actions, initializers, and servers are auto-discovered via globLoader (packages/keryx/util/glob.ts). It scans for *.ts files and instantiates all exported classes. Files prefixed with . are skipped.

Running Tests

cd packages/keryx && bun test                          # Framework tests
cd example/backend && bun test                          # All example tests
cd example/backend && bun test __tests__/actions/user.test.ts  # Single file
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. today First seen · 55 lines · 17 tokens per session scan A 50094d415f6e

Subscribe to this mod's changes

testing is a skill published in the GitHub repository actionhero/keryx (33 stars, last pushed yesterday), licensed MIT. It adds 17 tokens to every session and 420 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.