AgentSkillsCN

mode-interactive

在面对开放式需求或多种可行方案时,为决策提供指导。利用 VS Code 原生的 ask_questions 工具,打造结构化的 UI 组件。当用户询问“我该怎么做?”、“帮我做决定”、“哪种方案更好?”或给出模糊指令需要进一步澄清时,此技能便会自动激活。

SKILL.md
--- frontmatter
name: mode-interactive
description: Guides decision-making when facing open-ended requests or multiple viable approaches. Uses VS Code native ask_questions tool for structured UI widgets. Activates when user asks "what should I", "help me decide", "which approach", or gives vague instructions requiring clarification.

Interactive Mode: Smart-Detect Strategy

Use VS Code's native ask_questions tool to gather structured user input through real UI widgets (dropdowns, multi-select, free text) when the request is ambiguous. Skip straight to work when intent is clear.

For the full ask_questions tool contract (schema, response format, hard constraints, and call patterns), apply the vscode-integration skill § askQuestions.

Core Decision Flowchart

code
┌─────────────────────────────────────────────────────────────────┐
│            SHOULD I USE INTERACTIVE QUESTIONS?                  │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Is the task type obvious from the request?                     │
│     NO  → Ask via ask_questions                                 │
│     YES → Infer and proceed                                     │
│                                                                 │
│  Is scope/complexity explicitly stated?                         │
│     NO  → Ask or infer from context                             │
│     YES → Use stated scope                                      │
│                                                                 │
│  Are focus areas mentioned or implied?                          │
│     NO  → Ask multi-select for priorities                       │
│     YES → Include mentioned areas + sensible defaults           │
│                                                                 │
│  Rule: If 2+ areas unclear → batch into one ask_questions call  │
│        If 1 unclear → infer default, note assumption explicitly │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Inference Heuristics

When keywords strongly signal intent, infer rather than ask:

Signal WordsLikely IntentConfidence
"bug", "broken", "failing", "error"Fix/DebugHigh
"refactor", "improve", "clean up"RefactoringHigh
"add", "implement", "new", "create"New featureHigh
"should we", "compare", "evaluate", "which"Decision/AnalysisHigh
"quick", "brief", "just"Minimal scopeMedium
"thorough", "comprehensive", "deep"Full scopeMedium

Rule: High confidence → proceed. Medium confidence → note assumption.

Interaction Design Rules

For detailed component patterns and trigger keywords, apply prompt-interaction-design skill.

Quick rules:

  • Use ask_questions tool — never fall back to markdown-formatted questions
  • Batch related questions (max 4 per call, 2–6 options each)
  • Keep header ≤12 chars (it's both the UI label and the response key)
  • Mark one option as recommended with a short justification in description
  • multiSelect: true for additive choices; default (false) for either/or
  • Summarize user choices in a table after interaction
  • Don't re-ask unless requirements explicitly change

When to Trigger Interactions

PhaseTrigger ConditionComponent Type
StartAmbiguous scope (2+ unclear areas)Multi-question ask_questions call
Options2+ viable approaches existSingle-select with trade-offs
Next StepsPath forward unclearSingle-select for action

Anti-Patterns

  • ❌ Asking when intent is obvious from context
  • ❌ Using markdown-formatted questions instead of ask_questions tool
  • ❌ Asking one question at a time (batch into one ask_questions call)
  • ❌ Re-asking after user already clarified
  • ❌ More than 6 options per question (decision fatigue)
  • header longer than 12 characters (tool call will fail)
  • ❌ Missing "do nothing" option for optional changes
  • ❌ Using recommended on quiz/poll options (it pre-selects and reveals the answer)