Claude Code自動相談システム。行き詰まった時にSonnet/Opus APIに相談する。2回失敗で自動提案、ハイブリッドエスカレーション。
Scanned 9/2/2026
Install to Claude Code
npx -y skills add majiayu000/claude-skill-registry --skill auto-consultation --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Auto Consultation?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/majiayu000-auto-consultation)More formats (shields.io, HTML) on the badges page.
---
name: auto-consultation
description: Claude Code自動相談システム。行き詰まった時にSonnet/Opus APIに相談する。2回失敗で自動提案、ハイブリッドエスカレーション。
---
# Auto Consultation
## 📋 実行前チェック(必須)
### このスキルを使うべきか?
- [ ] 同じエラーが2回以上発生した?
- [ ] 解決策が見つからず行き詰まっている?
- [ ] ユーザーから「相談して」「APIに聞いて」と指示された?
### 前提条件
- [ ] `ANTHROPIC_API_KEY` が設定されているか?
- [ ] `consult` コマンドが使用可能か?
### 禁止事項の確認
- [ ] 簡単に解決できる問題で無駄にAPIを呼んでいないか?
- [ ] 過去の相談履歴を確認したか?
---
## トリガー
### 自動トリガー(Hook)
- 同じエラーが2回発生 → 相談を提案
### 手動トリガー
- ユーザーから「相談して」「APIに聞いて」「Opusに相談して」
- 明らかに行き詰まっている時
---
## 🚨 鉄則
**まず履歴を確認。無駄なAPI呼び出しを避ける。**
---
## 実行方法
### 基本
```bash
# 直接相談
consult "エラーの原因を教えて: [エラー内容]"
# 失敗ログから自動生成
consult --check
# 統計確認
consult --stats
```
### オプション
```bash
# コンテキスト収集なし(シンプルな質問)
consult --no-context "質問"
# 非対話モード
consult --no-interactive "質問"
```
---
## フロー
```
1. 問題発生 → failure_log に記録
2. 2回失敗 → Hook が検出 → 相談提案
3. consult 実行:
a. 過去の類似相談を検索
b. コンテキスト自動収集
c. Sonnet API 呼び出し
d. 回答の質を判定
e. 必要ならOpusにエスカレーション
4. 回答を適用 → 解決を試みる
5. 履歴に記録
```
---
## 自動エスカレーション条件
以下の場合、Opusに自動エスカレーション:
1. Sonnetの回答が100文字未満
2. 不確実性キーワードを含む:
- "確信が持てません"
- "より詳細な情報が必要"
- "複数の可能性があります"
---
## 履歴の活用
```bash
# 履歴を確認
cat claude_tmp/consultation/index.json
# 過去の相談を検索
grep -r "エラーキーワード" claude_tmp/consultation/history/
```
---
## コスト目安
| パターン | コスト |
|---------|--------|
| Sonnetで解決 | ~$0.02 |
| Opus必要 | ~$0.06 |
---
## 🚫 禁止事項まとめ
- 履歴確認なしでAPI呼び出し
- 簡単な問題での無駄な相談
- エラー内容なしでの相談
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!