# Characterization tests

> Characterization tests is an open-source agent skill for developer tools. Lets an agent pin current behavior of untested legacy code before changing it. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/rpraharaj/forward-deployed-engineer/tree/main/fde-core/skills/characterization-tests
- **Repository:** https://github.com/rpraharaj/forward-deployed-engineer
- **GitHub stars:** 19
- **License:** MIT
- **Skill name:** characterization-tests
- **Collection:** https://github.com/rpraharaj/forward-deployed-engineer
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/rpraharaj/forward-deployed-engineer/tree/HEAD/fde-core/skills/characterization-tests)
- [License: MIT](https://github.com/rpraharaj/forward-deployed-engineer/tree/HEAD/fde-core/skills/characterization-tests)

## Features

- **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

## Install

### Claude Code

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

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

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

```sh
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.

### Codex

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

```sh
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.

### Cursor

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

```sh
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.

### Gemini CLI

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

```sh
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.

### VS Code

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

```sh
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.

### Other agents

Get the folder:

```sh
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.

## 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.

## Alternatives

- [Refactor seams](https://ai-powered.com/skills/refactor-seams): Refactor seams is an open-source agent skill for developer tools.
- [Safe change](https://ai-powered.com/skills/safe-change): Safe change is an open-source agent skill for developer tools.
- [Principle test behavior not implementation](https://ai-powered.com/skills/principle-test-behavior-not-implementation): Principle test behavior not implementation is an open-source agent skill for developer tools.
- [Codebase comprehension](https://ai-powered.com/skills/codebase-comprehension): Codebase comprehension is an open-source agent skill for developer tools.
- [TDD](https://ai-powered.com/skills/tdd): TDD is an open-source agent skill for developer tools.
- [Develop](https://ai-powered.com/skills/develop): Develop is an open-source agent skill for developer tools.
- [Testing strategy](https://ai-powered.com/skills/testing-strategy): Testing strategy is an open-source agent skill for developer tools.
- [Principle sequence verifiable units](https://ai-powered.com/skills/principle-sequence-verifiable-units): Principle sequence verifiable units is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/characterization-tests
