prompt-analyzer
ユーザープロンプトを分析し、topic_type(instruction/question/context)を判定する。
When & Why to Use This Skill
The Prompt Analyzer skill serves as an intelligent orchestration layer that evaluates user inputs to determine intent, structure, and complexity. By classifying prompts into instructions, questions, or context, it enables agents to route tasks efficiently, detect ambiguities early, and decompose complex requests into manageable actions, significantly improving the reliability and precision of automated AI workflows.
Use Cases
- Intent Classification: Automatically categorizing user input as an instruction, question, or context to select the most appropriate response strategy or sub-agent.
- Requirement Analysis & Risk Detection: Utilizing 5W1H analysis to identify missing information, vague requirements, or potential risks in a task request before execution.
- Complex Task Decomposition: Breaking down prompts containing multiple instructions into separate, structured logical components for more accurate processing.
- Agentic Workflow Routing: Serving as a mandatory pre-processing hook that determines whether to trigger a specific business playbook, provide a direct answer, or integrate information into the current context.
| name | prompt-analyzer |
|---|---|
| description | ユーザープロンプトを分析し、topic_type(instruction/question/context)を判定する。 |
Prompt Analyzer Skill
ユーザープロンプトを分析し、構造化データを返す Skill。
Purpose
- topic_type 判定: プロンプトを instruction / question / context に分類
- 5W1H + リスク + 曖昧さ検出: タスク依頼の詳細分析
- 論点分解: 複数指示の分離
- pm 支援: playbook 作成前の情報収集
When to Use
triggers:
- 全てのユーザープロンプト(Hook から強制呼び出し)
invocation:
Task(subagent_type='prompt-analyzer', prompt='ユーザープロンプト')
Output
analysis:
summary:
primary_topic_type: instruction|question|context
confidence: high|medium|low
ready_for_playbook: true|false
blocking_issues: ["{問題}"]
必須アクション:
- id: 1
action: "この分析結果をチャットに出力"
- id: 2
action: "{topic_type に基づくアクション}"
Next Action
instruction:
action: Skill(skill='playbook-init')
question:
action: 直接回答
context:
action: 現在タスクに統合
Related Files
| ファイル | 役割 |
|---|---|
| agents/prompt-analyzer.md | SubAgent 詳細定義 |
| .claude/hooks/prompt.sh | Hook(呼び出し元) |