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.
npx skills add SkillMedev/legacy-modernization --skill characterization-test-writergit clone --depth 1 https://github.com/SkillMedev/legacy-modernizationWrote 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.
[](https://agentmods.dev/skills/skillmedev/legacy-modernization/characterization-test-writer)<a href="https://agentmods.dev/skills/skillmedev/legacy-modernization/characterization-test-writer"><img src="https://agentmods.dev/badge/skills/skillmedev/legacy-modernization/characterization-test-writer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/skillmedev/legacy-modernization/characterization-test-writer"><img src="https://agentmods.dev/badge/skills/skillmedev/legacy-modernization/characterization-test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00149 | $0.01426 |
| Opus 5.5 | $0.00060 | $0.00570 |
| Sonnet 5.5 | $0.00030 | $0.00285 |
| Haiku 4.5 | $0.00015 | $0.00143 |
Grade A, and why
characterization-test-writer 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 1mo 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.
This is a copy
100% identical to characterization-test-writer — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Characterization Test Writer
Pin what legacy code currently does - bugs included - so a refactor that changes behavior fails loudly instead of silently. The costly mistake this prevents is the "clean" refactor that quietly changes an output nobody noticed was load-bearing, discovered weeks later in production. A characterization test records reality; it never judges it.
Operating procedure
Order matters: the seam must exist before you can capture output, output must be captured before you can stabilize it, and coverage is only measurable once tests run.
Step 1: Gather inputs
- The exact function/module about to change, and the refactor's blast radius - which code paths will the change touch? Only those need pinning.
- The dependency list: database, clock, RNG, network, filesystem, globals, environment. Each is a nondeterminism source to control in Step 4.
- Any recorded production inputs or logs available for replay. Label assumptions about "typical inputs" as guesses.
Step 2: Find the smallest seam
Untested legacy code reaches for databases, clocks, network, and globals, so it usually cannot be called in isolation. Introduce the minimum seam that lets you invoke it: extract a method, parameterize a constructor, inject the dependency, or subclass-and-override (the "subclass to sense" technique from Working Effectively with Legacy Code). Do not refactor the body before the net exists - seam-introduction edits must be mechanical and behavior-preserving (rename, extract, inject), nothing that changes logic.
Step 3: Capture actual output, not expected
Write a deliberately failing assertion, run it, read the real value from the failure message, and paste it in:
def test_characterize_shipping_for_oversize_order():
result = calc_shipping(weight_kg=32, region="EU")
assert result == "PLACEHOLDER" # run -> failure says: AssertionError: 47.6 != PLACEHOLDER
becomes, after one run:
def test_characterizes_oversize_eu_shipping():
result = calc_shipping(weight_kg=32, region="EU")
assert result == 47.6 # observed 47.6, not the 45.0 the spec claims - see pins_known_bug below
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.
- 1mo ago Changed · +2 lines · +1 tokens per session b48fdc1a25a9
- 3mo ago First seen · 81 lines · 148 tokens per session scan A cc3de90e398b
characterization-test-writer is a skill published in the GitHub repository SkillMedev/legacy-modernization (2 stars, last pushed 1mo ago), licensed MIT. It adds 149 tokens to every session and 1,426 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to characterization-test-writer, differing in 0 lines, and is treated as a copy.
characterization-test-writer compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| characterization-test-writerSkillMedev/legacy-modernization | Skill | 2 | 1mo ago | MIT | A | 149 | Claude Code, Codex |
| Breaking Change DetectorNotysoty/openagentskills | Skill | 9 | 3mo ago | MIT | A | 23 | Claude Code, Codex |
| Unit Test ImproverNotysoty/openagentskills | Skill | 9 | 3mo ago | MIT | A | 29 | Claude Code, Codex |
| Unit Test WriterNotysoty/openagentskills | Skill | 9 | 3mo ago | MIT | A | 18 | Claude Code, Codex |
| test-masterJeffallan/claude-skills | Skill | 13k | today | MIT | A | 104 | Claude Code |
| review-ugc-rendergooseworks-ai/goose-skills | Skill | 1.4k | 3d ago | MIT | A | 201 | Claude Code, Codex |
| writing-testshotovo/aider-desk | Skill | 1.5k | 9d ago | Apache-2.0 | A | 48 | Claude Code, Codex |