jpskill.com
🛠️ 開発・MCP コミュニティ

designing-architecture

Designs software architecture and selects appropriate patterns for projects. Use when designing systems, choosing architecture patterns, structuring projects, making technical decisions, or when asked about microservices, monoliths, or architectural approaches.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o designing-architecture.zip https://jpskill.com/download/17943.zip && unzip -o designing-architecture.zip && rm designing-architecture.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17943.zip -OutFile "$d\designing-architecture.zip"; Expand-Archive "$d\designing-architecture.zip" -DestinationPath $d -Force; ri "$d\designing-architecture.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して designing-architecture.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → designing-architecture フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

アーキテクチャの設計

アーキテクチャ決定ワークフロー

このチェックリストをコピーして、進捗状況を追跡します。

アーキテクチャ設計の進捗状況:
- [ ] ステップ 1: 要件と制約を理解する
- [ ] ステップ 2: プロジェクトの規模とチームの能力を評価する
- [ ] ステップ 3: アーキテクチャパターンを選択する
- [ ] ステップ 4: ディレクトリ構造を定義する
- [ ] ステップ 5: トレードオフと決定を文書化する
- [ ] ステップ 6: 決定フレームワークに対して検証する

パターン選択ガイド

プロジェクト規模別

サイズ 推奨パターン
小規模 (<10K LOC) シンプルな MVC/Layered
中規模 (10K-100K) Clean Architecture
大規模 (>100K) Modular Monolith または Microservices

チーム規模別

チーム 推奨
1-3 人の開発者 明確なモジュールを持つ Monolith
4-10 人の開発者 Modular Monolith
10 人以上の開発者 Microservices (正当な理由がある場合)

一般的なパターン

1. Layered Architecture

┌─────────────────────────────┐
│       Presentation          │  ← UI, API Controllers
├─────────────────────────────┤
│       Application           │  ← Use Cases, Services
├─────────────────────────────┤
│         Domain              │  ← Business Logic, Entities
├─────────────────────────────┤
│      Infrastructure         │  ← Database, External APIs
└─────────────────────────────┘

使用場面: シンプルな CRUD アプリ、小規模チーム、迅速なプロトタイプ

2. Clean Architecture

┌─────────────────────────────────────┐
│            Frameworks & Drivers      │
│  ┌─────────────────────────────┐    │
│  │     Interface Adapters       │    │
│  │  ┌─────────────────────┐    │    │
│  │  │   Application       │    │    │
│  │  │  ┌─────────────┐    │    │    │
│  │  │  │   Domain    │    │    │    │
│  │  │  └─────────────┘    │    │    │
│  │  └─────────────────────┘    │    │
│  └─────────────────────────────┘    │
└─────────────────────────────────────┘

使用場面: 複雑なビジネスロジック、長期的なプロジェクト、テスト容易性が重要

3. Hexagonal (Ports & Adapters)

        ┌──────────┐
        │ HTTP API │
        └────┬─────┘
             │ Port
    ┌────────▼────────┐
    │                 │
    │   Application   │
    │     Core        │
    │                 │
    └────────┬────────┘
             │ Port
        ┌────▼─────┐
        │ Database │
        └──────────┘

使用場面: 外部依存関係を交換する必要がある、複数のエントリポイント

4. Event-Driven Architecture

Producer → Event Bus → Consumer
              │
              ├─→ Consumer
              │
              └─→ Consumer

使用場面: 疎結合が必要、非同期処理、スケーラビリティ

5. CQRS (Command Query Responsibility Segregation)

┌─────────────┐      ┌─────────────┐
│  Commands   │      │   Queries   │
│  (Write)    │      │   (Read)    │
└──────┬──────┘      └──────┬──────┘
       │                    │
       ▼                    ▼
  Write Model          Read Model
       │                    │
       └────────┬───────────┘
                ▼
           Event Store

使用場面: 異なる読み取り/書き込みのスケーリング、複雑なドメイン、イベントソーシング

ディレクトリ構造パターン

Feature-Based (中規模以上に推奨)

src/
├── features/
│   ├── users/
│   │   ├── api/
│   │   ├── components/
│   │   ├── hooks/
│   │   ├── services/
│   │   └── types/
│   └── orders/
│       ├── api/
│       ├── components/
│       └── ...
├── shared/
│   ├── components/
│   ├── hooks/
│   └── utils/
└── app/
    └── ...

Layer-Based (シンプルなアプリ)

src/
├── controllers/
├── services/
├── models/
├── repositories/
└── utils/

決定フレームワーク

アーキテクチャの決定を行う際には、以下の基準で評価します。

  1. Simplicity - シンプルに始めて、必要に応じて進化させる
  2. Team Skills - チームの能力に合ったアーキテクチャにする
  3. Requirements - ビジネスニーズに基づいて決定する
  4. Scalability - 成長の軌跡を考慮する
  5. Maintainability - 変更に対応できるように最適化する

トレードオフ分析テンプレート

このテンプレートを使用して、アーキテクチャの決定を文書化します。

## Decision: [何を決定するか]

### Context
[なぜ今この決定が必要なのか]

### Options Considered
1. Option A: [説明]
2. Option B: [説明]

### Trade-offs
| Criteria | Option A | Option B |
|----------|----------|----------|
| Complexity | Low | High |
| Scalability | Medium | High |
| Team familiarity | High | Low |

### Decision
[理由]により、[Option]を選択しました。

### Consequences
- [これにより何が可能になるか]
- [これにより何が制約されるか]

検証チェックリスト

アーキテクチャを選択した後、以下に対して検証します。

アーキテクチャの検証:
- [ ] プロジェクトの規模と複雑さに適合している
- [ ] チームのスキルと経験に合致している
- [ ] 現在の要件をサポートしている
- [ ] 予想される成長に対応できる
- [ ] 依存関係は内向きに流れる (コアには外部依存関係がない)
- [ ] モジュール/レイヤー間の境界が明確である
- [ ] テスト戦略が実現可能である
- [ ] トレードオフが文書化されている

検証に失敗した場合は、パターン選択を再検討するか、実装アプローチを調整します。

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Designing Architecture

Architecture Decision Workflow

Copy this checklist and track progress:

Architecture Design Progress:
- [ ] Step 1: Understand requirements and constraints
- [ ] Step 2: Assess project size and team capabilities
- [ ] Step 3: Select architecture pattern
- [ ] Step 4: Define directory structure
- [ ] Step 5: Document trade-offs and decision
- [ ] Step 6: Validate against decision framework

Pattern Selection Guide

By Project Size

Size Recommended Pattern
Small (<10K LOC) Simple MVC/Layered
Medium (10K-100K) Clean Architecture
Large (>100K) Modular Monolith or Microservices

By Team Size

Team Recommended
1-3 devs Monolith with clear modules
4-10 devs Modular Monolith
10+ devs Microservices (if justified)

Common Patterns

1. Layered Architecture

┌─────────────────────────────┐
│       Presentation          │  ← UI, API Controllers
├─────────────────────────────┤
│       Application           │  ← Use Cases, Services
├─────────────────────────────┤
│         Domain              │  ← Business Logic, Entities
├─────────────────────────────┤
│      Infrastructure         │  ← Database, External APIs
└─────────────────────────────┘

Use when: Simple CRUD apps, small teams, quick prototypes

2. Clean Architecture

┌─────────────────────────────────────┐
│            Frameworks & Drivers      │
│  ┌─────────────────────────────┐    │
│  │     Interface Adapters       │    │
│  │  ┌─────────────────────┐    │    │
│  │  │   Application       │    │    │
│  │  │  ┌─────────────┐    │    │    │
│  │  │  │   Domain    │    │    │    │
│  │  │  └─────────────┘    │    │    │
│  │  └─────────────────────┘    │    │
│  └─────────────────────────────┘    │
└─────────────────────────────────────┘

Use when: Complex business logic, long-lived projects, testability is key

3. Hexagonal (Ports & Adapters)

        ┌──────────┐
        │ HTTP API │
        └────┬─────┘
             │ Port
    ┌────────▼────────┐
    │                 │
    │   Application   │
    │     Core        │
    │                 │
    └────────┬────────┘
             │ Port
        ┌────▼─────┐
        │ Database │
        └──────────┘

Use when: Need to swap external dependencies, multiple entry points

4. Event-Driven Architecture

Producer → Event Bus → Consumer
              │
              ├─→ Consumer
              │
              └─→ Consumer

Use when: Loose coupling needed, async processing, scalability

5. CQRS (Command Query Responsibility Segregation)

┌─────────────┐      ┌─────────────┐
│  Commands   │      │   Queries   │
│  (Write)    │      │   (Read)    │
└──────┬──────┘      └──────┬──────┘
       │                    │
       ▼                    ▼
  Write Model          Read Model
       │                    │
       └────────┬───────────┘
                ▼
           Event Store

Use when: Different read/write scaling, complex domains, event sourcing

Directory Structure Patterns

Feature-Based (Recommended for medium+)

src/
├── features/
│   ├── users/
│   │   ├── api/
│   │   ├── components/
│   │   ├── hooks/
│   │   ├── services/
│   │   └── types/
│   └── orders/
│       ├── api/
│       ├── components/
│       └── ...
├── shared/
│   ├── components/
│   ├── hooks/
│   └── utils/
└── app/
    └── ...

Layer-Based (Simple apps)

src/
├── controllers/
├── services/
├── models/
├── repositories/
└── utils/

Decision Framework

When making architectural decisions, evaluate against these criteria:

  1. Simplicity - Start simple, evolve when needed
  2. Team Skills - Match architecture to team capabilities
  3. Requirements - Let business needs drive decisions
  4. Scalability - Consider growth trajectory
  5. Maintainability - Optimize for change

Trade-off Analysis Template

Use this template to document architectural decisions:

## Decision: [What we're deciding]

### Context
[Why this decision is needed now]

### Options Considered
1. Option A: [Description]
2. Option B: [Description]

### Trade-offs
| Criteria | Option A | Option B |
|----------|----------|----------|
| Complexity | Low | High |
| Scalability | Medium | High |
| Team familiarity | High | Low |

### Decision
We chose [Option] because [reasoning].

### Consequences
- [What this enables]
- [What this constrains]

Validation Checklist

After selecting an architecture, validate against:

Architecture Validation:
- [ ] Matches project size and complexity
- [ ] Aligns with team skills and experience
- [ ] Supports current requirements
- [ ] Allows for anticipated growth
- [ ] Dependencies flow inward (core has no external deps)
- [ ] Clear boundaries between modules/layers
- [ ] Testing strategy is feasible
- [ ] Trade-offs are documented

If validation fails, reconsider the pattern selection or adjust the implementation approach.