Agent skill

Strangler Fig Patterns

by revfactory in revfactory/harness-100

Detailed implementation guide for the Strangler Fig pattern and related migration patterns for incrementally replacing legacy systems.

Apache-2.0Auto-check passedDevelopment

Install Strangler Fig Patterns

skills CLI
$ npx skills add revfactory/harness-100 --skill strangler-fig-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install revfactory/harness-100 strangler-fig-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/en/22-legacy-modernizer/.claude/skills/strangler-fig-patterns .claude/skills/strangler-fig-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
strangler-fig-patterns
GitHub stars
1.3k
Token cost
~1.4k tokens
SKILL.md length
285 words
Files
1
Skills in repo
464
Repo updated
First seen
Licence
Apache-2.0

At a glance

Detailed implementation guide for the Strangler Fig pattern and related migration patterns for incrementally replacing legacy systems.

  • Works in 5 steps: Strangler Fig Pattern → Branch by Abstraction → Parallel Run (Scientist Pattern) → …
  • Incremental migration
  • SKILL.md covers Pattern Catalog, Pattern Selection Decision Tree and Warning Signs and Responses
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Strangler Fig Patterns is an agent skill from revfactory/harness-100. Detailed implementation guide for the Strangler Fig pattern and related migration patterns for incrementally replacing legacy systems. Use this skill for 'strangler fig', 'incremental migration', 'refactoring patterns', 'branch by abstraction', 'parallel run', 'gradual replacement', 'migration pattern selection', and other legacy migration pattern applications. Enhances pattern selection and implementation for refactoring-strategist and migration-engineer. Note: full team orchestration and project management are…

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Legacy modernization, Project management and Refactoring. The licence is Apache-2.0.

When your agent uses it

  • Incremental migration
  • Refactoring patterns
  • Branch by abstraction
  • Gradual replacement

Example prompts

  • “strangler fig”
  • “incremental migration”
  • “refactoring patterns”
  • “/strangler-fig-patterns”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Strangler Fig Pattern
  2. Branch by Abstraction
  3. Parallel Run (Scientist Pattern)
  4. Anti-Corruption Layer (ACL)
  5. Feature Toggle Strategy

What it can do on your machine

Read from SKILL.md and the folder at commit 8e8d35c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Strangler Fig Patterns loads about 1.4k tokens when it runs. Until then it costs about 143 tokens; SKILL.md has 285 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~143
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 285 words, ~1,420 tokens.

Download SKILL.mdSave it as .claude/skills/strangler-fig-patterns/SKILL.md (or your agent's skills folder).
name
strangler-fig-patterns
description
Detailed implementation guide for the Strangler Fig pattern and related migration patterns for incrementally replacing legacy systems. Use this skill for 'strangler fig', 'incremental migration', 'refactoring patterns', 'branch by abstraction', 'parallel run', 'gradual replacement', 'migration pattern selection', and other legacy migration pattern applications. Enhances pattern selection and implementation for refactoring-strategist and migration-engineer. Note: full team orchestration and project management are outside the scope of this skill.

Strangler Fig Patterns — Incremental Migration Pattern Guide

Detailed implementation methodologies for proven patterns for replacing legacy systems.

Pattern Catalog

1. Strangler Fig Pattern

Applicable Conditions: When incremental transition from a monolith to a new system is needed

+---------------------------------------------+
|              Router/Proxy                    |
|  +----------+    +----------------------+   |
|  | Legacy   | <-> | New System          |   |
|  | (shrink- |    | (expanding)          |   |
|  |  ing)    |    |                      |   |
|  +----------+    +----------------------+   |
+---------------------------------------------+

Implementation Steps:

StepTaskVerification CriteriaRollback Method
1. Insert InterceptorAdd router/proxy layerConfirm 100% existing traffic routes through legacyRemove interceptor
2. Extract by FeatureStart with most independent feature into new serviceVerify identical input/output (Shadow Test)Restore routing
3. Traffic MigrationCanary -> gradual percentage increaseError rate, latency, business metricsRevert to 0%
4. Legacy RemovalDelete fully migrated codeConfirm 100% migration completeN/A

Extraction Priority Matrix:

High Business Value
       |
  (3) Quick | (1) Top Priority
    Wins    |  Extraction Targets
  ----------+-----------> Low Coupling
  (4) Defer | (2) Gradual
    Hold    |  Decouple then Extract
       |
Low Business Value
2. Branch by Abstraction

Applicable Conditions: When replacing internal components (within the same codebase)

python
# Step 1: Insert abstraction layer
class PaymentGateway(ABC):
    @abstractmethod
    def process(self, amount: Decimal) -> PaymentResult: ...

# Step 2: Wrap legacy implementation
class LegacyPayment(PaymentGateway):
    def process(self, amount):
        return self.old_system.charge(amount)

# Step 3: New implementation
class ModernPayment(PaymentGateway):
    def process(self, amount):
        return self.stripe_client.create_charge(amount)

# Step 4: Switch via feature flag
gateway = ModernPayment() if feature_flag('new_payment') else LegacyPayment()
3. Parallel Run (Scientist Pattern)

Applicable Conditions: When verifying the accuracy of a new system before replacement

python
class Experiment:
    def run(self, input_data):
        control_result = self.legacy.execute(input_data)
        try:
            candidate_result = self.modern.execute(input_data)
            if not self.compare(control_result, candidate_result):
                self.report_mismatch(input_data, control_result, candidate_result)
        except Exception as e:
            self.report_error(input_data, e)
        return control_result  # Always return legacy result

Comparison Strategies:

Comparison LevelMethodTolerance
Exact match==0% difference
Structural matchSchema comparisonField presence/type match
Semantic matchBusiness rule-basedDomain-specific tolerance
Statistical matchAggregate/distribution comparison>= 99.9% match rate
4. Anti-Corruption Layer (ACL)

Applicable Conditions: When legacy and new systems must coexist, preventing domain contamination

ACL Components:

ComponentRoleImplementation
TranslatorDomain model conversionDTO <-> Domain Object mapping
AdapterInterface conversionLegacy API -> Modern interface
FacadeComplexity hidingMultiple legacy calls -> single method
5. Feature Toggle Strategy
yaml
toggles:
  # Phase 1: Dev team only
  new_user_service: { type: permission, users: ["dev-team"] }
  # Phase 2: Canary (10%)
  new_user_service: { type: gradual-rollout, percentage: 10, sticky: true }
  # Phase 3: Full rollout
  new_user_service: { type: release, enabled: true }
  # Phase 4: Remove toggle (delete legacy code)

Pattern Selection Decision Tree

Is legacy replacement needed?
+-- External system/service replacement -> Strangler Fig
+-- Internal component replacement
|   +-- Pre-replacement verification needed -> Parallel Run + Branch by Abstraction
|   +-- Confident in replacement -> Branch by Abstraction
+-- Long-term legacy-new coexistence -> Anti-Corruption Layer
+-- All cases -> Feature Toggle recommended in combination

Warning Signs and Responses

Warning SignMeaningResponse
Module to extract has 10+ dependenciesExcessive couplingInsert ACL then incrementally resolve dependencies
Parallel Run mismatch rate > 5%Excessive behavioral differencesRe-verify business rules, collect edge cases
> 20 toggles active simultaneouslyToggle debtIntroduce regular toggle cleanup sprints
Migration ongoing for 6+ monthsIncreasing parallel operation costsReduce scope or consider partial Big Bang

© revfactory, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in en/22-legacy-modernizer/.claude/skills/strangler-fig-patterns of revfactory/harness-100.

Open the folder on GitHubat commit 8e8d35c

Compare with similar skills

Strangler Fig Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Strangler Fig Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Strangler Fig Patterns this skillrevfactory/harness-1001.3k—~1.4kAutomated safety check: PassApache-2.0
Legacy Code Summarizermajiayu000/claude-skill-registry6661 repos~5.2kAutomated safety check: PassMIT
Code Refactoring Workflowluongnv89/claude-howto42k—~3.1kAutomated safety check: PassMIT
Modern JavaScript Patternswshobson/agents40k11 repos~548Automated safety check: PassMIT
Fowler-Style Refactoringlhfer/claude-howto-zh-cn2.3k—~156Automated safety check: PassMIT
Extract Command from Git::Libruby-git/ruby-git1.8k—~4.4kAutomated safety check: PassMIT

Similar skills

  • Legacy Code Summarizer

    majiayu000/claude-skill-registry

    Produces comprehensive summaries and insights about legacy codebases to help understand unfamiliar code.

    666 GitHub starsUsed in 1 repo~5.2k tokens
    DevelopmentAuto-check passed
  • Code Refactoring Workflow

    luongnv89/claude-howto

    Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.

    42k GitHub stars~3.1k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Covers ES6+ syntax and functional patterns for refactoring older JavaScript: async/await, destructuring, spread, modules, generators and data pipelines.

    40k GitHub starsUsed in 11 repos~548 tokens
    DevelopmentAuto-check passed
  • Fowler-Style Refactoring

    lhfer/claude-howto-zh-cn

    基于 Martin Fowler 方法论做系统化重构。Use when users ask to refactor code, improve structure, reduce technical debt, clean up legacy code, or improve maintainability.

    2.3k GitHub stars~156 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Migrates a direct command call in Ruby Git's Git::Lib to a Git::Commands class, as part of a Strangler Fig redesign, with a plan, legacy tests and a pull request.

    1.8k GitHub stars~4.4k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Audit and improve repository code milestone by milestone for correctness, clarity, local reasoning, DRY design, explicit state modeling, panic resistance, and trustworthy TypeScript boundaries.

    392 GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed

More from revfactory/harness-100

All 464 skills in this repo
  • Anti Bot Analyzer

    revfactory/harness-100

    A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.

    1.3k GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • API Error Design Patterns

    revfactory/harness-100

    Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • API Security Checklist

    revfactory/harness-100

    Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.

    1.3k GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Arg Parser Generator

    revfactory/harness-100

    Methodology for systematically designing and generating CLI tool argument parser structures.

    1.3k GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Audience Segmentation

    revfactory/harness-100

    Audience segmentation skill used by the analyst and curator agents.

    1.3k GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Audio Storytelling

    revfactory/harness-100

    Audio storytelling skill used by the podcast scriptwriter and show note editor.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Categories

Questions about Strangler Fig Patterns

What does Strangler Fig Patterns do?

Detailed implementation guide for the Strangler Fig pattern and related migration patterns for incrementally replacing legacy systems. Strangler Fig Patterns is an agent skill from revfactory/harness-100. Detailed implementation guide for the Strangler Fig pattern and related migration patterns for incrementally replacing legacy systems.

When should I use Strangler Fig Patterns?

Strangler Fig Patterns fits situations like: incremental migration; refactoring patterns; branch by abstraction; gradual replacement.

How do I install Strangler Fig Patterns in Claude Code?

Run `npx skills add revfactory/harness-100 --skill strangler-fig-patterns -a claude-code`. Or copy the skill folder (en/22-legacy-modernizer/.claude/skills/strangler-fig-patterns in revfactory/harness-100) into .claude/skills/strangler-fig-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Strangler Fig Patterns in Codex?

Run `npx skills add revfactory/harness-100 --skill strangler-fig-patterns -a codex`. Or copy the skill folder (en/22-legacy-modernizer/.claude/skills/strangler-fig-patterns in revfactory/harness-100) into .agents/skills/strangler-fig-patterns in your project. Codex loads it when a task matches its description.

Can I use Strangler Fig Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add revfactory/harness-100 --skill strangler-fig-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/strangler-fig-patterns, .gemini/skills/strangler-fig-patterns, .github/skills/strangler-fig-patterns and .opencode/skills/strangler-fig-patterns in your project.

What does Strangler Fig Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Strangler Fig Patterns is instructions for the agent only. Our summary lists: Python 3.

Does Strangler Fig Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Strangler Fig Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Strangler Fig Patterns use?

Strangler Fig Patterns is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Strangler Fig Patterns use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Strangler Fig Patterns?

Skills that share tags, products or a category with Strangler Fig Patterns: Legacy Code Summarizer (majiayu000/claude-skill-registry, 666 stars), Code Refactoring Workflow (luongnv89/claude-howto, 42k stars), Modern JavaScript Patterns (wshobson/agents, 40k stars) and Fowler-Style Refactoring (lhfer/claude-howto-zh-cn, 2.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Strangler Fig Patterns?

revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,290 GitHub stars. The repository holds 464 skills in this directory. The repository was last updated on March 22, 2026.

Source: revfactory/harness-100 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.