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

create-adr

重要なアーキテクチャ上の決定事項を、背景や代替案の評価と共に標準的なテンプレートを用いて記録し、データベース設計や技術選定などの意思決定プロセスを明確化するADR(Architecture Decision Record)を作成するSkill。

📜 元の英語説明(参考)

Create Architecture Decision Records (ADRs) documenting key architectural choices. Analyzes context, evaluates alternatives, and captures decisions using standard ADR template. Use when documenting database design, technology selection, pattern choices, or architectural trade-offs.

🇯🇵 日本人クリエイター向け解説

一言でいうと

重要なアーキテクチャ上の決定事項を、背景や代替案の評価と共に標準的なテンプレートを用いて記録し、データベース設計や技術選定などの意思決定プロセスを明確化するADR(Architecture Decision Record)を作成するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

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

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

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

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

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して create-adr.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → create-adr フォルダができる
  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 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] create-adr

アーキテクチャ決定記録 (ADR) の作成

概要

業界のベストプラクティスに従い、包括的なアーキテクチャ決定記録を作成します。ADR は、将来の開発のためにコンテキストを提供するために、アーキテクチャ上の選択、検討された代替案、根拠、および結果を文書化します。

ADR の構造:

  • コンテキスト: 問題と制約
  • 決定: 何が決定されたか
  • 代替案: 長所と短所を評価したオプション
  • 根拠: なぜこの決定がなされたのか
  • 結果: プラス、マイナス、および中立的な影響

前提条件

  • docs/adrs/ ディレクトリ (存在しない場合は作成)
  • 決定のコンテキスト (分析するファイル、問題の説明、または既存のアーキテクチャ)

ワークフロー

ステップ 0: ADR 番号の決定

アクション: 次に使用可能な ADR 番号を見つけます。

# 既存の ADR をリストする
ls -la docs/adrs/ 2>/dev/null || echo "ADR directory does not exist"

# 最大番号を見つける
find docs/adrs/ -name "adr-*.md" 2>/dev/null | \
  sed 's/.*adr-\([0-9]*\)-.*/\1/' | \
  sort -n | \
  tail -1

次の番号を計算する:

  • ADR が存在しない場合: 001 から開始
  • ADR が存在する場合: 最大値を 1 ずつインクリメント

ADR ディレクトリが存在しない場合は作成する:

mkdir -p docs/adrs

ステップ 1: コンテキストの分析

アクション: どのような決定を文書化する必要があるかを理解します。

コンテキストの種類:

1. ファイル/スキーマ分析 (Prisma スキーマなど):

# 分析するファイルを読み込む
Read(file_path: {context_path})

分析して以下を特定します。

  • 技術的な選択: データベース、ORM、使用されるパターン
  • データモデリングの決定: スキーマ構造、関係
  • アーキテクチャパターン: マルチテナント、イベントソーシングなど
  • 設計上のトレードオフ: 正規化 vs. 非正規化、インデックス戦略

2. 技術選定:

  • 比較対象の技術をリストする
  • 選択を左右する要件を特定する
  • 制約 (チームのスキル、予算、タイムライン) をメモする

3. パターンの採用:

  • 採用するパターンを説明する
  • それが解決する問題を説明する
  • 実装アプローチをメモする

ステップ 2: 主要な決定事項の特定

アクション: コンテキストからアーキテクチャ上の決定事項を抽出します。

スキーマ/ファイル分析の場合: 決定の指標をスキャンします。

  • データベース技術 (PostgreSQL, MySQL, MongoDB)
  • ORM の選択 (Prisma, TypeORM, Sequelize)
  • スキーマパターン (マルチテナント、ソフトデリート、監査ログ)
  • 関係モデリング (1 対多、多対多)
  • インデックス戦略
  • 型安全のための Enum の使用
  • 柔軟性のための JSON/JSONB

Prisma スキーマの例:

// 決定の指標:
- PostgreSQL が選択された (ADR: Database Selection)
- Prisma ORM (ADR: ORM Selection)
- hotelId によるマルチテナント (ADR: Multi-Tenancy Strategy)
- Clerk for auth (ADR: Authentication Provider)
- イベントソーシングパターン (ADR: Event Processing Architecture)

決定事項の優先順位付け:

  1. 影響大: データベース、フレームワーク、主要なパターン
  2. 影響中: ライブラリ、アーキテクチャパターン
  3. 影響小: ユーティリティの選択、マイナーなパターン

ADR ごとに 1〜3 個の最も重要な決定事項に焦点を当てます。


ステップ 3: 代替案の調査

アクション: 選択できた可能性のある代替案を特定します。

技術的な決定の場合:

Database: PostgreSQL
Alternatives:
- MySQL (widely used, simpler)
- MongoDB (NoSQL, flexible schema)
- SQLite (embedded, simple)

各代替案について、以下を特定します。

  • 長所: 利点と強み
  • 短所: 欠点と制限
  • ユースケース: より良い選択である場合

調査ソース:

  • 公式ドキュメント
  • 比較記事
  • チームの経験
  • 業界のベストプラクティス

最小代替案: 少なくとも 2 つ (通常は 3〜4 つ)


ステップ 4: 根拠の決定

アクション: 選択されたオプションが選択された理由を説明します。

根拠の要素:

  • 要件への適合: オプションが要件をどの程度満たしているか
  • チームの専門知識: 既存のスキルと経験
  • タイムライン: 納期への影響
  • コスト: ライセンス、ホスティング、メンテナンス
  • スケーラビリティ: 予想される成長に対応
  • コミュニティ: サポートの可用性
  • リスク: 成熟度と安定性

根拠の例:

PostgreSQL が MongoDB より選択された理由:
1. データは高度に関係している (users → hotels → conversations)
2. 請求には ACID トランザクションが必要
3. チームは強力な SQL の経験を持っている (MongoDB の経験はない)
4. スケールは PostgreSQL の機能に適合する (100K ユーザーで実績あり)
5. フルテキスト検索が組み込まれている (Elasticsearch を排除)

根拠を具体的かつ測定可能にします。


ステップ 5: 結果の特定

アクション: 決定の影響を文書化します。

結果の種類:

プラスの結果:

  • 得られた利点
  • 解決された問題
  • 有効になった機能

マイナスの結果:

  • 導入された制限
  • 受け入れられたトレードオフ
  • 将来の制約

軽減戦略: マイナスの結果ごとに、軽減策を文書化します。

Negative: PostgreSQL の垂直方向のスケーリング制限
Mitigation: 読み取りレプリカ戦略を計画し、クエリのパフォーマンスを監視する

中立的な結果:

  • 影響が混在/不明確な変更
  • 将来の考慮事項
  • 監視の必要性

トレードオフについて正直になる - すべての決定には長所と短所があります。


ステップ 6: ADR の作成

アクション: 標準テンプレートを使用して ADR ドキュメントを作成します。

ADR テンプレート:


# ADR-{NUMBER}: {決定のタイトル}

**日付:** {YYYY-MM-DD}
**ステータス:** 承認済み
**決定者:** {チーム/役割}

## コンテキスト

{私たちはどのような問題を解決しようとしているのか?どのような制約が存在するのか?}

{スキーマ分析の場合: スキーマ構造と要件を説明する}

## 決定

**{選択されたオプション}** を {目的} に使用します。

## 検討された代替案

### オプション 1: {選択されたオプション}
**長所:**
- {利点 1}
- {利点 2}

**短所:**
- {欠点 1}
- {欠点 2}

### オプション 2: {代替案}
**長所:**
- {利点 1}

**短所:**
- {欠点 1}

### オプション 3: {代替案}
**長所:**
- {利点 1}

**短所:**
- {欠点 1}

## 根拠

{代替案よりも選択されたオプションが選択された理由を説明する}

{具体的に: "PostgreSQL が選択されたのは、データが関係しており、チームが SQL の専門知識を持っているためです"}

## 結果

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

Create Architecture Decision Record (ADR)

Overview

Create comprehensive Architecture Decision Records following industry best practices. ADRs document architectural choices, alternatives considered, rationale, and consequences to provide context for future development.

ADR Structure:

  • Context: Problem and constraints
  • Decision: What was decided
  • Alternatives: Options evaluated with pros/cons
  • Rationale: Why this decision was made
  • Consequences: Positive, negative, and neutral impacts

Prerequisites

  • docs/adrs/ directory (created if missing)
  • Context for decision (file to analyze, problem description, or existing architecture)

Workflow

Step 0: Determine ADR Number

Action: Find next available ADR number.

# List existing ADRs
ls -la docs/adrs/ 2>/dev/null || echo "ADR directory does not exist"

# Find highest number
find docs/adrs/ -name "adr-*.md" 2>/dev/null | \
  sed 's/.*adr-\([0-9]*\)-.*/\1/' | \
  sort -n | \
  tail -1

Calculate next number:

  • If no ADRs exist: Start at 001
  • If ADRs exist: Increment highest by 1

Create ADR directory if missing:

mkdir -p docs/adrs

Step 1: Analyze Context

Action: Understand what decision needs to be documented.

Context Types:

1. File/Schema Analysis (like Prisma schema):

# Read the file to analyze
Read(file_path: {context_path})

Analyze to identify:

  • Technology choices: Database, ORM, patterns used
  • Data modeling decisions: Schema structure, relationships
  • Architectural patterns: Multi-tenancy, event sourcing, etc.
  • Design tradeoffs: Normalization vs. denormalization, indexing strategies

2. Technology Selection:

  • List technologies being compared
  • Identify requirements driving selection
  • Note constraints (team skills, budget, timeline)

3. Pattern Adoption:

  • Describe pattern being adopted
  • Explain problem it solves
  • Note implementation approach

Step 2: Identify Key Decisions

Action: Extract architectural decisions from context.

For Schema/File Analysis: Scan for decision indicators:

  • Database technology (PostgreSQL, MySQL, MongoDB)
  • ORM choice (Prisma, TypeORM, Sequelize)
  • Schema patterns (multi-tenancy, soft deletes, audit logs)
  • Relationship modeling (one-to-many, many-to-many)
  • Indexing strategy
  • Enum usage for type safety
  • JSON/JSONB for flexibility

Example from Prisma Schema:

// Decision indicators:
- PostgreSQL chosen (ADR: Database Selection)
- Prisma ORM (ADR: ORM Selection)
- Multi-tenancy via hotelId (ADR: Multi-Tenancy Strategy)
- Clerk for auth (ADR: Authentication Provider)
- Event sourcing pattern (ADR: Event Processing Architecture)

Prioritize decisions:

  1. High Impact: Database, framework, major patterns
  2. Medium Impact: Libraries, architectural patterns
  3. Low Impact: Utility choices, minor patterns

Focus on 1-3 most significant decisions per ADR.


Step 3: Research Alternatives

Action: Identify alternatives that could have been chosen.

For Technology Decisions:

Database: PostgreSQL
Alternatives:
- MySQL (widely used, simpler)
- MongoDB (NoSQL, flexible schema)
- SQLite (embedded, simple)

For each alternative, identify:

  • Pros: Advantages and strengths
  • Cons: Disadvantages and limitations
  • Use cases: When it's the better choice

Research sources:

  • Official documentation
  • Comparison articles
  • Team experience
  • Industry best practices

Minimum alternatives: At least 2 (typically 3-4)


Step 4: Determine Rationale

Action: Explain why the chosen option was selected.

Rationale factors:

  • Requirements fit: How well option meets requirements
  • Team expertise: Existing skills and experience
  • Timeline: Impact on delivery speed
  • Cost: Licensing, hosting, maintenance
  • Scalability: Handles expected growth
  • Community: Support availability
  • Risk: Maturity and stability

Example rationale:

PostgreSQL chosen over MongoDB because:
1. Data is highly relational (users → hotels → conversations)
2. ACID transactions required for billing
3. Team has strong SQL experience (no MongoDB experience)
4. Scale fits PostgreSQL capabilities (100K users proven)
5. Full-text search built-in (eliminates Elasticsearch)

Make rationale specific and measurable.


Step 5: Identify Consequences

Action: Document impacts of the decision.

Consequence Types:

Positive Consequences:

  • Benefits gained
  • Problems solved
  • Capabilities enabled

Negative Consequences:

  • Limitations introduced
  • Tradeoffs accepted
  • Future constraints

Mitigation Strategies: For each negative consequence, document mitigation:

Negative: PostgreSQL vertical scaling limits
Mitigation: Plan read replica strategy, monitor query performance

Neutral Consequences:

  • Changes with mixed/unclear impact
  • Future considerations
  • Monitoring needs

Be honest about tradeoffs - every decision has pros and cons.


Step 6: Write ADR

Action: Create ADR document using standard template.

ADR Template:

# ADR-{NUMBER}: {Decision Title}

**Date:** {YYYY-MM-DD}
**Status:** Accepted
**Deciders:** {Team/Role}

## Context

{What problem are we solving? What constraints exist?}

{For schema analysis: Describe the schema structure and requirements}

## Decision

We will use **{CHOSEN OPTION}** for {PURPOSE}.

## Alternatives Considered

### Option 1: {Chosen Option}
**Pros:**
- {Advantage 1}
- {Advantage 2}

**Cons:**
- {Disadvantage 1}
- {Disadvantage 2}

### Option 2: {Alternative}
**Pros:**
- {Advantage 1}

**Cons:**
- {Disadvantage 1}

### Option 3: {Alternative}
**Pros:**
- {Advantage 1}

**Cons:**
- {Disadvantage 1}

## Rationale

{Explain why chosen option was selected over alternatives}

{Be specific: "PostgreSQL chosen because data is relational and team has SQL expertise"}

## Consequences

**Positive:**
- {Benefit 1}
- {Benefit 2}

**Negative:**
- {Limitation 1}
  - *Mitigation:* {How we'll address this}

**Neutral:**
- {Consideration 1}

## Related Decisions

- ADR-XXX: {Related decision}

## Notes

{Additional context, benchmarks, links, team discussions}

File naming:

docs/adrs/adr-{NUMBER}-{kebab-case-title}.md

Examples:
- docs/adrs/adr-001-database-selection.md
- docs/adrs/adr-002-orm-choice.md
- docs/adrs/adr-003-multi-tenancy-strategy.md

Step 7: Verify ADR Quality

Action: Check ADR completeness and quality.

Quality Checklist:

Context section:

  • [ ] Problem clearly stated
  • [ ] Constraints identified
  • [ ] Requirements listed

Alternatives (minimum 2):

  • [ ] Each has pros and cons
  • [ ] Comparison is balanced
  • [ ] Technical depth appropriate

Rationale:

  • [ ] Explains "why" not just "what"
  • [ ] Specific and measurable
  • [ ] References requirements

Consequences:

  • [ ] Positive impacts listed
  • [ ] Negative impacts with mitigations
  • [ ] Honest about tradeoffs

Writing quality:

  • [ ] Clear and concise
  • [ ] No jargon without explanation
  • [ ] Readable by future team members

If quality checks fail:

  • Revise weak sections
  • Add missing details
  • Clarify ambiguous statements

Output

Return structured output:

{
  "adr_created": true,
  "adr_path": "docs/adrs/adr-001-database-selection.md",
  "decision_number": 1,
  "decision_title": "Database Selection",
  "alternatives_count": 3,
  "telemetry": {
    "skill": "create-adr",
    "decision_number": 1,
    "context_type": "schema_analysis",
    "alternatives_count": 3,
    "duration_ms": 12000
  }
}

Error Handling

Error 1: No Context Provided

Error: "Context required for ADR creation" Action: Ask user for decision context or file to analyze

Error 2: Cannot Determine Decision

Error: "Cannot identify architectural decision from context" Action: Ask user to clarify what decision needs documenting

Error 3: Insufficient Alternatives

Error: "At least 2 alternatives required" Action: Research additional options or ask user for alternatives


Examples

Example 1: Database Schema Analysis

Input: context: "packages/backend/src/schema.prisma"

Output ADR:

# ADR-001: PostgreSQL Database with Prisma ORM

**Date:** 2025-11-05
**Status:** Accepted
**Deciders:** Backend Team

## Context

Need database for multi-tenant SaaS application managing hotels, conversations, and analytics. Requirements:
- Relational data (hotels → users → conversations → messages)
- ACID transactions (billing, user management)
- Full-text search
- Multi-tenancy via hotelId
- TypeScript integration

## Decision

Use **PostgreSQL** with **Prisma ORM** for database layer.

[... rest of ADR with alternatives, rationale, consequences ...]

Example 2: Technology Selection

Input: context: "Choose state management for React app"

Output ADR:

# ADR-002: State Management Strategy

**Date:** 2025-11-05
**Status:** Accepted

## Context

React application needs client state management for:
- User authentication state
- Global UI state (theme, modals)
- Form state (multi-step wizards)

[... alternatives: Zustand, Redux, Context ...]

Using This Skill

From Winston subagent:

/winston *create-adr "packages/backend/src/schema.prisma"
/winston *create-adr "Choose between REST and GraphQL"

Directly:

Use create-adr skill with context: "Analyze authentication strategy in src/auth/"

Philosophy

ADRs are living documentation that:

  • Preserve context for future developers
  • Document tradeoffs honestly
  • Explain "why" not just "what"
  • Guide future decisions through patterns

Good ADRs prevent "why did we do this?" questions 6 months later.


References

  • Michael Nygard's ADR template (original)
  • ThoughtWorks Technology Radar ADR guidance
  • MADR (Markdown ADR) format specification
  • references/adr-examples.md for complete examples