Borrowing it
Nothing to install: this file belongs to yoshimi-I/ai-engineer-teams. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/yoshimi-I/ai-engineer-teams/main/.kiro/skills/clean-ddd-hexagonal/SKILL.mdgit clone --depth 1 https://github.com/yoshimi-I/ai-engineer-teamsWrote 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/yoshimi-i/ai-engineer-teams/clean-ddd-hexagonal)<a href="https://agentmods.dev/skills/yoshimi-i/ai-engineer-teams/clean-ddd-hexagonal"><img src="https://agentmods.dev/badge/skills/yoshimi-i/ai-engineer-teams/clean-ddd-hexagonal/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/yoshimi-i/ai-engineer-teams/clean-ddd-hexagonal"><img src="https://agentmods.dev/badge/skills/yoshimi-i/ai-engineer-teams/clean-ddd-hexagonal.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.00128 | $0.02469 |
| Opus 5 | $0.00064 | $0.01234 |
| Sonnet 5 | $0.00026 | $0.00494 |
| Haiku 4.5 | $0.00013 | $0.00247 |
Grade A, and why
clean-ddd-hexagonal 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Architecture + DDD + Hexagonal
DDD戦術パターン、Clean Architectureの依存ルール、Hexagonalのポート/アダプターを組み合わせた、保守性・テスト容易性の高いバックエンドアーキテクチャ。
使うべき時(使わないべき時)
| 使うべき時 | スキップすべき時 |
|---|---|
| 多くのルールを持つ複雑なビジネスドメイン | シンプルなCRUD、ビジネスルールが少ない |
| 長期運用システム(年単位の保守) | プロトタイプ、MVP、使い捨てコード |
| 5人以上の開発チーム | ソロ開発者や小チーム(1-2人) |
| 複数のエントリポイント(API, CLI, イベント) | 単一エントリポイント、シンプルなAPI |
| インフラ交換の必要性(DB、ブローカー) | 固定インフラ、変更の可能性が低い |
| 高テストカバレッジが必要 | クイックスクリプト、内部ツール |
シンプルに始める。必要な時にのみ複雑さを進化させる。 ほとんどのシステムは完全なCQRSやEvent Sourcingを必要としない。
重要: 依存ルール
依存は内側にのみ向く。外側のレイヤーは内側に依存し、逆は絶対にない。
Infrastructure → Application → Domain
(アダプター) (ユースケース) (コア)
検出すべき違反:
- ドメインがDB/HTTPライブラリをインポート
- コントローラーがリポジトリを直接呼び出し(ユースケースをバイパス)
- エンティティがアプリケーションサービスに依存
設計の検証: 「UIもデータベースもなしでアプリケーションが動作するように作れ」— Alistair Cockburn。テストからインフラなしでドメインロジックを実行できれば、境界は正しい。
クイック判断ツリー
「このコードはどこに置く?」
どこに置く?
├─ 純粋なビジネスロジック、I/Oなし → domain/
├─ ドメインを調整 + 副作用あり → application/
├─ 外部システムと通信 → infrastructure/
├─ インタラクション方法を定義(インターフェース) → port(domain or application)
└─ ポートを実装 → adapter(infrastructure)
「エンティティか値オブジェクトか?」
エンティティ or 値オブジェクト?
├─ 永続する一意のIDを持つ → エンティティ
├─ 属性のみで定義される → 値オブジェクト
├─ 「これは同じモノか?」 → エンティティ(ID比較)
└─ 「これは同じ値か?」 → 値オブジェクト(構造的等価性)
「独立したアグリゲートにすべきか?」
アグリゲート境界?
├─ トランザクション内で一貫性が必要 → 同じアグリゲート
├─ 結果整合性で良い → 別アグリゲート
├─ IDのみで参照 → 別アグリゲート
└─ アグリゲート内に10以上のエンティティ → 分割する
ルール: トランザクションごとに1アグリゲート。アグリゲート間の整合性はドメインイベント(結果整合性)で。
ディレクトリ構成
src/
├── domain/ # コアビジネスロジック(外部依存なし)
│ ├── {aggregate}/
│ │ ├── entity # アグリゲートルート + 子エンティティ
│ │ ├── value_objects # 不変の値型
│ │ ├── events # ドメインイベント
│ │ ├── repository # リポジトリインターフェース(DRIVEN PORT)
│ │ └── services # ドメインサービス(ステートレスロジック)
│ └── shared/
│ └── errors # ドメインエラー
├── application/ # ユースケース / アプリケーションサービス
│ ├── {use-case}/
│ │ ├── command # コマンド/クエリDTO
│ │ ├── handler # ユースケース実装
│ │ └── port # ドライバーポートインターフェース
│ └── shared/
│ └── unit_of_work # トランザクション抽象化
├── infrastructure/ # アダプター(外部関心事)
│ ├── persistence/ # データベースアダプター
│ ├── messaging/ # メッセージブローカーアダプター
│ ├── http/ # REST/GraphQLアダプター(DRIVER)
│ └── config/
│ └── di # 依存性注入 / コンポジションルート
└── main # ブートストラップ / エントリポイント
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago First seen · 150 lines · 128 tokens per session scan A b4ac7af8a6bd
clean-ddd-hexagonal is a skill published in the GitHub repository yoshimi-I/ai-engineer-teams (2 stars, last pushed 2mo ago), licensed MIT. It adds 128 tokens to every session and 2,469 once invoked, about $0.0006 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-08-31.
Other skills, from other repositories
amazon-location-service
Amazon Location Service. Reference skill (loaded via skill:// from the ios agent).
agui-dotnet-streaming-chat
Get started with the AG-UI .NET SDK: bootstrap and run your first streaming-chat app (client + server) with the AG-UI .NET NuGet packages (AGUI.Client, AGUI.Server, AGUI.Formatting, AGUI.Abstractions). USE FOR: which packages to install and how to wire them; constructing an AGUIChatClient against an endpoint and…
agui-dotnet-server-tools
Expose server-side (backend) tools an AG-UI agent can call with the AG-UI .NET SDK — C# functions that run on the server, where the server executes the call and feeds the result back to the model. USE FOR: defining an AIFunction with AIFunctionFactory.Create and registering it on the server's IChatClient via…
agui-dotnet-protobuf
Use the protobuf wire transport (instead of the default Server-Sent Events) for an AG-UI connection with the AG-UI .NET SDK — a compact binary event stream negotiated via the Accept header. USE FOR: making an AGUIChatClient prefer protobuf by wiring an AGUIEventStreamHandler with ProtobufEventStreamFormatter (then…
moai-platform-auth
Authentication and authorization specialist covering Auth0, Clerk, and Firebase Auth. Use when implementing authentication, MFA, SSO, passkeys, WebAuthn, social login, or security features.
multi-app-orchestration
Orchestrate workflows across multiple applications and APIs — inter-app coordination, data handoff, and multi-system task completion.