Skip to content
Skill

Refactor seams

Guides incremental refactors behind seams so a system stays releasable at each step

Refactor seams 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 Refactor seams

This skill helps an agent restructure code that is hard to change without a risky rewrite. It starts by locating a seam, such as an existing interface, a factory, a configuration flag, a module boundary or a network boundary, and introduces one as a separate, behavior-preserving change when none exists. It then picks a pattern from branch by abstraction, strangler fig, adapter insertion or parallel run, and lays out a sequence in which every step can be reviewed, shipped and reverted on its own.

The workflow adds guardrails around the sequence. It asks that characterization tests exist before restructuring, that the target shape be recorded as a decision, and that refactor steps never be bundled with behavior changes. For parallel runs it requires side-effect isolation, bounded load and a kill switch, and it asks that the old path be removed under a stated condition and owner. Where work is paused, the agent is directed to document where it stopped and what finishing would take.

The skill expects a workspace folder with blast-radius notes and a decision record directory, and it refers to companion skills such as characterization-tests, safe-change and handover-pack. It is plain Markdown with no scripts and no tool requirements.

When your agent uses it

Change code that must change but is not safely changeable - find the seams that let you alter behavior without rewriting, using branch-by-abstraction, strangler fig, and adapter insertion, always leaving the system releasable at every step. Use when extracting from a monolith, when a component must be replaced incrementally, when a refactor is too large to do in one change, or when someone proposes a rewrite. Every step ships independently, because a long-lived refactor branch is how refactors die.

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 1 file (9 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-migration 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-migration@fde-skills

Or copy only this skill to ~/.claude/skills/refactor-seams:

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

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

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/refactor-seams 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/refactor-seams &&
cp -R "$tmp/fde-migration/skills/refactor-seams" ~/.agents/skills/refactor-seams &&
rm -rf "$tmp"

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

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/refactor-seams 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/refactor-seams &&
cp -R "$tmp/fde-migration/skills/refactor-seams" ~/.cursor/skills/refactor-seams &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/refactor-seams 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-migration/skills/refactor-seams

Or copy the folder to ~/.gemini/skills/refactor-seams yourself.

Gemini CLI docs on skills

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

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

For one project only, put the folder in .github/skills/refactor-seams 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-migration/skills/refactor-seams into your agent's skills folder as refactor-seams. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Seam discovery
Ranks the places where behavior can be altered without editing the code being changed, from existing interfaces to network boundaries.
Pattern selection
Compares branch by abstraction, strangler fig, adapter insertion and parallel run by when each fits and how each ends.
Releasable step sequencing
Breaks a replacement into ordered steps that each ship independently and keep the system in a working state.
Parallel run isolation
Sets conditions for comparing old and new implementations on live traffic without duplicate charges or published events.
Old path deletion
Requires a stated removal condition and owner so that superseded implementations and flags do not linger.
Pause documentation
Asks for a record of where a paused refactor stopped, why, and what completing it would require.

Good for

  • Extract a pricing module out of a large order-processing monolith
  • Replace a payment component incrementally without a long-lived branch
  • Plan a staged migration when someone proposes rewriting a service
  • Introduce an interface over legacy code so callers can be moved in batches
  • Compare a new implementation against the old one before switching traffic

Refactor seams FAQ

What should exist before Refactor seams is used?

The skill says characterization tests should be in place first, since they show whether behavior was preserved, and that the target shape should be recorded in a decision record.

Does the skill run any scripts or require specific tools?

No. The skill ships as a single SKILL.md with no scripts, and it does not set any allowed tools.

When should Refactor seams not be used?

The skill is aimed at larger restructuring. It says a change that fits in one safe diff belongs to a different skill, and that small, well-covered components or pure behavior additions are out of scope.

What does Refactor seams produce?

It asks for an architecture decision record for the target shape and a change-log entry with a table of steps, their state, pull requests, and whether each step changed behavior.

How do I install Refactor seams in Claude Code?

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

Does Refactor seams 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 Refactor seams?

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 Refactor seams?

The closest alternatives to Refactor seams are Refactor, Refactor plan, Safe change, Characterization tests and Improve architecture.

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