mcpField
S
stuck

stuck

github.com/johnlindquist開発2644 回インストール45 週間前に更新
リポジトリ

stuck について

エラーの再発やデバッグの行き詰まり、原因が分からない問題に取り組む開発者向けの体系的なデバッグスキルです。前提の確認、最小再現、段階的な切り分けを組み合わせ、質問の整理も支援します。

主な機能

  1. 01問題と試行済みの方法を整理
  2. 02ラバーダックデバッグと前提の監査
  3. 03非同期、状態、型、ビルドの問題に対応
  4. 04環境、最小再現、Git 履歴を段階的に確認
  5. 05相談用の質問文を作成

活用シーン

  1. 01複数の修正が失敗した問題を再検討
  2. 02繰り返し発生するエラーを調査
  3. 03最小再現を作り、問題が入ったコミットを特定
  4. 04コードとエラーを含む相談文を準備

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/johnlindquist/claude --skill stuck

インストール後、Claude Code で/stuckを入力して読み込まれたか確認します。

詳細

行き詰まり解消ヘルパー

難しい問題で行き詰まったときに解決へ導く、体系的なアプローチです。

使う場面

  • 複数の方法を試しても解決しない
  • 修正しても同じエラーが繰り返し表示される
  • なぜうまくいかないのか分からない
  • デバッグが行き詰まっている

すぐに行き詰まりを解消する

gemini -m pro -o text -e "" "I'm stuck on this problem:

PROBLEM: [describe what you're trying to do]
TRIED: [what you've already attempted]
ERROR/SYMPTOM: [what's happening]
EXPECTED: [what should happen]

Help me get unstuck. Consider:
1. Am I solving the right problem?
2. What assumptions might be wrong?
3. What haven't I tried?
4. What would an expert check first?"

体系的なデバッグ

ラバーダック・プロトコル
gemini -m pro -o text -e "" "I need to rubber duck debug this issue:

I'm trying to: [goal]
The code does: [behavior]
I expected: [expected behavior]
The relevant code is:

\`\`\`
[paste code]
\`\`\`

Walk through the code step by step with me, questioning each assumption."
前提の確認
gemini -m pro -o text -e "" "Audit my assumptions about this problem:

PROBLEM: [description]
MY ASSUMPTIONS:
1. [assumption 1]
2. [assumption 2]
3. [assumption 3]

For each assumption:
- Is it definitely true?
- How would I verify it?
- What if it's wrong?"
新たな視点
gemini -m pro -o text -e "" "I've been stuck on this for a while. Give me a completely fresh approach:

PROBLEM: [description]
WHAT I'VE TRIED:
- [approach 1]
- [approach 2]
- [approach 3]

Suggest approaches from a different angle. What would someone with no context try?"

よくある行き詰まりの状況

Async/Promise の問題
gemini -m pro -o text -e "" "Debug this async code issue:

CODE:
\`\`\`
[paste async code]
\`\`\`

SYMPTOM: [what's happening]

Check for:
- Missing await
- Race conditions
- Unhandled rejections
- Callback timing
- Promise chain issues"
状態管理
gemini -m pro -o text -e "" "Debug this state management issue:

FRAMEWORK: [React/Vue/etc]
CODE:
\`\`\`
[paste code]
\`\`\`

SYMPTOM: State not updating / Stale state / Infinite loop

Check for:
- Mutation vs immutable update
- Dependency arrays
- Closure over stale values
- Re-render triggers"
型エラー
gemini -m pro -o text -e "" "Help me understand this TypeScript error:

ERROR:
\`\`\`
[paste error]
\`\`\`

CODE:
\`\`\`
[paste code]
\`\`\`

Explain:
1. What the error means in plain English
2. Why TypeScript is complaining
3. How to fix it properly (not just any)"
ビルド/設定の問題
gemini -m pro -o text -e "" "Debug this build/config issue:

TOOL: [webpack/vite/esbuild/etc]
ERROR:
\`\`\`
[paste error]
\`\`\`

CONFIG:
\`\`\`
[paste config]
\`\`\`

Common causes and solutions for this type of error."

エスカレーションの手順

簡単なデバッグで解決しない場合は、体系的に次の段階へ進みます。

レベル 1:環境を確認する
# Check versions
node --version
npm --version
# Check dependencies
npm ls
# Clean and reinstall
rm -rf node_modules package-lock.json && npm install
レベル 2:最小限の再現例を作成する
# Create minimal test case
mkdir /tmp/test-issue
cd /tmp/test-issue
# Create smallest code that reproduces issue
レベル 3:Git Bisect
# Find when it broke
git bisect start
git bisect bad HEAD
git bisect good <last-known-good-commit>
# Test each commit git suggests
レベル 4:類似する問題を検索する
# GitHub issues
gh search issues "[error message]" --limit 10

# With specific repo
gh search issues "[error]" --repo package/repo
レベル 5:助けを求める
# Prepare a good question
gemini -m pro -o text -e "" "Help me write a good Stack Overflow question for:

PROBLEM: [description]
CODE: [minimal reproduction]
ERROR: [full error]
TRIED: [what I've attempted]

Format as a clear, answerable question."

再発防止チェックリスト

行き詰まりを解消したら、再発を防ぎましょう。

gemini -m pro -o text -e "" "I just solved this issue:

PROBLEM: [what was wrong]
SOLUTION: [how I fixed it]

Suggest:
1. Test to prevent regression
2. Documentation to add
3. Linting/tooling to catch this earlier
4. Pattern to follow in future"

ベストプラクティス

  1. 問題を明確に述べる - 書き出すと問題が見えてくることがよくあります
  2. 試したことを列挙する - 失敗した方法を繰り返さずに済みます
  3. 前提を疑う - 誤った前提が問題の原因であることはよくあります
  4. 単純化する - 最小限のケースを見つけるまでコードを削除します
  5. 休憩する - 疲れていると見落とすことも、休憩後には気づけます
  6. 早めに助けを求める - 5分で解決する質問に何時間も費やさないようにしましょう
  7. 解決策を記録する - 将来の自分が、今の自分に感謝するでしょう

コメント