Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add j5ik2o/okite-ai --skill cqrs-to-event-sourcinggit clone --depth 1 https://github.com/j5ik2o/okite-aiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/j5ik2o/okite-ai/cqrs-to-event-sourcing)<a href="https://agentmods.dev/skills/j5ik2o/okite-ai/cqrs-to-event-sourcing"><img src="https://agentmods.dev/badge/skills/j5ik2o/okite-ai/cqrs-to-event-sourcing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/j5ik2o/okite-ai/cqrs-to-event-sourcing"><img src="https://agentmods.dev/badge/skills/j5ik2o/okite-ai/cqrs-to-event-sourcing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00246 | $0.02691 |
| Opus 5 | $0.00123 | $0.01345 |
| Sonnet 5 | $0.00049 | $0.00538 |
| Haiku 4.5 | $0.00025 | $0.00269 |
Grade A, and why
cqrs-to-event-sourcing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- cqrs-tradeoffs — 86% identical, 280 lines differ
How it starts
The opening of the file, as written. The whole thing — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CQRSはなぜEvent Sourcingになるのか
CQRSを実装すると、C側からQ側への同期問題に直面し、イベントソーシングに至る。これはオプションではなく、実装上の必然である。
よくある誤解: 「CQRSはモデルを分ける必要がない」
この解釈は危険な誤読である。
正しい意味は「システムのうち、CQRS領域と非CQRS領域に分けることができ、CQRSを部分導入できる」ということ。モデルを分けなくてよいのは非CQRS領域であり、CQRS領域内ではコマンドモデルとクエリモデルの分割は必須。
システム全体
├── CQRS領域 → モデル分割は必須
└── 非CQRS領域 → 分割不要(従来のCRUDで十分)
「CQRSはモデルを分割しなくてもいい」という解釈は、もはやCQRSではない。
C側とQ側のデータの違い
CQRSにおいて、C側(コマンド)とQ側(クエリ)のデータは根本的に異なる。
具体例: カートシステム
C側テーブル(ドメインモデルの永続化に必要な最小データ):
| カートテーブル | カートアイテムテーブル |
|---|---|
| カートID (PK) | カートアイテムID (PK) |
| 顧客アカウントID | カートID (FK) |
| 上限予算金額 | 商品ID |
| 作成日時 | 数量 |
| 作成日時 |
Q側テーブル(表示・検索に必要なデータ):
| カートテーブル | カートアイテムテーブル |
|---|---|
| カートID (PK) | カートアイテムID (PK) |
| 顧客アカウントID | 商品ID |
| 顧客アカウント名 ★ | 商品名 ★ |
| 上限予算金額 | 数量 |
| 合計金額 ★ | 単価 ★ |
| 価格 ★ |
★の値はC側のデータベースに存在しない。ドメインオブジェクトの振る舞いによって計算される派生値である。
case class Cart(id: CartId, items: CartItems, ...) {
// 合計金額はドメインオブジェクトの計算結果であり、DBに保存されない
def totalPrice(priceResolver: ItemId => Price): Price =
items.fold(Price.zero){ (t, item) => t + item.price(priceResolver) }
}
case class CartItem(id: CartItemId, itemId: ItemId, quantity: Quantity, ...) {
// 単価は外部から提供され、価格は計算される
def price(priceResolver: ItemId => Price): Price =
priceResolver(itemId) * quantity
}
同期方法の段階的検討と限界
方法1: トリガーによる同期
C側のテーブル更新時にSQLでQ側を書き込む。
限界:
- 静的データ(顧客名等)の転送には有効
- 計算された値(★)は同期できない - ドメインロジックの計算結果はDBに存在しない
- 同じ計算ロジックのSQLを書くのは困難であり、ビジネスロジックの重複を生む
- 苦肉の策として計算結果もC側に保存すると、リポジトリのインターフェースが歪む
// ❌ リポジトリに計算ロジックの責務が漏れる
trait CartRepository {
def store(cart: Cart, priceResolver: ItemId => Price): Unit
// priceResolverはリポジトリの責務ではない
}
方法2: ポーリングによる同期
プログラムでC側テーブルを読み込み、ドメインオブジェクトで計算後、Q側に書き込む。
限界:
- 計算結果のQ側転送は可能
- 「いつ変更されたか」を検知できない - 変更トリガーがない
- 全集約をポーリングする必要があり、スケーラビリティがない
- 大量の集約が存在する場合、実用的ではない
結論: 最新状態を手に入れるにしても、更新イベントが必要。
方法3: イベント通知キューの導入
変更時にイベントをキューに発行し、Q側更新プログラムがイベントを受信して同期する。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 223 lines · 246 tokens per session scan A 134412506da5
cqrs-to-event-sourcing is a skill published in the GitHub repository j5ik2o/okite-ai (81 stars, last pushed 4mo ago), licensed MIT. It adds 246 tokens to every session and 2,691 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.
Other skills, from other repositories
api-onboarding
Reduce time-to-first-API-call (TTFAC) by optimizing every step of the developer onboarding journey. This skill covers authentication simplification, sandbox environments, interactive documentation, and identifying and eliminating common failure points.
nw-sd-case-studies
25 real-world system design case studies condensed from Alex Xu's System Design Interview Vol 1 and 2 - requirements, architecture, deep dive insights, key takeaways.
nw-ddd-tactical
Tactical DDD — aggregate design rules, entities, value objects, domain events, repositories, domain services, and anti-pattern detection.
frontmcp-guides
Tutorials, end-to-end walkthroughs, and complete reference projects for FrontMCP. Use when you want a getting-started guide, a full worked example, or to learn best practices by following a step-by-step build rather than a single API reference. Includes a beginner weather-API server (tool plus static resource, Zod…
system-design-case-catalog
Answer classic system design problems as constraint-to-solution sketches and coach interview practice: URL shortener, rate limiter, news feed, chat, notification, autocomplete, crawler, unique id. Use for interview practice or naming the closest known shape for a new problem.
lw-lms-backend-extend
Backend extension contract for LW LMS v1.6.0. Use when extending enrollment, access, source-scoped revocation, progress, certificates, automation, analytics, settings tabs, companion-plugin logic, lwlmsaftergrant, lwlmsafterrevoke, lwlmspregrant, lwlmshascourseaccess, AccessChecker, AccessRepository, AccessQueries…