{
    "url": "https://delaparra-services.nl/skills/cqrs-implementation",
    "locale": "en",
    "title": "CQRS Implementation | DeLaParra Services",
    "description": "Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.",
    "alternates": {
        "en": "https://delaparra-services.nl/skills/cqrs-implementation",
        "nl": "https://delaparra-services.nl/nl/skills/cqrs-implementation"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/skills/cqrs-implementation.csv",
        "md": "https://delaparra-services.nl/skills/cqrs-implementation.md",
        "json": "https://delaparra-services.nl/skills/cqrs-implementation.json",
        "zip": "https://delaparra-services.nl/skills/cqrs-implementation.zip",
        "pdf": "https://delaparra-services.nl/skills/cqrs-implementation.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/skills/cqrs-implementation.csv",
            "encodingFormat": "text/csv",
            "name": "cqrs-implementation.csv"
        },
        {
            "url": "https://delaparra-services.nl/skills/cqrs-implementation.json",
            "encodingFormat": "application/json",
            "name": "cqrs-implementation.json"
        },
        {
            "url": "https://delaparra-services.nl/skills/cqrs-implementation.md",
            "encodingFormat": "text/markdown",
            "name": "cqrs-implementation.md"
        },
        {
            "url": "https://delaparra-services.nl/skills/cqrs-implementation.pdf",
            "encodingFormat": "application/pdf",
            "name": "cqrs-implementation.pdf"
        },
        {
            "url": "https://delaparra-services.nl/skills/cqrs-implementation.zip",
            "encodingFormat": "application/zip",
            "name": "cqrs-implementation.zip"
        },
        {
            "url": "https://delaparra-services.nl/skills/cqrs-implementation/download",
            "encodingFormat": "application/zip",
            "name": "cqrs-implementation-files.zip"
        }
    ],
    "markdown": "# CQRS Implementation\n\n \n\nImplement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.\n\n \n\n**Licence** MIT\n\n \n\n**Source** wshobson/agents\n\n [Download zip](<https://delaparra-services.nl/skills/cqrs-implementation/download>)   \n\n# CQRS Implementation\n\n \n\nComprehensive guide to implementing CQRS (Command Query Responsibility Segregation) patterns.\n\n \n\n## When to Use This Skill\n\n \n\n- Separating read and write concerns \n- Scaling reads independently from writes \n- Building event-sourced systems \n- Optimizing complex query scenarios \n- Different read/write data models needed \n- High-performance reporting requirements\n\n \n\n## Core Concepts\n\n \n\n### 1. CQRS Architecture\n\n \n\n```\n                    ┌─────────────┐\n                    │   Client    │\n                    └──────┬──────┘\n                           │\n              ┌────────────┴────────────┐\n              │                         │\n              ▼                         ▼\n       ┌─────────────┐          ┌─────────────┐\n       │  Commands   │          │   Queries   │\n       │    API      │          │    API      │\n       └──────┬──────┘          └──────┬──────┘\n              │                         │\n              ▼                         ▼\n       ┌─────────────┐          ┌─────────────┐\n       │  Command    │          │   Query     │\n       │  Handlers   │          │  Handlers   │\n       └──────┬──────┘          └──────┬──────┘\n              │                         │\n              ▼                         ▼\n       ┌─────────────┐          ┌─────────────┐\n       │   Write     │─────────►│    Read     │\n       │   Model     │  Events  │   Model     │\n       └─────────────┘          └─────────────┘\n```\n\n \n\n### 2. Key Components\n\n    Component Responsibility     **Command** Intent to change state   **Command Handler** Validates and executes commands   **Event** Record of state change   **Query** Request for data   **Query Handler** Retrieves data from read model   **Projector** Updates read model from events    \n\n## Templates and detailed worked examples\n\n \n\nFull template library and detailed worked examples live in ` references/details.md `. Read that file when you need the concrete templates.\n\n \n\n## Best Practices\n\n \n\n### Do's\n\n \n\n- **Separate command and query models** - Different needs \n- **Use eventual consistency** - Accept propagation delay \n- **Validate in command handlers** - Before state change \n- **Denormalize read models** - Optimize for queries \n- **Version your events** - For schema evolution\n\n \n\n### Don'ts\n\n \n\n- **Don't query in commands** - Use only for writes \n- **Don't couple read/write schemas** - Independent evolution \n- **Don't over-engineer** - Start simple \n- **Don't ignore consistency SLAs** - Define acceptable lag\n\n \n\n## Files\n\n \n\n- ` LICENSE ` \n- ` SKILL.md ` \n- ` SOURCE.md ` \n- ` references/details.md `\n\n \n\n## Related terms\n\n \n\n- [Event](<https://delaparra-services.nl/knowledge-hub/event>) \n- [Event Listener / Handler](<https://delaparra-services.nl/knowledge-hub/event-listener-handler>) \n- [Event-Driven Programming](<https://delaparra-services.nl/knowledge-hub/event-driven-programming>) \n- [Observable](<https://delaparra-services.nl/knowledge-hub/observable>) \n- [Publish / Subscribe (Pub/Sub)](<https://delaparra-services.nl/knowledge-hub/publish-subscribe-pubsub>) \n- [Reactive Programming](<https://delaparra-services.nl/knowledge-hub/reactive-programming>) \n- [Stream](<https://delaparra-services.nl/knowledge-hub/stream>) \n- [Subject](<https://delaparra-services.nl/knowledge-hub/subject>) \n- [Subscription](<https://delaparra-services.nl/knowledge-hub/subscription>)\n\n \n\n[Installing an agent skill in Claude Code, Codex, Cursor and Copilot](<https://delaparra-services.nl/manuals/een-skill-installeren-in-je-ai-assistent>)\n\n[HTML version](https://delaparra-services.nl/skills/cqrs-implementation)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://delaparra-services.nl/skills/cqrs-implementation#webpage",
                "url": "https://delaparra-services.nl/skills/cqrs-implementation",
                "name": "CQRS Implementation | DeLaParra Services",
                "description": "Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/skills/cqrs-implementation#breadcrumb"
                }
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/skills/cqrs-implementation#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "CQRS Implementation"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "SoftwareSourceCode",
                "@id": "https://delaparra-services.nl/skills/cqrs-implementation#skill",
                "url": "https://delaparra-services.nl/skills/cqrs-implementation",
                "name": "CQRS Implementation",
                "description": "Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.",
                "inLanguage": "en",
                "license": "https://spdx.org/licenses/MIT.html",
                "subjectOf": {
                    "@id": "https://delaparra-services.nl/skills/cqrs-implementation#dataset"
                }
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/skills/cqrs-implementation#dataset",
                "name": "CQRS Implementation",
                "description": "Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.",
                "url": "https://delaparra-services.nl/skills/cqrs-implementation",
                "identifier": "https://delaparra-services.nl/skills/cqrs-implementation#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/skills/cqrs-implementation#skill"
                },
                "creditText": "wshobson/agents",
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://spdx.org/licenses/MIT.html",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "dateModified": "2026-11-28T14:00:11+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#skills",
                    "name": "Skills for AI coding assistants",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "cqrs-implementation.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/skills/cqrs-implementation.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:11+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "cqrs-implementation.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/skills/cqrs-implementation.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:11+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "cqrs-implementation.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/skills/cqrs-implementation.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:11+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "cqrs-implementation.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/skills/cqrs-implementation.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:11+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "cqrs-implementation.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/cqrs-implementation.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:11+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "cqrs-implementation-files.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/cqrs-implementation/download",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:11+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    }
                ]
            }
        ]
    }
}