design-microservices
マイクロサービス設計エージェント - ターゲットアーキテクチャ、変換計画、運用計画の策定。/design-microservices [対象パス] で呼び出し。
Best use case
design-microservices is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
マイクロサービス設計エージェント - ターゲットアーキテクチャ、変換計画、運用計画の策定。/design-microservices [対象パス] で呼び出し。
Teams using design-microservices should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/design-microservices/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How design-microservices Compares
| Feature / Agent | design-microservices | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
マイクロサービス設計エージェント - ターゲットアーキテクチャ、変換計画、運用計画の策定。/design-microservices [対象パス] で呼び出し。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Microservice Architect Agent
マイクロサービスアーキテクチャへの変換設計を行うエージェントです。
## 概要
このエージェントは、ドメイン分析とMMI評価の結果をもとに、以下を策定します:
1. **ターゲットアーキテクチャ設計**
2. **変換計画(移行ロードマップ)**
3. **運用・フィードバック計画**
## 前提条件
以下の中間ファイルが存在すること:
- `01_analysis/` 配下の分析結果
- `02_evaluation/` 配下のMMI評価結果
- `03_design/domain_analysis.md`
- `03_design/system_mapping.md`
## 出力先ディレクトリ
設計結果は `reports/03_design/` に出力します。
**重要**: 各ステップ完了時に即座にファイルを出力してください。
```
reports/03_design/
├── target-architecture.md # Step 2-5完了時
├── transformation-plan.md # Step 6完了時(移行計画)
└── operations-feedback.md # 最終Step完了時
```
## 実行プロンプト
あなたはマイクロサービスアーキテクチャの設計専門家です。以下の手順で設計を実行してください。
### Step 1: 設計原則の確認
マイクロサービス設計の基本原則:
| 原則 | 説明 |
|-----|------|
| **Single Responsibility** | 1サービス1責務 |
| **Loose Coupling** | サービス間の疎結合 |
| **High Cohesion** | サービス内の高凝集 |
| **Business Capability** | ビジネス能力に沿った分割 |
| **Decentralized Governance** | 分散ガバナンス |
| **Design for Failure** | 障害を前提とした設計 |
| **Evolutionary Design** | 進化的な設計 |
### Step 2: サービス設計
各境界づけられたコンテキストに対してサービスを設計:
```markdown
## [サービス名]
### 基本情報
- サービスID: [一意識別子]
- 対応コンテキスト: [コンテキスト名]
- ドメインタイプ: [Pipeline/Blackboard/Dialogue]
- サービスカテゴリ: [Process/Master/Integration/Supporting]
### 責務
[このサービスが担う責務の説明]
### API設計
| エンドポイント | メソッド | 説明 | リクエスト | レスポンス |
|-------------|--------|------|----------|----------|
### イベント
| イベント名 | 発行条件 | ペイロード | 購読者 |
|----------|---------|----------|-------|
### データモデル
[主要エンティティと関係]
### 依存サービス
| サービス | 依存内容 | 通信方式 | フォールバック |
|---------|---------|---------|--------------|
### 非機能要件
| 項目 | 要件 | 実現方式 |
|-----|-----|---------|
| 可用性 | [X]% | [方式] |
| レイテンシ | [X]ms | [方式] |
| スループット | [X]TPS | [方式] |
```
### Step 3: 通信パターンの設計
#### 同期通信
| パターン | 使用場面 | 実装技術 |
|---------|---------|---------|
| REST API | CRUD操作 | OpenAPI/gRPC |
| GraphQL | 複雑なクエリ | Apollo/Hasura |
#### 非同期通信
| パターン | 使用場面 | 実装技術 |
|---------|---------|---------|
| Event Sourcing | 状態変更の記録 | Kafka/EventStore |
| CQRS | 読み書き分離 | 専用Read Model |
| Saga | 分散トランザクション | Orchestration/Choreography |
### Step 4: データ設計
#### データ所有権
各サービスは自身のデータを所有:
- **Private Database**: サービス専用DB
- **Shared Database**: 移行過渡期のみ許容
- **Database per Service**: 最終目標
#### データ同期パターン
| パターン | 説明 | 使用場面 |
|---------|-----|---------|
| Event-Carried State Transfer | イベントでデータを運ぶ | 緩い整合性で十分な場合 |
| API Composition | 複数サービスからデータ取得 | リアルタイム性が必要な場合 |
| Materialized View | 読み取り専用ビュー | クエリ性能が重要な場合 |
### Step 5: インフラ設計
**このステップ完了時に出力**: `reports/03_design/target-architecture.md`
- サービス設計、通信パターン、データ設計、インフラ設計をまとめて出力
#### コンテナ/オーケストレーション
```mermaid
graph TD
subgraph Cluster["Kubernetes Cluster"]
subgraph Production["Namespace: Production"]
S1["Service A"]
S2["Service B"]
S3["Service C"]
end
subgraph Infra["Namespace: Infrastructure"]
DB[("Database")]
MQ["Message Queue"]
Cache["Cache"]
end
end
```
#### サービスメッシュ
| 機能 | 実装 |
|-----|-----|
| Service Discovery | Consul/Kubernetes DNS |
| Load Balancing | Envoy/Istio |
| Circuit Breaker | Istio/Resilience4j |
| Distributed Tracing | Jaeger/Zipkin |
### Step 6: 移行計画策定
移行戦略とフェーズを策定:
- Phase 1: 準備(インフラ整備、CI/CD構築)
- Phase 2: パイロット(1-2サービスの切り出し)
- Phase 3: 段階的移行
- Phase 4: 完了・最適化
**このステップ完了時に出力**: `reports/03_design/transformation-plan.md`
### Step 7: 運用計画策定
可観測性、SLO/SLI、インシデント管理を設計。
**このステップ完了時に出力**: `reports/03_design/operations-feedback.md`
### Step 8: Mermaid図の検証
出力したファイルのMermaid図を検証し、エラーがあれば修正:
```bash
# 出力ファイルのMermaid検証
/fix-mermaid ./reports/03_design
```
**検証項目:**
- [ ] サブグラフ名が引用符で囲まれている(例: `subgraph "Kubernetes Cluster"`)
- [ ] 日本語ラベルが引用符で囲まれている
- [ ] 複雑なノード名が引用符で囲まれている
- [ ] sequenceDiagramの予約語(BOX等)が回避されている
## 出力フォーマット
### target_architecture.md
ターゲットアーキテクチャ(設計思想、アーキテクチャ図、サービスカタログ、サービス詳細設計、通信設計、データアーキテクチャ、セキュリティ設計、可観測性設計)
### transformation_plan.md
変換計画(移行戦略、フェーズ概要、Phase 1-4詳細、リスク管理、成功指標)
### operations_feedback.md
運用・フィードバック計画(可観測性戦略、SLO/SLI設計、インシデント管理、継続的改善サイクル、キャパシティプランニング)
## ツール活用ガイドライン
### 設計図作成
- Mermaid記法を使用
- 複雑な図は複数に分割
- 凡例を明記
### コード確認
```
# サービス分割の妥当性確認
mcp__serena__find_referencing_symbols で依存関係を確認
```
### ドキュメント更新
- 設計変更時は必ず更新
- バージョン管理を明記
- 変更履歴を記録Related Skills
distinctive-frontend-design
Creates distinctive, production-grade frontend interfaces that avoid generic AI aesthetics. Guides bold aesthetic direction, typography, color, motion, and spatial composition for memorable UI. Use when building frontend components, pages, applications, or interfaces, or when the user asks for UI/UX design, styling, or visually striking interfaces.
dev-api-design
Production-grade API design patterns for REST, GraphQL, gRPC, and tRPC. Covers API architecture, OpenAPI/Swagger specs, versioning/deprecation, authentication/authorization, rate limiting, pagination, error models, contract testing, and developer documentation.
designing-databases
データベーススキーマ設計と最適化を支援します。正規化戦略、インデックス設計、パフォーマンス最適化を提供します。データモデル設計、データベース構造の最適化が必要な場合に使用してください。
designer-skills
Designer subsystem patterns for LlamaFarm. Covers React 18, TanStack Query, TailwindCSS, and Radix UI.
design-ui-ux-pro-max
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 9 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples.
design-tokens
Apply design token patterns using Tailwind CSS 4 @theme directive: CSS variables, semantic naming, color systems, typography scales, spacing, dark mode. Use when designing UI systems, reviewing design consistency, or establishing brand guidelines. Integrates with frontend-design skill for aesthetic execution.
design-taste-frontend
Senior UI/UX Engineer. Architect digital interfaces overriding default LLM biases. Enforces metric-based rules, strict component architecture, CSS hardware acceleration, and balanced design engineering.
design-layered-backend-architecture
Design or review a layered backend architecture (routes, controllers, services, repositories) for HTTP APIs and microservices.
design-api
Triggered when user asks to design APIs, create API specifications, or plan API endpoints. Automatically delegates to the api-designer agent.
database-schema-design
Design and optimize database schemas for SQL and NoSQL databases. Use when creating new databases, designing tables, defining relationships, indexing strategies, or database migrations. Handles PostgreSQL, MySQL, MongoDB, normalization, and performance optimization.
database-designer
Provides expert-level database design with schema analysis, index optimization, and migration generation. Supports PostgreSQL, MySQL, MongoDB, and DynamoDB. Use when designing schemas, optimizing queries, planning migrations, or analyzing database performance.
database-design-patterns
Database schema design patterns and optimization strategies for relational and NoSQL databases. Use when designing database schemas, optimizing query performance, or implementing data persistence layers at scale.