Coupling Design Advisor

VerifiedSafe

Interactive advisor that evaluates design candidates on 3 dimensions (strength, distance, variability) and recommends the most balanced option with ADR output.

Sby Skills Guide Bot
DevelopmentAdvanced
7/25/2026
Claude Code
#architecture#coupling#microservices#adr#design-review

Recommended for

Automated summary

An interactive design-time advisor that scores up to three architecture options across three dimensions (integration strength, distance, volatility), computes their balance score, and recommends the most balanced one with an ADR-format write-up.

Strengths

  • Provides a standard question set to elicit the three scores (strength, distance, volatility) from the user
  • Computes the balance score explicitly from the coupling model equation, breaking ties in favour of higher volatility
  • Emits targeted warnings for classic anti-patterns (high strength × high distance × high volatility, over-decoupling, duplicated logic)
  • Produces a ready-to-edit ADR draft including a comparison table and the rationale for the chosen option

Limitations

  • Depends on the coupling-model skill as the single source of definitions, scales and the equation, which must be loaded first
  • Only triggers on specific domain phrases (結合バランス, 均衡度, 3 次元モデル), so it is hard to discover in everyday wording
  • Scores are heuristic estimates and remain subjective, relying on user confirmation to correct them
  • Scope is design-time only: measuring coupling in existing code is delegated to a not-yet-implemented companion skill
When to use it

When deciding how to split microservices, modules or subdomains, or when choosing between direct calls and event-driven integration.

When not to use it

When auditing the coupling of an existing codebase or performing a pure implementation task, and without first loading the coupling-model skill.

Security analysis

Safe
Quality score90/100

The skill contains only design-advisory instructions and templates; it does not include destructive shell commands, credential/secret handling, network exfiltration, obfuscation, or safety-disablement. Agent/Task use is limited to an optional independent review subagent, which is a legitimate quality-control step.

No concerns found

How this analysis is made

Examples

Compare direct call vs event-driven
注文サービスから決済サービスを切り出したいと考えています。A案(直接呼び出し)とB案(イベント駆動)について、結合バランスの3次元モデルで統合強度・距離・変動性を評価し、均衡度を比較して推奨案をADR形式でまとめてください。
Draw new microservice boundaries
新しいマイクロサービスの境界を引きたいです。候補のサブドメイン境界が2つあるので、均衡結合の観点でモジュール分割の設計レビューをして、最終的にADRドラフトまで作ってほしい。
Tie-break on balance score
2案の均衡度が同じ値になったのですが、どちらを選ぶべきですか?変動性の違いも含めて結合バランスで説明してください。

name: coupling-design-advisor description: | 設計時(事前)の対話型アドバイザ。候補案を3次元(統合強度・距離・変動性)で評価し 均衡度を比較、推奨案と ADR 形式の出力を返す。

発火条件(以下のドメイン語のいずれかを含むときにのみ発火する):

  • 「結合バランス」「均衡結合」「均衡度」「3 次元モデル」 (本スキル固有の用語 — 必須条件)
  • 上記語のいずれかを伴う以下の文脈:
    • 「新しいマイクロサービスの境界を引きたい」
    • 「モジュール分割/統合」「サブドメイン境界」の設計判断
    • 「イベント駆動 vs 直接呼び出し」の結合バランス評価
    • 「結合バランスで設計レビューしたい」という明示的依頼

発火しない:

  • 「A案 vs B案 どちらが良い」のみの一般的な技術選定・UI/DB 設計(ドメイン語を伴わない)
  • 既存コードの計測 → coupling-audit(未実装)
  • 純粋な実装タスク allowed-tools: Read, Glob, Grep, Agent, Task model: opus effort: high license: MIT metadata: origin: "https://github.com/ebal5/agent-skills"

coupling-design-advisor

目的

設計の意思決定段階で、候補案の結合バランスを定量的に比較し、最も均衡の取れた選択肢を推奨する。 単なる「疎結合にしよう」という定性論を超え、統合強度・距離・変動性の3次元スコアと均衡結合方程式に基づく根拠を持った設計議論を支援する。 対話を通じて情報を引き出し、最終的に ADR(Architecture Decision Record)形式で意思決定を記録できる形にまとめる。

発火条件(詳細)

以下のいずれかに該当する場合に本スキルを起動する:

  • 新しいマイクロサービス・モジュール・コンポーネントの境界設計
  • 2つ以上の候補設計案の比較評価(イベント駆動 vs 直接呼び出し など)
  • サブドメイン境界の見直し・再定義
  • モジュール分割または統合の判断
  • 「結合バランスで設計レビューしたい」という明示的な依頼

本スキルを使わないケース:

  • 既存コードベースの結合度計測 → coupling-audit を使う
  • 純粋な実装タスク(コードを書くだけ)

前提

本スキルを起動する前に、skills/coupling-model/SKILL.md を読み込むこと。 用語定義・1-10 スケール・均衡結合方程式・解釈帯の 正式な定義はすべて coupling-model が単一ソース である。 ここではそれらを再掲しない。 ケーススタディは本スキル配下の references/case-studies.md に自前で保持している (設計時フレーミング)。将来の coupling-rebalance は改善時フレーミングで 自前の case-studies を持つ想定。

ワークフロー

ステップ 1: コンテキスト確認

目的: 議論の前提を揃える。

以下をユーザーに確認する:

  1. 設計対象のモジュール名・サービス名
  2. ビジネス上の位置づけ(コアサブドメイン / 支援サブドメイン / 汎用サブドメイン)
  3. 既存の設計制約(チーム境界、言語・技術スタック、デプロイ単位)

出口条件: 対象モジュールと大まかなサブドメイン種別が確定した時点で次へ。

ステップ 2: 候補案の整理

目的: 比較対象を明確にする。

ユーザーから 1〜3 案を引き出す。案が 1 つしかない場合でも、対案(例: 現状維持、より疎結合な選択肢)を提示して比較対象を用意する。

出口条件: 候補案が 1 件以上、それぞれの概要が明確になった時点で次へ。

ステップ 3: 各案の 3 次元評価

目的: 定量スコアを算出する。

各候補案について問いかけテンプレート(後述)を使い、3 つのスコアを推定する。推定には強度推定ヒューリスティック(後述)を参照し、不確かな場合はユーザーに確認する。

各案の (強度, 距離, 変動性) が確定したら、coupling-model の方程式 均衡度 = max(|s - d|, 10 - v) + 1 で計算する。 精度が要る場合は coupling-model の公開 CLI を呼び出してもよい。 具体的な呼び出し方は coupling-model の references/api.md に記載。

出口条件: 全候補案の (強度, 距離, 変動性, 均衡度) が出揃った時点で次へ。

ステップ 4: 比較と推奨

目的: 最適案を論理的な根拠とともに提示する。

候補比較フォーマット(後述)で表を作成し、均衡度が最も高い案を推奨する。ただし均衡度が同等の場合は変動性の高い案(将来変化に強い設計)を優先する。アンチパターン(後述)に該当する組み合わせには警告を付記する。

出口条件: 推奨案とその根拠がユーザーに伝わった時点で次へ。

ステップ 5: ADR 化支援

目的: 意思決定を記録に残す。

ADR 出力フォーマット(後述)に沿ってドラフトを生成する。ユーザーが調整したい項目があれば対話的に修正する。

出口条件: ユーザーが ADR ドラフトに合意した時点で完了。

問いかけテンプレート

3 次元を引き出す際の標準的な質問セット。

| 次元 | 問い | 評価軸 | | --- | --- | --- | | 統合強度 | 下流は上流の何を知る必要がありますか?(API契約だけ / データモデル / 内部ロジック / 実装詳細) | 知識の範囲が狭いほど強度が低い | | 距離 | 同じプロセス内ですか、別サービスですか、別ベンダーですか? | 物理・組織的距離が遠いほど高スコア | | 変動性 | このモジュールの要件は四半期でどのくらい変わりそうですか?コアサブドメインに属しますか? | 変化が激しいほど、コアに近いほど高スコア |

強度推定ヒューリスティック

advisor が対話で 3 次元スコアを引き出す際の初期推定表。ユーザー確認で補正する。

| 依存の形 | 推定強度 | | --- | --- | | DBスキーマ共有、内部フィールドへの直接アクセス | 10(侵入結合) | | 共有ライブラリ内の詳細型を参照 | 8(機能結合) | | DTO/エンティティの具象型を公開API経由で共有 | 5(モデル結合寄り) | | インターフェース/契約のみ依存 | 1〜3(コントラクト結合) |

候補比較フォーマット

| 案 | 統合強度 | 距離 | 変動性 | 均衡度 | 判定 | 備考 | | --- | --- | --- | --- | --- | --- | --- | | A案 | - | - | - | - | - | | | B案 | - | - | - | - | - | | | C案 | - | - | - | - | - | |

均衡度が高い案を推奨。同点の場合は変動性が高い案(将来の変化への耐性)を優先する。

ADR 出力フォーマット

# ADR-XXXX: [設計決定のタイトル]

**日付**: YYYY-MM-DD
**ステータス**: 提案中 / 承認済み / 廃止済み

## Context

[なぜこの決定が必要になったか。背景・制約・問題の説明]

## Decision

[選択した案と、その根拠]

## Consequences

**良い影響**:
- [期待される恩恵]

**悪い影響・トレードオフ**:
- [受け入れるコストやリスク]

## Coupling balance

| 案 | 統合強度 | 距離 | 変動性 | 均衡度 | 判定 |
|----|---------|------|--------|--------|------|
| 採用案 | - | - | - | - | - |
| 却下案 | - | - | - | - | - |

採用根拠: [均衡度と hints に基づく説明]

アンチパターン警告

以下の組み合わせが検出された場合、ユーザーに明示的に警告する。

| パターン | 問題 | 対処 | | --- | --- | --- | | 強度↑ × 距離↑ × 変動性↑ | 最悪の組み合わせ。マイクロサービス化の失敗典型。大規模リファクタ必須 | 強度を下げる(契約化)か、距離を縮める(統合)かを選ぶ | | 強度↓ × 距離↓ × 変動性↓ | 過剰な疎結合。YAGNI 違反の可能性が高い | 不必要な抽象化を削除し、距離を縮めることを検討 | | 対称機能結合(複製ロジック) | マイクロサービス間で同一ロジックが複製される場合、均衡度1になりやすい | 統合して単一所有者を定義する |

ケーススタディ参照

本スキルの few-shot 参考として、書籍『ソフトウェア設計の結合バランス』の代表ケースを 設計相談の Q&A 形式に翻案した 4 件を 本スキル配下の references/case-studies.md に収録している(設計時フレーミングで保守)。

  • 例 1: 強度が不可避 → 距離で救う(設計時の境界選択)
  • 例 2: 戦略的変更への反応(サブドメイン昇格 → 強度削減)
  • 例 3: 過剰疎結合の抑制(変動性が低ければ許容、YAGNI 原則)
  • 例 4: 対称機能結合アンチパターン(本書最悪例、均衡度 1)

類似する設計パターンに遭遇した場合は同ファイルを参照すること。 プロンプトテンプレート断片と選定ロジックも同ファイル末尾に記載。

coupling-model 側には case-studies を置かない方針(Issue #19 対処): consuming skill が文脈に合わせて自前で保持することで skill 間の raw-path 結合を回避している。

チェックポイント評価

本スキルは Opus モデルで動作するが、大きな設計分岐(例: マイクロサービス分割の最終判断、ADR 確定前)においては、別の独立した Opus subagent を Task ツールで起動して盲点・未検討の仮定・矛盾をチェックすることを推奨する。

Task(
  subagent_type: "general-purpose",
  model: "opus",
  prompt: "以下の設計決定の議論を監査し、盲点・未検討の仮定・矛盾を報告してください。\n[議論サマリを渡す]"
)

監査結果をワークフローに統合し、必要であれば評価を再実行する。

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/coupling-design-advisor-mrzxupu0/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/coupling-design-advisor-mrzxupu0' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/coupling-design-advisor-mrzxupu0/download' --output '.skill-downloads/coupling-design-advisor-mrzxupu0/SKILL.md.part' && mv '.skill-downloads/coupling-design-advisor-mrzxupu0/SKILL.md.part' '.skill-downloads/coupling-design-advisor-mrzxupu0/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Glob, Grep, Agent, Task

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/coupling-design-advisor-mrzxupu0/SKILL.md' && test -s '.skill-downloads/coupling-design-advisor-mrzxupu0/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/coupling-design-advisor' && cp -R '.skill-downloads/coupling-design-advisor-mrzxupu0' '.claude/skills/coupling-design-advisor'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/coupling-design-advisor-mrzxupu0'

openskills read 'coupling-design-advisor-mrzxupu0'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/coupling-design-advisor-mrzxupu0/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills