Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
thebeardedbearsas avatar

Cqrs

  • 114 installs
  • 99 repo stars
  • Updated August 4, 2026
  • thebeardedbearsas/claude-craft

Helps with ai & agent building tasks.

About

cqrs is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • cqrs
  • AI & Agent Building
  • AI-coding skill

Cqrs by the numbers

  • 114 all-time installs (skills.sh)
  • Ranked #3,957 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/thebeardedbearsas/claude-craft --skill cqrs

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs114
repo stars99
Last updatedAugust 4, 2026
Repositorythebeardedbearsas/claude-craft

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

CQRS — Quick Reference

CQRS (Command Query Responsibility Segregation) sépare les opérations d'écriture et de lecture dans des modèles distincts. N'est pas par défaut — c'est une optimisation à activer quand le coût de la complexité est justifié.

Quand utiliser

PertinentPas pertinent
Domaine métier complexe avec règles d'invariants richesCRUD simple, domaine pauvre
Ratio lectures/écritures > 10×Petits projets, équipe junior
Audit / compliance (Event Sourcing naturel)Cohérence immédiate requise
Read models hétérogènes (mobile vs analytics vs back-office)Modèle de données stable et unique
Scale différencié reads vs writes (replicas, cache, search)Charge faible, monolithe modeste

Règle d'or : commencer par une architecture classique. Migrer vers CQRS lorsqu'au moins 2 des cas pertinents sont présents simultanément.

Architecture en 30 secondes

[ User ]
   ↓
[ Command ]──────────▶ [ Write Model (Domain) ]
                              ↓ persist + emit
                       [ Event(s) ]
                              ↓
[ Query ] ◀───── [ Read Model (denormalised) ] ◀── projections
  • Command side : modèle normalisé, focus invariants métier. Écrit, ne lit que ce qui est nécessaire à la validation.
  • Query side : modèle dénormalisé, focus performance lecture. N'a pas de logique métier.
  • Projections : transforment les events en read models. Eventually consistent.

Trade-off central

BénéficeCoût
Scale indépendant lecture / écritureEventual consistency (≈ 50-500 ms latency typique)
Read models taillés pour chaque besoinPlus de code à maintenir (2 modèles)
Event Sourcing devient facile à brancherDebugging plus complexe (event flow)
Audit trail naturelMigration tardive très coûteuse

Patterns associés (souvent ensemble)

  • Event Sourcing : stocker la séquence d'events comme source de vérité, le write model est reconstruit en replay.
  • Saga / Process Manager : orchestrer des transactions distribuées via events.
  • Outbox Pattern : garantir l'atomicité publication event + write DB.
  • Materialized Views : projections persistées en table dédiée pour query speed.

Anti-patterns critiques

  • ❌ CQRS sans cas d'usage clair → over-engineering, double charge cognitive.
  • ❌ Read model qui exécute des règles métier → bug d'invariants à chaque projection.
  • ❌ Projections synchrones → on perd le bénéfice scalability.
  • ❌ Event Sourcing sans snapshots → replay de millions d'events au boot.
  • ❌ Command qui retourne data complète → c'est une Query déguisée.

Pour aller plus loin

Implémentations Symfony / Laravel / .NET, Event Sourcing (Prooph, EventStoreDB), saga patterns, outbox, exemples concrets, migration progressive d'un CRUD vers CQRS, checklists par phase : voir @.claude/skills/cqrs/REFERENCE.md.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.