characterization-tests

characterization-tests is a skill for Claude Code, Codex from rpraharaj/forward-deployed-engineer. It costs 114 tokens per session (2,067 once invoked), scanned A, original, MIT.

A testing method for recording what old, poorly tested code actually does before you change it. It saves those observed results as tests, even when the behavior may be a bug.

In plain words
What is it for?
Use it before modifying legacy code with few or no tests. It helps verify refactors and deliberate bug fixes against the code’s previous behavior.
Why use it?
It makes risky refactoring easier to check because unexpected behavior changes are reported instead of being missed during code review.

Skill for Claude CodeCodex

Part of the fde-core plugin — 30 skills shipped together

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

Made for: Claude Code, Codex.

Or install fde-core, the plugin that ships this one along with the rest of its 30 skills.

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/rpraharaj/forward-deployed-engineer/characterization-tests.svg)](https://agentmods.dev/skills/rpraharaj/forward-deployed-engineer/characterization-tests)
Your own site
<a href="https://agentmods.dev/skills/rpraharaj/forward-deployed-engineer/characterization-tests"><img src="https://agentmods.dev/badge/skills/rpraharaj/forward-deployed-engineer/characterization-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,067 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.00114 $0.02067
Opus 5 $0.00057 $0.01033
Sonnet 5 $0.00023 $0.00413
Haiku 4.5 $0.00011 $0.00207

Measured 5d ago against content hash 424f46b418b2, 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 5d 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.

fde-core/skills/characterization-tests/SKILL.md · 151 lines

How it starts

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

Characterization tests

Pinning what the code does now, so you can tell whether you changed it.

Why this exists

Changing untested legacy code and verifying by inspection is the highest-risk activity in this portfolio. You cannot hold the behavior of a two-thousand-line method in your head, and neither can the reviewer, so "it looks equivalent" is the standard being applied — and it fails silently.

Characterization tests invert the usual purpose of a test. They don't assert what the code should do; nobody knows that. They record what it currently does, so that a change which alters behavior fails loudly instead of shipping. The specification is the existing code, and the test is a fixed point you can refactor against.

The counter-intuitive part, and the part people resist: you pin the bugs too. Something downstream has probably adapted to the wrong rounding, the off-by-one, the empty string where null was meant. Preserving current behavior is the point. Fixing bugs is a separate, later, deliberate change with its own blast radius.

When this applies

  • About to change code with thin or no coverage
  • Any refactor of legacy code
  • "Nobody knows what that does, so we don't touch it"
  • Before refactor-seams or a risky safe-change

When it doesn't

  • The code is already well covered — check what the existing tests actually assert, and whether CI runs them. Doctest examples in a docstring are not coverage unless the suite collects them.
  • Genuinely new code — write real tests asserting intended behavior
  • You're deliberately changing behavior and the current behavior is agreed wrong — still consider pinning the surrounding behavior you're not changing
  • Throwaway code

Prerequisites

  • .fde/01-environment.md — you need to be able to run tests. If missing, run env-bootstrap or stop; you cannot characterize without a runner.
  • .fde/04-feasibility.md — the change sites you're protecting
  • Detect the stack from 01-environment.md or ../_shared/stack-detection.md, then read references/harness-by-stack.md. Do not assume repo-recon already ran.
  • refactor-seams (fde-migration) is a common successor, not a prerequisite.

Read the full file on GitHub · 151 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. 5d ago First seen · 151 lines · 114 tokens per session scan A 424f46b418b2

Subscribe to this mod's changes

characterization-tests is a skill published in the GitHub repository rpraharaj/forward-deployed-engineer (6 stars, last pushed 18d ago), licensed MIT. It adds 114 tokens to every session and 2,067 once invoked, about $0.0006 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-31.

Related

Other skills, from other repositories

html-ppt

For consulting delivery work: turn diagnosis, frameworks, and project work into a client-adoptable action plan. Built around the core query "consulting-final-deck", with engagement manager judgment, buyer-ready proof, and this outcome: accept the recommendation and commit owners to the roadmap.

nexu-io/open-design · 61 tokens

html-ppt-zhangzara-mat

A margin-recovery diagnosis for a regional grocery chain — the governing thought, the driver tree, the priorities, and the roadmap. Built as a decision-grade consulting deck for client sponsor, steering committee.

nexu-io/open-design · 51 tokens

html-ppt-zhangzara-soft-editorial

A digital-transformation roadmap for a legacy insurer — the diagnosis, the sequenced bets, and the operating rhythm to land them. Built as a decision-grade consulting deck for client executives.

nexu-io/open-design · 49 tokens

huashu-golden-circle

A brand-repositioning strategy for a heritage coffee chain — why, how, what — the governing idea and the moves to prove it. Built as a decision-grade consulting deck for client CMO, board.

nexu-io/open-design · 49 tokens

huashu-luxe-whitespace

A market-entry study for a luxury skincare brand entering Asia — segmentation, positioning, channel, and the phased plan. Built as a decision-grade consulting deck for client leadership.

nexu-io/open-design · 42 tokens

ppt-keynote

An operating-model redesign for a scaling logistics firm — the diagnosis, the target model, and the transition roadmap. Built as a decision-grade consulting deck for client sponsor, ops leaders.

nexu-io/open-design · 40 tokens