Strangler Fig Pattern

Migrate legacy systems by gradually replacing components behind feature flags.

2|Updated Oct 16, 2025
One-click install
npx skills add https://github.com/spacholski1225/cc-config --skill strangler-fig-pattern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Strangler Fig Pattern
Source: https://github.com/spacholski1225/cc-config/tree/main/skills/refactoring/strangler-fig-pattern
Command: npx skills add https://github.com/spacholski1225/cc-config --skill strangler-fig-pattern

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps engineering teams migrate large legacy systems safely by gradually replacing components around the host, avoiding risky big-bang rewrites and enabling continuous delivery of production changes.

Core Features & Use Cases

  • Identify seams in the legacy code with clear input/output boundaries.
  • Introduce an abstraction layer to route between old and new implementations.
  • Implement the new version behind feature flags and run a phased rollout (dark launch, canary, ramp-up) with monitoring.
  • Instrument safety checks and rollback criteria to ensure production stability during migration.

Quick Start

Start by identifying seams in the legacy system, add characterization tests, create an abstraction layer, implement the new version behind feature flags, and begin a staged rollout with monitoring.

Frequently Asked Questions about Strangler Fig Pattern

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I incrementally migrate a legacy system without a big-bang rewrite?

To incrementally migrate a legacy system, you identify seams with clear input and output boundaries, introduce an abstraction layer to route traffic, and gradually replace old components while preserving production stability.

What is the strangler fig pattern and when should I use it for legacy migration?

The strangler fig pattern is a legacy migration technique that gradually replaces old system components around a host. You should use it for complex migrations involving production traffic, phased rollouts, and continuous delivery.

How do I use feature flags to safely roll out a new service during a legacy migration?

To safely roll out a new service during a legacy migration, implement the new version behind feature flags and execute a phased rollout using dark launch, canary deployment, and ramp-up stages with active monitoring.

What are the steps to identify seams and create an abstraction layer for a legacy migration?

To identify seams for a legacy migration, locate clear input and output boundaries in the legacy code, then create an abstraction layer to route traffic between old and new implementations while adding characterization tests.

Can I maintain production stability while replacing components across APIs and data boundaries?

You can maintain production stability during component replacement by enforcing an abstraction layer, instrumenting safety checks, defining rollback criteria, and executing staged deployments across APIs, services, and data boundaries.

When should I not use a phased rollout for replacing legacy systems?

You should avoid a phased rollout for replacing legacy systems when you cannot establish characterization tests, enforce an abstraction layer, or define clear rollback criteria to ensure production stability during the migration.