when-analyzing-user-intent-use-intent-analyzer
БесплатноБез исполняемых скриптовНе проверенAdvanced intent interpretation system using cognitive science principles and probabilistic intent mapping
от majiayu000★ 31 звезда на GitHubОб этом скилле
Intent Analyzer - Advanced User Intent Interpretation
Overview
Advanced intent interpretation system that analyzes user requests using cognitive science principles and extrapolates logical volition. Use when user requests are ambiguous, when deeper understanding would improve response quality, or when helping users clarify what they truly need.
When to Use This Skill
- User request is vague or ambiguous
- Multiple interpretations are possible
- High-stakes decision requires clarity
- User may not know exactly what they need
- Complex requirements need decomposition
- Implicit assumptions need surfacing
Theoretical Foundation
Cognitive Science Principles
- Probabilistic Intent Mapping: Assign likelihood scores to possible interpretations
- First Principles Decomposition: Break complex requests into fundamental components
- Socratic Clarification: Ask targeted questions to narrow possibilities
- Context Integration: Leverage environment and history for disambiguation
- Volition Extrapolation: Infer underlying goals beyond stated request
Evidence-Based Patterns
- Self-Consistency: Generate multiple interpretations and find consensus
- Chain-of-Thought: Trace reasoning from input to understanding
- Program-of-Thought: Structure analysis as executable logic
- Plan-and-Solve: Decompose understanding into steps
Phase 1: Capture User Input
Objective
Gather complete user request with full context
Agent Coordination
# Pre-task hook
npx claude-flow@alpha hooks pre-task \
--description "Capture user input for intent analysis" \
--complexity "low" \
--expected-duration "2min"
# Session restore
npx claude-flow@alpha hooks session-restore \
--session-id "intent-analyzer-${TIMESTAMP}"
Implementation
Step 1.1: Extract Raw Input
const userInput = {
request: "[User's exact words]",
context: {
environment: process.env,
workingDirectory: process.cwd(),
recentHistory: [] // Last 5 interactions
},
timestamp: new Date().toISOString()
};
// Store in memory
await memory.store('intent/raw-input', userInput);
Step 1.2: Identify Input Characteristics
const characteristics = {
length: userInput.request.split(' ').length,
hasMultipleParts: /and|then|also|additionally/i.test(userInput.request),
containsQuestions: /\?/.test(userInput.request),
specificityScore: calculateSpecificity(userInput.request),
domainIndicators: extractDomains(userInput.request)
};
await memory.store('intent/characteristics', characteristics);
Step 1.3: Gather Context Clues
const contextClues = {
fileSystem: await analyzeFileSystem(),
recentEdits: await getRecentEdits(),
projectType: await inferProjectType(),
userExpertise: await estimateExpertiseLevel()
};
await memory.store('intent/context-clues', contextClues);
Validation Criteria
- Complete user request captured
- Context information gathered
- Characteristics identified
- Memory storage confirmed
Memory Pattern
# Store phase completion
npx claude-flow@alpha hooks post-edit \
--file "memory://intent/raw-input" \
--memory-key "intent-analyzer/phase1/completion"
Phase 2: Decompose Intent
Objective
Break down request into fundamental components using first principles
Agent: Researcher
Step 2.1: Tokenize Request
const tokens = {
actions: extractActionVerbs(userInput.request),
subjects: extractSubjects(userInput.request),
constraints: extractConstraints(userInput.request),
outcomes: extractDesiredOutcomes(userInput.request)
};
// Example output:
// {
// actions: ['create', 'optimize', 'test'],
// subjects: ['API', 'database', 'authentication'],
// constraints: ['must be secure', 'under 100ms'],
// outcomes: ['production-ready', 'scalable']
// }
Step 2.2: Build Component Tree
const componentTree = {
primary: {
intent: inferPrimaryIntent(tokens),
confidence: 0.85
},
secondary: tokens.actions.slice(1).map(action => ({
intent: action,
confidence: 0.60
})),
implicit: inferImplicitRequirements(tokens, contextClues)
};
await memory.store('intent/component-tree', componentTree);
Step 2.3: Identify Dependencies
const dependencies = {
sequential: findSequentialDeps(componentTree),
parallel: findParallelDeps(componentTree),
conditional: findConditionalDeps(componentTree)
};
// Example:
// {
// sequential: ['database schema' -> 'API endpoints' -> 'tests'],
// parallel: ['frontend', 'backend'],
// conditional: ['if authentication: setup OAuth']
// }
Validation Criteria
- All action verbs identified
- Component tree constructed
- Dependencies mapped
- Implicit requirements surfaced
Script Template
#!/bin/bash
# decompose-intent.sh
INPUT_FILE="$1"
OUTPUT_FILE="$2"
# Read user input
USER_REQUEST=$(cat "$
Установить when-analyzing-user-intent-use-intent-analyzer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл when-analyzing-user-intent-use-intent-analyzer?
Advanced intent interpretation system using cognitive science principles and probabilistic intent mapping
Как установить скилл when-analyzing-user-intent-use-intent-analyzer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл when-analyzing-user-intent-use-intent-analyzer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic