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 bdfinst/agentic-dev-team --skill legacy-codegit clone --depth 1 https://github.com/bdfinst/agentic-dev-teamWrote 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/bdfinst/agentic-dev-team/legacy-code)<a href="https://agentmods.dev/skills/bdfinst/agentic-dev-team/legacy-code"><img src="https://agentmods.dev/badge/skills/bdfinst/agentic-dev-team/legacy-code/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/bdfinst/agentic-dev-team/legacy-code"><img src="https://agentmods.dev/badge/skills/bdfinst/agentic-dev-team/legacy-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00034 | $0.01884 |
| Opus 5.5 | $0.00014 | $0.00754 |
| Sonnet 5.5 | $0.00007 | $0.00377 |
| Haiku 4.5 | $0.00003 | $0.00188 |
Grade A, and why
legacy-code 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.
How it starts
The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Legacy Code
Role: worker. This command applies characterization-testing and dependency-breaking techniques directly to the code under change.
Overview
Techniques for safely modifying code that lacks tests or has poor structure. Based on the principle that legacy code is code without tests (Michael Feathers' definition) — regardless of age. The goal is to get code under test before changing it, then improve structure incrementally.
Constraints
- Never change behavior and structure in the same step; refactor under green tests only
- Write characterization tests before modifying legacy code — not after
- Prefer the smallest dependency break that gets code under test
- Do not apply aggressive refactoring without test coverage
Core Concepts
Legacy Code Definition
Code without tests. A well-structured 6-month-old codebase with no tests is legacy. A messy 10-year-old codebase with comprehensive tests is not. The presence or absence of tests determines whether you can change code safely.
The Legacy Code Change Algorithm
- Identify change points — where in the code does the change need to happen?
- Find test points — where can you observe the effects of the change?
- Break dependencies — make the code testable without changing its behavior
- Write tests — characterization tests that lock down existing behavior
- Make changes and refactor — now that tests protect you, modify behavior and improve structure
Seams
A seam is a place where behavior can be altered without editing the code under test:
- Object seams — use polymorphism to substitute behavior (interfaces, subclasses)
- Link seams — substitute dependencies at the linking/import level (dependency injection, module mocking)
- Preprocessing seams — alter behavior via build configuration, feature flags, or compile-time substitution
Characterization Tests
Tests that document what the code actually does, not what it should do. They lock down existing behavior so you can detect unintended changes. Characterization tests answer: "If I make a change here, what breaks?"
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 First seen · 133 lines · 34 tokens per session scan A 44849971e661
legacy-code is a skill published in the GitHub repository bdfinst/agentic-dev-team (295 stars, last pushed 4d ago), licensed MIT. It adds 34 tokens to every session and 1,884 once invoked, about $0.0001 per session on Opus 5.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-09-03.
Other skills, from other repositories
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
build-test
Run the project's build / typecheck / lint / test commands and emit the build.passing + tests.passing signals devloop convergence reads.
resolve-author-fix
Find the root cause, implement a focused fix, and prove behavior with targeted tests and recordings.
work
Deliver one maintainer-approved EmDash issue, choosing the bug-fix path for a defect and the direct implementation path for an enhancement or task.
behavior-contract
Bug condition/postcondition formalization as testable Behavior Contracts. Defines invariants that must be preserved across fixes.
nw-bugfix
Bug fix workflow: root cause analysis → user review → regression test + fix via TDD.