characterization-tests

characterization-tests is a skill for Claude Code, Codex from AdamBien/airails. It costs 151 tokens per session (1,047 once invoked), scanned A, original, MIT.

A testing method that records what a running older system actually does and saves those results as expected behavior. The saved results can then be replayed against a rebuilt system to find differences.

In plain words
What is it for?
It is for recording and comparing behavior across HTTP requests, messages, files, command-line runs, and database effects.
Why use it?
It preserves undocumented behavior, including bugs that other software may rely on, before a migration or redesign changes the system.

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/adambien/airails/characterization-tests
Any agent
npx skills add AdamBien/airails --skill characterization-tests
Clone the repo
git clone --depth 1 https://github.com/AdamBien/airails

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 characterization-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/adambien/airails/characterization-tests.svg)](https://agentmods.dev/skills/adambien/airails/characterization-tests)
Your own site
<a href="https://agentmods.dev/skills/adambien/airails/characterization-tests"><img src="https://agentmods.dev/badge/skills/adambien/airails/characterization-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,047 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.00151 $0.01047
Opus 5 $0.00076 $0.00524
Sonnet 5 $0.00030 $0.00209
Haiku 4.5 $0.00015 $0.00105

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

Security

Grade A, and why

characterization-tests 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 4d 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.

migrations/characterization-tests/SKILL.md · 57 lines

How it starts

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

Characterization Tests

A regular test fails when behavior is wrong; a characterization test fails when behavior is different. Record what the system does — bugs included — and pin it as the expected value. Correctness is the information the legacy system lost; observed behavior is the only surviving specification, and downstream consumers may depend on the bugs.

Characterization tests are system tests: black-box, against the running system, from the outside — the system-tests skill owns that contract. The only difference from ordinary system tests is the origin of the expectations — recorded, not specified.

Surfaces

The observable surface is a property of the system, not of this skill. Inventory all of them:

Surface Stimulus → Observation Mechanics
HTTP (REST, server-rendered pages) request → response references/http.md
Messaging (JMS, queues) message in → message(s) out same discipline; document per system
Batch / file exchange input file → output file, report same discipline; document per system
CLI invocation → exit code, output same discipline; document per system
Database side effects any stimulus → state delta record only when no outer surface shows the effect

HTTP mechanics are bundled; for other surfaces apply the identical record/normalize/replay discipline and document the surface mechanics next to the recordings. Prefer the outermost surface that shows the behavior — assert database state only when nothing above it does.

Record

  1. Inventory the system's surfaces and their entry points (JAX-RS resources, web.xml mappings, queue names, batch jobs, and the external contracts in migration/CONCEPTS.md when present).
  2. Ask the user: target coordinates (base URL, broker, job trigger — never guess), environment, credentials, and which business flows matter most. Confirm the target is not an unprotected production system.
  3. Observe-only by default: record stimuli without side effects. Record mutating stimuli (writes, consumed messages, batch runs) only after explicit confirmation, only against a disposable environment with resettable seed data.
  4. Execute each stimulus, normalize the observation per references/recording-format.md and the surface reference, store one file per interaction under migration/characterization/recordings/.
  5. Each recording must replay in isolation — note seed-data assumptions in its header.

Read the full file on GitHub · 57 lines

Files

What ships with it

3 files 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. 4d ago First seen · 57 lines · 151 tokens per session scan A f072ebd1b3c9

Subscribe to this mod's changes

characterization-tests is a skill published in the GitHub repository AdamBien/airails (48 stars, last pushed 14d ago), licensed MIT. It adds 151 tokens to every session and 1,047 once invoked, about $0.0008 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.

Related

Other skills, from other repositories

deno-sandbox

Use when building features that execute untrusted user code, AI-generated code, or need isolated code execution environments. Covers the @deno/sandbox SDK.

denoland/skills · 36 tokens

deno-frontend

Use when building a web frontend with Deno — running React, Vite, Astro, SvelteKit, Next.js, Nuxt or other npm frameworks under Deno, or working with Fresh, Deno's own island-architecture framework. Covers which path to pick, Fresh 2.x routes, handlers, islands, Preact signals, Tailwind, and Fresh 1.x to 2.x migration.

denoland/skills · 88 tokens

5writing

数学建模竞赛论文撰写阶段,支持 Typst 和 LaTeX 双引擎。根据 ANALYSISMODELINGREPORT.md、RESULTSREPORT.md 和 figures/.pdf 选择比赛模板、排版引擎、组织章节,并在论文正文中按章节直接插入图表。.

jihe520/MathModelAgent · 68 tokens

6verity

数学建模竞赛最终验证和验收阶段,支持 Typst 和 LaTeX 双引擎。用于论文写完后检查章节数量、标题顺序、图表引用、数值一致性、占位符、内部文件泄露、参考文献、代码可复现性、编译和提交就绪状态。.

jihe520/MathModelAgent · 76 tokens

typst-author

Generate idiomatic Typst (.typ) code, edit and troubleshoot Typst documents and projects, and answer Typst syntax/reference questions. Use when working with .typ files or when the user explicitly asks for Typst document creation, editing, debugging, compilation, formatting, template work, or package usage.

jihe520/MathModelAgent · 65 tokens

1start-mathmodel

数学建模竞赛工作流入口。用于启动完整建模流程:询问用户偏好,生成 plan.md 和 todo.md,并按阶段调用赛题分析、建模、代码与图表、流程图、论文撰写、验证验收等 skills。.

jihe520/MathModelAgent · 64 tokens