# Anti Corruption Layer

> Protect your domain model from external systems by translating between external models and your own. Use when integrating with legacy systems, third-party APIs, or other bounded contexts that should not leak into your core model.

- Skill: `itsual/anti-corruption-layer` (Agent Skill)
- Install (CLI): `npx skillmds@latest add itsual/anti-corruption-layer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/itsual/anti-corruption-layer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: itsual (https://skillmd.com/u/itsual)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/itsual/anti-corruption-layer

---


# Anti-Corruption Layer

## Overview

An Anti-Corruption Layer (ACL) isolates your model from external models so that external changes or poor designs do not infect your core domain.

## When to Use

- Integrating with legacy or poorly modeled external systems
- Consuming third-party APIs whose structure you do not want to adopt
- Mapping between two bounded contexts with different languages

## Practices

- Translate external concepts into your own ubiquitous language as early as possible
- Keep the translation logic in a dedicated layer/module
- Avoid leaking external IDs, enums, or structures deep into your domain
- Write tests around the translation boundary

## Principles

- Your core domain should speak your language, not the external system’s
- The ACL is a deliberate seam that makes future replacement easier

## Verification

- External model changes are mostly absorbed by the ACL
- Core domain code has minimal knowledge of external structures

