ddd-pattern

Apply Domain-Driven Design patterns to TypeScript and Python codebases.

2|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/hamzaPixl/pixl-ai --skill ddd-pattern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddd-pattern
Source: https://github.com/hamzaPixl/pixl-ai/tree/main/packages/crew/skills/ddd-pattern
Command: npx skills add https://github.com/hamzaPixl/pixl-ai --skill ddd-pattern

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Large or messy codebases often mix domain logic with infrastructure concerns, hiding business rules, unclear entity boundaries, and implicit bounded contexts that create coupling and slow feature development; this Skill discovers and extracts explicit domain models so teams can maintain invariants and evolve systems safely.

Core Features & Use Cases

  • Analyze code to discover entity-like classes, services, and embedded business rules and map relationships and implicit bounded contexts.
  • Model domain concepts as entities, value objects, aggregates, and repository interfaces, then separate the pure domain layer from infrastructure implementations.
  • Optionally introduce domain events and a transactional outbox for reliable cross-context communication.
  • Use cases: migrating a legacy Python or TypeScript service to DDD, extracting a billing or ordering domain, introducing aggregate boundaries to prevent cross-service coupling.

Quick Start

Refactor the billing service to DDD by identifying bounded contexts, extracting entities and value objects, defining aggregate roots and repository interfaces, and moving persistence into infrastructure implementations.

Frequently Asked Questions about ddd-pattern

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

FAQPage Schema
How do I refactor a legacy codebase into domain-driven design bounded contexts?

Refactoring codebases into domain-driven design involves statically analyzing TypeScript and Python projects to extract domain concepts, model bounded contexts, and separate pure domain layers from infrastructure implementations.

How do I extract aggregates and repository interfaces from existing Python or TypeScript services?

You extract aggregates and repository interfaces by statically analyzing code to discover entity-like classes, map relationships, and model domain concepts while enforcing no framework or persistence imports in the domain layer.

When do I need to extract domain events and a transactional outbox for cross-context communication?

You need domain events and a transactional outbox when decoupling bounded contexts in refactored systems, optionally introducing them to ensure reliable cross-context communication between separated services and APIs.

Can I use this domain modeling approach for migrating legacy services with mixed infrastructure and business logic?

Yes, this domain modeling approach targets migrating legacy Python or TypeScript services by discovering implicit bounded contexts in mixed codebases and extracting pure domain layers to maintain invariants and prevent cross-service coupling.

What are the limitations of enforcing a pure domain layer with no framework or persistence imports?

Enforcing a pure domain layer with no framework or persistence imports requires moving all infrastructure implementations out of the domain, meaning persistence and framework dependencies must be entirely abstracted via repository interfaces.