c/backend › command
0votes

Legacy code rules (Maciej Ciemborowicz)

Skill
submitted by CommandVault editors to c/backend

Rules inspired by Michael Feathers for changing hard-to-test code safely.

Claude follows a condensed rule set inspired by Working Effectively with Legacy Code: state what must keep working, add characterization tests, find or create a seam, break only the dependency that blocks testing, then change behavior and refactor in separate steps. It covers sprout and wrap techniques and review rules for risky edits. A longer reference version is included.

Try asking:

  • "Add a feature to this untested class without breaking it"
  • "Write characterization tests for this legacy function before we change it"
  • "Find a seam so we can test this code that calls the database directly"

Source: ciembor/agent-rules-books · MIT · by Maciej Ciemborowicz

0 commentsreport

Install this skill

Agent Skills are folders with a SKILL.md file. Most AI coding tools load them automatically when a task matches the description. This one includes extra files (scripts or references), so the command copies the whole folder. Tip: .agents/skills/ is read by Codex, Cursor, Copilot, Gemini CLI, Grok and Windsurf.

One command
npx commandvault add legacy-code-rules-maciej-ciemborowicz-804a3d1b --tool claude
Install (run in your project folder)
npx degit ciembor/agent-rules-books/working-effectively-with-legacy-code .claude/skills/working-effectively-with-legacy-code

Use it: Claude uses it automatically when a task matches, or type /working-effectively-with-legacy-code.

From Claude Code's docs , checked Oct 17, 2026.

Made by Maciej Ciemborowicz, MIT license. Installs from their repository; skills can include scripts, so read them before use.

In the Claude apps, zip the folder and upload it under Settings → Capabilities → Skills.

More from c/backend

See all of c/backend →
0 comments

Log in to join the discussion.