ultrathink-protocol
複雑で原因不明な技術的問題に対し、安易な修正を避け、仮説・検証・観察を繰り返しながら、証拠に基づいた原因特定と段階的な解決策を見つけ出すための、体系的な根本原因分析を支援するSkill。
📜 元の英語説明(参考)
A structured root-cause investigation protocol for complex, ambiguous, or multi-layer technical problems. Activate this skill whenever: a problem has resisted two or more fix attempts; the root cause is unknown or assumed; you are tempted to try a variation of something that already failed; a system has multiple interacting layers (hardware, OS, runtime, middleware, config, network); the user says "ultrathink", "think deeper", "figure out why", "stop guessing", "find the root cause", or "it's still broken after your fix". Also activate proactively when you catch yourself about to write a fix before you have verified the cause — that instinct is the signal the protocol is needed. The protocol enforces three disciplines that distinguish root-cause investigation from trial-and-error: (1) explicit THOUGHT/ACTION/OBSERVATION cycles, (2) a hard gate that blocks implementation until the cause is verified by direct evidence, and (3) structured escalation when in-process diagnostic tools are exhausted.
🇯🇵 日本人クリエイター向け解説
複雑で原因不明な技術的問題に対し、安易な修正を避け、仮説・検証・観察を繰り返しながら、証拠に基づいた原因特定と段階的な解決策を見つけ出すための、体系的な根本原因分析を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ultrathink-protocol.zip https://jpskill.com/download/23731.zip && unzip -o ultrathink-protocol.zip && rm ultrathink-protocol.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/23731.zip -OutFile "$d\ultrathink-protocol.zip"; Expand-Archive "$d\ultrathink-protocol.zip" -DestinationPath $d -Force; ri "$d\ultrathink-protocol.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
ultrathink-protocol.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
ultrathink-protocolフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] ultrathink-protocol
Ultrathink プロトコル
このプロトコルの目的
複雑な技術的問題は、特定のパターンで失敗します。それは、もっともらしい修正をパターンマッチングで探し、適用し、うまくいかないことを観察し、別のバリエーションを適用し、これを繰り返すというものです。各イテレーションは生産的に感じられますが、どれも理解を生み出しません。このループは何時間も続くことがあります。
このプロトコルは、決して混同してはならない2つのモードを分離することで、このループを断ち切ります。
- 診断モード — 実際に何が起こっているのかを検証済みのモデルとして構築すること
- 実装モード — 原因が判明した後に修正を適用すること
診断モードが検証済みの原因を特定するまで、実装モードに入ることはできません。検証済みとは、症状を説明する直接的な証拠(ログ行、ポート番号、ソース関数、ネットワークトレース、実行中のプロセスから読み取られた設定値など)をあなたが持っていることを意味します。「Xかもしれない」は仮説であり、検証済みの証拠ではありません。「起動スクリプトが exec の前に環境変数を上書きするため、実行中のプロセスはパス Y から設定を読み取り、パス Z からは読み取らない」は検証済みです。
実行サイクル
複雑な調査におけるすべてのステップは、この3部構成の構造に従います。これを明示的に書き出してください。単一の段落に圧縮しないでください。
THOUGHT: どのような仮説を検証しているのか?何を見つけることを期待しているのか?
この結果は、現在の問題モデルにとって何を意味するのか?
ACTION: 今すぐできる最も有益な単一の行動 —
コマンド、ソースコードの読み取り、ログの grep、プロセスの検査。
1サイクルにつき1つの行動。結果が予期せぬものであった場合に、
あなたのモデルを最も大きく変える行動を選びなさい。
OBSERVATION: 実際に何が起こったのか。関連する出力を直接引用しなさい。
これは仮説を裏付けるのか、それとも反証するのか?
どのようにモデルを変えるのか?
OBSERVATION のステップは、理解が構築される場所です。「私の理論を裏付ける」と説明するだけで、なぜそうなのかを説明しない観察は危険信号です。それは、モデルを更新するのではなく、証拠を事前に形成された結論に合わせている可能性があることを意味します。
診断ラダー
上から下へ作業を進めてください。検証済みの証拠が見つかったレベルで停止します。必要以上に進むと時間の無駄になり、早すぎると誤った診断につながります。
レベル 1 — 症状を正確に述べる
いかなる行動を起こす前に、症状を最も具体的で観察可能な言葉で述べ直してください。
- 弱い例:「動いていない」
- 強い例:「プロセス A は自身のログによると 1 Hz で出力を書き込んでいるが、 コンシューマ B は 30 秒経っても何も受信しない。両者とも同じチャネルで 接続されていると主張しているにもかかわらず」
観察されたものと期待されるものの間のギャップが、問題の形を定義します。すべての診断行動は、そのギャップを具体的に説明することを目的とすべきであり、隣接する可能性を探ることではありません。
レベル 2 — 明らかなものを排除する
無料で確認でき、もし間違っていればすべてを説明できるものを確認してください。
- プロセスは実際に実行されていますか?
- 実行中のプロセスは、あなたが考えている設定/環境変数を実際に認識していますか? (重要: シェルや設定ファイルではなく、プロセスの自身の環境を確認してください。 これらは頻繁に異なります)
- コード/バイナリの正しいバージョンがデプロイされていますか?
- プロセスは正しいエンドポイント、インターフェース、またはアドレスに接続されていますか?
プロセス環境の罠。 すべてのスタックで非常に一般的な失敗モードです。ランチャー、コンポーズファイル、またはラッパースクリプトで変数を設定しても、プロセスが起動時にそれを上書きし、意味がなくなることがあります。常に実行中のプロセスが何を見ているかを確認し、ランチャーに渡すように指示したものではありません。Linux では /proc/<pid>/environ です。他のプラットフォームでは、同等のプロセス検査ツールを使用してください。
レベル 3 — 実際のデータパスをトレースする
意図されたフローを特定し、実際の実行中のシステムで各ステップを検証してください。
- 実際の動作は、意図された動作からどの時点で逸脱していますか?
- チェーン内のどのコンポーネントが最後に正しく動作していますか?
- どのコンポーネントが最初に動作が間違っていますか?
根本原因は、ほとんどの場合、正確に1つの分岐点にあります。それは、レイヤーの境界、静かに上書きされた設定値、コードが予期せず異なる方法でバインドしたインターフェースなどです。「最後に正しかった」と「最初に間違っていた」の間のギャップが、探すべき場所です。
具体的には、何が間違っている可能性があるかを理論化するのではなく、実行中の状態(開いているファイルディスクリプタ、バインドされたアドレス、アクティブな接続、処理されている実際の値)を検査し、それらを期待されるものと比較してください。
レベル 4 — ソースコードを読む
コンポーネントが文書化または設定されたとおりに動作しない場合、設定を処理するコードまたは関連するパスを処理するコードを読んでください。これは時間がかかりそうに聞こえますが、設定のバリエーションを推測するよりも確実に高速です。
ソースアクセス優先順位:
- インストールされたヘッダーまたはバンドルされたスクリプトを Grep する — インストールされたパッケージにしばしば存在し、関数シグネチャ、定数値、環境変数名を明らかにします。
- バイナリを文字列リテラルで Grep する — 環境変数名、設定キー、コードが実行時に実際に読み取るマジック値を見つけます。
- アップストリームのソース(GitHub、パッケージレジストリ)を読む — 決定的です。単一の関数の実装が何時間もの設定の繰り返しを解決します。
- ドキュメントや課題トラッカーで、あなたが目にしている正確な動作を検索する。
ソースコードの読み取りが非常に価値があるパターン:あなたが設定してきた CONFIG_VAR_A ではなく CONFIG_VAR_B を読み取る関数は、調査を即座に終了させます。CONFIG_VAR_A への設定変更は、いくつのバリエーションを試しても決して機能しません。
レベル 5 — 対照実験
ソースコードが利用できない場合、またはコードパスが静的に追跡するには複雑すぎる場合、正確に1つの変数を分離する対照実験を実行してください。
- 失敗を再現する最小限のケースにシステムを縮小する
- 1つのことを変更し、その効果を観察する
- 現在の仮説を反証するように実験を設計し、確認するためではない
良い実験とは、あなたが間違っていることを証明できるものです。もしそれがあなたがすでに信じていることを確認することしかできないのであれば、それは診断的ではありません。それは余分なsを伴う確証バイアスです。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Ultrathink Protocol
What this protocol is for
Complex technical problems fail in a specific pattern: pattern-match to a plausible fix, apply it, observe it didn't work, apply a variation, repeat. Each iteration feels productive. None produce understanding. The loop can run for hours.
The protocol breaks the loop by separating two modes that must not be mixed:
- Diagnosis mode — building a verified model of what is actually happening
- Implementation mode — applying a fix once the cause is known
You cannot enter implementation mode until diagnosis mode has produced a verified cause — meaning you hold direct evidence (a log line, a port number, a source function, a network trace, a config value read from the running process) that explains the symptom. "It might be X" is a hypothesis, not verified evidence. "The running process reads config from path Y, not path Z, because the startup script overwrites the env var before exec" is verified.
The execution cycle
Every step in a complex investigation follows this three-part structure. Write it out explicitly — do not compress it into a single paragraph.
THOUGHT: What hypothesis am I testing? What do I expect to find?
What would this result mean for my current model of the problem?
ACTION: The single most informative thing I can do right now —
a command, a source read, a log grep, a process inspection.
One action per cycle. Pick the action that would most change
your model if the result is unexpected.
OBSERVATION: What actually happened. Quote the relevant output directly.
Does this confirm or refute the hypothesis?
How does it change the model?
The OBSERVATION step is where understanding is built. An observation that says "that confirms my theory" without explaining why is a red flag — it means you may be fitting evidence to a pre-formed conclusion rather than updating your model.
The diagnosis ladder
Work top to bottom. Stop at the level where you find verified evidence. Going further than necessary wastes time; stopping too early produces wrong diagnoses.
Level 1 — State the symptom precisely
Before any action, restate the symptom in the most concrete observable terms:
- Weak: "it's not working"
- Strong: "process A writes output at 1 Hz according to its own logs, but consumer B receives nothing after 30 seconds, even though both claim to be connected on the same channel"
The gap between what is observed and what is expected defines the shape of the problem. Every diagnostic action should be aimed at explaining that gap specifically — not at exploring adjacent possibilities.
Level 2 — Eliminate the obvious
Check what is free to check and would explain everything if wrong:
- Is the process actually running?
- Does the running process actually see the config/env vars you think it does? (critical: check the process's own environment, not the shell or config file — they are frequently different)
- Is the correct version of the code/binary deployed?
- Is the process connected to the right endpoint, interface, or address?
The process environment trap. A very common failure mode across all stacks:
you configure a variable in a launcher, compose file, or wrapper script, but the
process overwrites it at startup before it matters. Always verify what the running
process sees, not what you told the launcher to pass. On Linux: /proc/<pid>/environ.
On other platforms: equivalent process inspection tools.
Level 3 — Trace the actual data path
Identify the intended flow and then verify each step in the actual running system:
- At what point does the actual behaviour diverge from the intended behaviour?
- Which component in the chain is the last one behaving correctly?
- Which is the first one where the behaviour is wrong?
The root cause is almost always at exactly one point of divergence — a layer boundary, a config value that was silently overridden, an interface that the code bound to differently than expected. The gap between "last correct" and "first wrong" is where to look.
Concretely: rather than theorising about what could go wrong, inspect running state — open file descriptors, bound addresses, active connections, actual values being processed — and compare them to what you expect.
Level 4 — Read the source
When a component does not behave as documented or configured, read the code that processes the config or handles the relevant path. This sounds slow. It is reliably fast compared to guessing at configuration variations.
Source access priority:
- Grep installed headers or bundled scripts — often present in installed packages and reveals function signatures, constant values, env var names
- Grep the binary for string literals — finds env var names, config keys, magic values that the code actually reads at runtime
- Read the upstream source (GitHub, package registry) — definitive; a single function's implementation resolves hours of config iteration
- Search documentation and issue trackers for the exact behaviour you're seeing
The pattern that makes source reading so valuable: a function that reads
CONFIG_VAR_B instead of the CONFIG_VAR_A you've been setting terminates the
investigation immediately. No configuration change to CONFIG_VAR_A would ever
work, regardless of how many variations you tried.
Level 5 — Controlled experiment
When source is unavailable or the code path is too complex to trace statically, run a controlled experiment that isolates exactly one variable:
- Reduce the system to the minimal case that still reproduces the failure
- Change one thing and observe the effect
- Design the experiment to falsify your current hypothesis, not to confirm it
A good experiment is one that could prove you wrong. If it can only confirm what you already believe, it is not diagnostic — it is confirmation bias with extra steps.
The stuck gate
You are stuck when any of these is true:
- You have applied the same class of fix more than twice (different config values, different versions of the same patch, different restart sequences) without new verified evidence that the root cause has changed
- Your last three OBSERVATION steps have not changed your model of the problem
- You are considering a more complex version of something that already failed
- The word "maybe" appears in your reasoning without a plan to test it
When stuck: stop. Do not apply another fix variant.
Instead:
-
State the situation explicitly:
"I am stuck. My current model of the problem is [X]. The evidence I have is [Y]. The part I cannot explain is [Z]."
-
Descend the diagnosis ladder — you have not gone far enough. The most common reason for being stuck is that the actual behaviour at some layer has not been inspected directly; there is an assumption standing in for observation.
-
If all available diagnostic tools have been exhausted, escalate to external research (see below).
The phrase "stop doing trial and error without knowing the root cause" is a hard stop signal from the user. It means the protocol was violated — return immediately to diagnosis mode, regardless of how close the current fix attempt feels.
Escalation: when and how to research
Escalate to web search, documentation, or source code research when:
- The root cause requires understanding a system you cannot directly inspect (closed-source binary, third-party middleware, undocumented protocol behaviour)
- You have arrived at a clear, specific, answerable question
- Continued diagnosis without more information would be speculation
A researchable question is specific enough that a search could answer it directly:
"What environment variable does [library X]'s [function Y] actually read at runtime?"
A non-researchable question is what you write when stuck and hoping research will rescue you:
"How does [technology A] work with [technology B]?"
If you cannot write a specific question, you have not diagnosed far enough. More diagnosis, not more research, is the right move.
Communication during investigation
What to say
- Before each ACTION, state the hypothesis being tested in one sentence
- After each OBSERVATION, state what changed in your model — even if the answer is "nothing changed, which itself narrows the possibilities"
- When the root cause is confirmed, state it completely and precisely before
proposing any fix:
"Root cause confirmed: [component A] uses [value X] because [mechanism Y] overrides the configured [value Z] at startup. Evidence: [direct quote from log/source/process state]."
What not to say
- Do not narrate tool calls as progress ("Let me check the logs..." is not a finding — report the finding, not the intent)
- Do not announce fixes before the cause is verified
- Do not say "I think the issue might be X" and immediately apply a fix for X — "might be" is a hypothesis; test it first
- Do not compress THOUGHT/ACTION/OBSERVATION into a single paragraph — the explicit structure is precisely what prevents skipping the verification step
Multi-layer decomposition
When a system has multiple layers (any stack: hardware → driver → OS → runtime → middleware → application → config), failures almost always occur at exactly one layer boundary. The strategy for finding it:
-
Find the last layer that works correctly. Where in the chain does behaviour match expectation? Start from the input end and work forward.
-
Find the first layer that fails. Where does behaviour first diverge from expectation?
-
The root cause is at that boundary. You now have a precise, one-layer question instead of a whole-system question. Investigate only that boundary.
This decomposition converts "nothing works end-to-end" into a single-layer question that can be answered with one or two diagnostic actions.
Avoid investigating layers you have not checked. It is tempting to hypothesise about a deep layer when the surface layers have not been fully inspected. The actual divergence point is almost always shallower than expected.
Anti-patterns this protocol prevents
| Anti-pattern | Signal | Correct response |
|---|---|---|
| Config iteration | Trying the third variation of the same config change | Stop. Read what config the running process actually loads. |
| Restart loop | Rebuild → restart → check, without new diagnostic information | Stop. The code did not change. Inspect state before restarting again. |
| Assumption drift | Fix is written for cause X before X has been verified | Treat X as a hypothesis. Find direct evidence before writing a fix. |
| Complexity escalation | Each failed fix attempt adds more layers or indirection | Apply Occam's razor. The simpler explanation is right more often. A 3-line change to the right place beats a 50-line workaround around the wrong place. |
| Confirmation reading | Reading diagnostic output to confirm existing belief rather than test it | Ask: what would I see if my hypothesis is wrong? Look for that specifically. |
| Shell ≠ process env | Assuming the process sees what the launcher was told to pass | Verify the process's own environment at runtime, not the launch config. |
| Layer skipping | Theorising about a deep layer without inspecting the surface layers first | Walk the chain from input to output. The first divergence is the root cause. |
Diagnostic toolkit (generic)
# What environment does the running process actually see?
# Linux:
cat /proc/<pid>/environ | tr '\0' '\n'
# Or filter for a specific variable:
cat /proc/<pid>/environ | tr '\0' '\n' | grep VAR_NAME
# Which network sockets does a process own? (Linux)
# Map process file descriptors to UDP/TCP ports:
python3 -c "
import os, re
pid = <pid>
inodes = {}
for fd in os.listdir(f'/proc/{pid}/fd'):
try:
m = re.match(r'socket:\[(\d+)\]', os.readlink(f'/proc/{pid}/fd/{fd}'))
if m: inodes[int(m.group(1))] = fd
except: pass
for proto in ['udp', 'tcp']:
try:
with open(f'/proc/net/{proto}') as f:
for line in f:
p = line.split()
if len(p) >= 10:
try:
i = int(p[9])
if i in inodes:
port = int(p[1].split(':')[1], 16)
print(f'{proto.upper()} fd{inodes[i]} port={port}')
except: pass
except: pass
"
# What string literals (env var names, config keys) does a binary contain?
grep -oa '[A-Z_][A-Z0-9_]\{3,\}' /path/to/binary | sort -u | head -50
# Read source from a public GitHub repo without cloning:
gh api repos/<org>/<repo>/contents/<path/to/file> --jq '.content' | base64 -d
# Which file is a process actually reading? (Linux, requires strace)
strace -p <pid> -e trace=openat 2>&1 | grep -v ENOENT
# What is the process's working directory and open files?
ls -la /proc/<pid>/fd
readlink /proc/<pid>/cwd
Completion checklist
Do not declare a fix done until every item is checked:
- [ ] The root cause is stated in one sentence with a direct evidence citation
- [ ] The fix targets the root cause, not a downstream symptom
- [ ] No complexity was added to work around unexplained behaviour
- [ ] The fix is the simplest change that addresses the verified cause
- [ ] Before applying, a specific prediction was made: "after this fix, I expect to observe [X]"
- [ ] After applying, the prediction was verified by observation
- [ ] The system is tested at the layer where the failure occurred, not just end-to-end