Skip to content
Skill

Characterization tests

Lets an agent pin current behavior of untested legacy code before changing it

Characterization tests is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
19
Last commit
License
MIT
Listing updated

Similar skills

About Characterization tests

This skill guides an agent through writing characterization tests, which record what legacy code currently does rather than what it should do. It covers golden master and approval-style snapshots, and it insists that known-wrong behavior is pinned and annotated instead of quietly fixed, so downstream code that depends on it keeps working.

The workflow has the agent find a usable seam (from a public function down to an HTTP or CLI boundary), capture realistic inputs including boundary and odd cases, and record outputs. It then checks coverage of the change site, deliberately mutates the code to confirm the tests turn red, and commits the tests separately ahead of the behavior change. Results are noted in a change log file in the workspace.

The skill expects a working test runner in the project, and it reads a harness reference for the detected stack. It also points to related skills for refactor seams and test data strategy.

When your agent uses it

Pin the current behavior of untested legacy code before changing it - including behavior that looks like a bug, because something downstream may depend on it - using golden master and approval test patterns so a refactor or fix can be verified as behavior-preserving. Use before modifying code with thin or no test coverage, before any refactor of legacy code, when a change site has no tests and you need a safety net, or when someone says "we can't change that, nobody knows what it does". This is what makes legacy change safe rather than brave.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 2 files (15 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the fde-core plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add rpraharaj/forward-deployed-engineer
/plugin install fde-core@fde-skills

Or copy only this skill to ~/.claude/skills/characterization-tests:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/characterization-tests &&
cp -R "$tmp/fde-core/skills/characterization-tests" ~/.claude/skills/characterization-tests &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/characterization-tests inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/characterization-tests to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/characterization-tests &&
cp -R "$tmp/fde-core/skills/characterization-tests" ~/.agents/skills/characterization-tests &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/characterization-tests inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/characterization-tests to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/characterization-tests &&
cp -R "$tmp/fde-core/skills/characterization-tests" ~/.cursor/skills/characterization-tests &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/characterization-tests inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/rpraharaj/forward-deployed-engineer.git --path fde-core/skills/characterization-tests

Or copy the folder to ~/.gemini/skills/characterization-tests yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/characterization-tests:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/characterization-tests &&
cp -R "$tmp/fde-core/skills/characterization-tests" ~/.copilot/skills/characterization-tests &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/characterization-tests inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git

Then copy forward-deployed-engineer/fde-core/skills/characterization-tests into your agent's skills folder as characterization-tests. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Seam identification
Ranks the places where behavior can be observed without modifying the code under test, from public functions to database or file state.
Realistic input capture
Guides building inputs from real shapes, existing fixtures and boundary values, with production data synthesized rather than copied.
Annotated known-bug pinning
Keeps wrong-looking behavior in place with comments warning future engineers not to correct it.
Mutation verification
Requires deliberately breaking the code to confirm that characterization tests actually fail when behavior changes.
Separate commit workflow
Asks for the tests to be committed before the risky change so reviewers can see the safety net first.
Change log output
Produces a structured characterization note recording cases, coverage, mutation results and pinned behavior.

Good for

  • Add a safety net before refactoring a legacy billing calculator
  • Write golden master tests for a function nobody understands
  • Pin current API responses before modifying a legacy endpoint
  • Verify a refactor of old code preserves its existing output
  • Check whether existing tests actually cover the lines I plan to change

Characterization tests FAQ

What does the skill need to run?

It needs a working test runner in the environment, described in an environment notes file in the workspace. If that is missing, the skill says to run an environment bootstrap step or stop.

Does Characterization tests fix bugs it finds in legacy code?

No. It instructs the agent to pin current behavior, including bugs, annotate it, and raise fixes as a separate later change.

When does Characterization tests apply?

Before modifying code with thin or no test coverage, before refactoring legacy code, or when a change site has no tests and needs a safety net.

Does Characterization tests include scripts?

No scripts are included; the skill consists of a SKILL.md and reference files.

How do I install Characterization tests in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/characterization-tests to use it in all your projects, or to .claude/skills/characterization-tests in one project. Or install the fde-core plugin, which includes it: /plugin marketplace add rpraharaj/forward-deployed-engineer, then /plugin install fde-core@fde-skills.

Does Characterization tests run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Characterization tests?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Characterization tests?

The closest alternatives to Characterization tests are Refactor seams, Safe change, Principle test behavior not implementation, Codebase comprehension and TDD.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from rpraharaj/forward-deployed-engineer

  1. Defines and tests the boundaries on what an AI agent's tool calls can do

    • Open source
    • 19 GitHub stars
    • Security
  2. Gives agents a procedure to test AI workflows against cases, thresholds and regression

    • Open source
    • 19 GitHub stars
    • Developer tools
  3. Turns access requests into a tracked, parallel critical path with workarounds

    • Open source
    • 19 GitHub stars
    • Productivity
  4. Plans how end users move to a new workflow, with barriers, pilot, support and measures

    • Open source
    • 19 GitHub stars
    • Productivity
  5. Maps what a proposed code change could break before you make it

    • Open source
    • 19 GitHub stars
    • Developer tools
  6. Maps an organization's change approval process so releases can be planned backwards from

    • Open source
    • 19 GitHub stars
    • Productivity