ai-engineer-teams: Skill for Kiro

.kiro/skills/clean-ddd-hexagonal/SKILL.md

clean-ddd-hexagonal is a skill for Kiro from yoshimi-I/ai-engineer-teams. It costs 128 tokens per session (2,469 once invoked), scanned A, original, MIT.

A Japanese-language guide to three backend design approaches: Clean Architecture, Domain-Driven Design (DDD), and Hexagonal Architecture. They organize business rules separately from databases, web frameworks, and other outside systems.

In plain words
What is it for?
Use it when designing or changing domain models, aggregates, repositories, and use cases, or when reviewing layer separation in a long-lived backend.
Why use it?
It helps keep complex backend code easier to test and change by controlling dependencies and preventing infrastructure details from spreading into business logic.

Skill for Kiro

Written for Kiro: installed under .kiro/.

This is yoshimi-I/ai-engineer-teams's own configuration. It tells Kiro how to work on ai-engineer-teams itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-engineer-teams configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/yoshimi-I/ai-engineer-teams/main/.kiro/skills/clean-ddd-hexagonal/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/yoshimi-I/ai-engineer-teams

Made for: Kiro.

Wrote 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.

agentmods badge for clean-ddd-hexagonal

README.md
[![agentmods](https://agentmods.dev/badge/skills/yoshimi-i/ai-engineer-teams/clean-ddd-hexagonal/github.svg)](https://agentmods.dev/skills/yoshimi-i/ai-engineer-teams/clean-ddd-hexagonal)
Your own site
<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.

agentmods 80×15 button for clean-ddd-hexagonal

Your own site · 80×15
<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>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,469 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 9d ago against content hash b4ac7af8a6bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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.

.kiro/skills/clean-ddd-hexagonal/SKILL.md · 150 lines

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                        # ブートストラップ / エントリポイント

Read the full file on GitHub · 150 lines

Files

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.

Changes

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.

  1. 9d ago First seen · 150 lines · 128 tokens per session scan A b4ac7af8a6bd

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

amazon-location-service

Amazon Location Service. Reference skill (loaded via skill:// from the ios agent).

seandkendall/kiro-config · 20 tokens

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…

ag-ui-protocol/ag-ui · 223 tokens

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…

ag-ui-protocol/ag-ui · 202 tokens

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…

ag-ui-protocol/ag-ui · 162 tokens

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.

modu-ai/moai-adk · 43 tokens

multi-app-orchestration

Orchestrate workflows across multiple applications and APIs — inter-app coordination, data handoff, and multi-system task completion.

a5c-ai/babysitter · 30 tokens