refactor-seams

refactor-seams is a skill for Claude Code from rpraharaj/forward-deployed-engineer. It costs 108 tokens per session (1,865 once invoked), scanned A, original, MIT.

A method for restructuring difficult code through small changes that keep the system releasable. It introduces boundaries such as adapters or temporary parallel paths so old and new implementations can coexist during the transition.

In plain words
What is it for?
Use it when extracting code from a monolith, replacing a component gradually, or handling a refactor too large or risky for one change.
Why use it?
A rewrite on a long-lived branch can drift from the main codebase and end in a risky merge or abandoned effort. Incremental changes keep useful progress deployable as priorities change.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the fde-migration plugin — 4 skills shipped together

Good fit Use it when extracting code from a monolith, replacing a component gradually, or handling a refactor too large or risky for one change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rpraharaj/forward-deployed-engineer/refactor-seams
Install

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.

Any agent
npx skills add rpraharaj/forward-deployed-engineer --skill refactor-seams
Clone the repo
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer

Made for: Claude Code.

Or install fde-migration, the plugin that ships this one along with the rest of its 4 skills.

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

agentmods badge for refactor-seams

README.md
[![agentmods](https://agentmods.dev/badge/skills/rpraharaj/forward-deployed-engineer/refactor-seams.svg)](https://agentmods.dev/skills/rpraharaj/forward-deployed-engineer/refactor-seams)
Your own site
<a href="https://agentmods.dev/skills/rpraharaj/forward-deployed-engineer/refactor-seams"><img src="https://agentmods.dev/badge/skills/rpraharaj/forward-deployed-engineer/refactor-seams.svg" alt="Measured on agentmods" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,865 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.01865
Opus 5 $0.00054 $0.00932
Sonnet 5 $0.00022 $0.00373
Haiku 4.5 $0.00011 $0.00186

Measured 8d ago against content hash cf0c0bc09847, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

refactor-seams 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 8d 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.

fde-migration/skills/refactor-seams/SKILL.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Refactor seams

Changing the shape of something without stopping it.

Why this exists

The default plan for code that has become hard to change is a rewrite on a branch. It is almost always the wrong plan, and it fails the same way every time: the branch diverges, the main line keeps moving, the merge becomes impossible, and the work is abandoned after months. Everyone involved knew this would happen and did it anyway, because the alternative looked slower.

The alternative genuinely is slower per step, and it finishes. Incremental restructuring behind a seam, with the system releasable at every point, converts an all-or-nothing bet into a series of small safe changes — any one of which can be the last one if priorities shift.

For an FDE this matters twice over. You may not be here long enough to finish a rewrite, and a half-finished rewrite is worse than either state. Every incremental step you ship is value that survives your departure.

When this applies

  • Extracting from a monolith
  • Replacing a component incrementally
  • A refactor too large for one change
  • Someone proposes a rewrite
  • Code must change but isn't safely changeable

When it doesn't

  • The change fits in one safe diff — that's safe-change
  • The component is genuinely small and well covered
  • Nothing is being restructured, only behavior added

Prerequisites

  • Locate the workspace: FDE_WORKSPACE, else the charter Location, else .fde/, else ../<repo>-fde/
  • .fde/06-blast-radius-*.md — you need to know every caller
  • characterization-tests first. Restructuring untested code is the single riskiest thing in this portfolio. The tests are what make the refactor verifiable as behavior-preserving.
  • .fde/adr/ — the target shape should be a recorded decision

Procedure

1. Establish the seam

A seam is where you can change behavior without editing the thing you're changing. Find it before planning anything.

Candidates, in rough order of preference:

  1. An existing interface with the callers already going through it — ideal, nothing to introduce
  2. A constructor or factory where the implementation is chosen
  3. A configuration or flag selecting between paths
  4. A module or package boundary with a narrow public surface
  5. A network boundary — the coarsest and often the most practical for extraction

Read the full file on GitHub · 143 lines

Changes

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.

  1. 8d ago First seen · 143 lines · 108 tokens per session scan A cf0c0bc09847

Subscribe to this mod's changes

refactor-seams is a skill published in the GitHub repository rpraharaj/forward-deployed-engineer (6 stars, last pushed 21d ago), licensed MIT. It adds 108 tokens to every session and 1,865 once invoked, about $0.0005 per session on Opus 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-08-31.

Related

Other skills, from other repositories

cli-e2e

Write, modify, or debug Docker-based Composio CLI end-to-end tests under ts/e2e-tests/cli, including binary invocation, fixture isolation, output assertions, and package manifests. Use for CLI E2E test suites only; use cli-command for CLI source implementation.

ComposioHQ/composio · 62 tokens

openlore-analyze-codebase

Run a full static OpenLore analysis and summarize architecture, call graph, refactoring issues, and duplicate code. Use when asked to analyze, map, or assess a codebase without LLM inference.

clay-good/OpenLore · 48 tokens

codex-agent

Use when you want a second-opinion review via Codex CLI, cross-verification after another agent implements changes, debugging help, or alternative implementation proposals. Requires Codex CLI to be installed and authenticated.

majiayu000/spellbook · 45 tokens

css-debug

Use this skill to diagnose CSS and frontend layout issues such as positioning, overflow clipping, Tailwind class conflicts, z-index stacking, and React rendering visibility problems.

majiayu000/spellbook · 35 tokens

ln-22-codebase-auditor

Audits cross-cutting code health, security, delivery, and maintainability when no specialist audit is primary. Not for a single delivery review.

levnikolaevich/claude-code-skills · 38 tokens

lsp-local-symbols

Fast file-scoped symbol analysis — find all usages of a symbol within the current file, list all symbols defined in the file, and get type info at a position. Use when you need local-scope analysis without a workspace-wide search.

blackwell-systems/agent-lsp · 54 tokens