.claude/skills/question-router/SKILL.md
# Skill: Question Router ## Purpose Classify incoming user questions into complexity levels (L1-L5) and route them to the appropriate response path. This replaces the old "skip-step" logic with a structured classification that adapts the workflow depth to the question's actual needs. ## When to Use - At the start of every user interaction that looks like an analytical request - Before launching the full 18-step pipeline - When the user asks a follow-up question mid-analysis ## Classification
npx skillsauth add ai-analyst-lab/ai-analyst .claude/skills/question-routerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Classify incoming user questions into complexity levels (L1-L5) and route them to the appropriate response path. This replaces the old "skip-step" logic with a structured classification that adapts the workflow depth to the question's actual needs.
Pattern: User wants a specific number or fact from the data. Examples:
Response path: Query the data directly. Return the answer with source citation (table, column, filter). No agents needed.
Time: ~30 seconds
Pattern: User wants to compare two things or see a breakdown. Examples:
Response path: Query + quick chart. Use chart_helpers directly.
Apply Visualization Patterns skill. No full pipeline.
Time: ~2 minutes
Pattern: User has a specific analytical question requiring multiple steps. Examples:
Response path: Subset of the pipeline — Frame → Explore → Analyze → Validate → Present findings. Skip storyboard/deck unless requested. Use 3-5 agents.
Time: ~10 minutes
Pattern: User needs root cause analysis, opportunity sizing, or experiment design. Examples:
Response path: Full pipeline minus deck. Frame → Hypothesize → Explore → Analyze → Root Cause → Validate → Size → Present findings. Use 6-10 agents.
Time: ~20 minutes
Pattern: User wants a complete analysis with a polished slide deck. Examples:
/run-pipelineResponse path: Complete 18-step pipeline. All agents, full storyboard, charts, narrative, and Marp deck.
Time: ~30-45 minutes
Enrichment steps — never block routing. If any sub-step fails, skip it silently.
Feedback check — The Feedback Capture skill runs BEFORE this router. By the time a message reaches here, corrections/learnings are already captured. If the message was purely feedback (no analytical question), it was handled upstream — skip routing.
Entity disambiguation — If the entity index is loaded (from bootstrap):
resolve_entity(query_text, entity_index) from
helpers/entity_resolver.py.format_disambiguation(matches) and set
{{RESOLVED_ENTITIES}} for downstream agents.{{RESOLVED_ENTITIES}} empty.Corrections check — Read .knowledge/corrections/index.yaml.
total_corrections > 0 for the active dataset, set
{{CORRECTION_COUNT}} so analysis agents check the correction log
before writing SQL (e.g., known join pitfalls, filter requirements).total_corrections is 0, set
{{CORRECTION_COUNT}} to 0.Archaeology note — The Query Archaeology skill provides SQL pattern context (prior queries, reusable CTEs) to analysis agents when available. No action needed here — just acknowledge it flows downstream automatically.
After pre-flight completes, proceed to Step 1.
Extract:
| Signal | L1 | L2 | L3 | L4 | L5 |
|--------|----|----|----|----|-----|
| Asks for a single number | +3 | | | | |
| Uses "compare" or "by {dimension}" | | +3 | | | |
| Uses "why", "investigate", "root cause" | | | | +3 | |
| Uses "analyze", "what's happening with" | | | +3 | | |
| Mentions "deck", "presentation", "slides" | | | | | +3 |
| Uses /run-pipeline | | | | | +5 |
| Mentions sizing, opportunity, impact | | | | +2 | |
| Mentions experiment, A/B test | | | | +2 | |
| Question has multiple sub-questions | | | +2 | +1 | |
| "Quick" or "just" qualifier | +2 | +1 | | | |
Assign the level with the highest score. Ties break toward the lower level (prefer faster response).
If .knowledge/user/profile.md exists, read the user's preferences:
For L1-L2: Execute immediately. No confirmation needed.
For L3-L5: Brief the user on the plan:
I'd classify this as a **[Level] — [Label]**. Here's my plan:
1. [Step summary]
2. [Step summary]
...
Estimated time: ~[X] minutes. Want me to proceed, or adjust the scope?
The user can:
When routed to L3+, the Question Router hands off to the appropriate agents by setting the entry point in the Default Workflow:
| Level | Entry Point | Exit Point | |-------|-------------|------------| | L3 | Step 1 (Frame) | Step 7 (Validate) — present findings inline | | L4 | Step 1 (Frame) | Step 8 (Size) — present findings inline | | L5 | Step 1 (Frame) | Step 18 (Close the Loop) — full deck |
Before classifying, check whether the question references a dataset other than the currently active one.
.knowledge/datasets/ to get all known dataset IDs and display names./switch-dataset {id})"This prevents accidentally running analysis on the wrong dataset.
After delivering results at any level, offer 2-3 relevant next actions based on what was just completed. Match suggestions to the level and findings.
After L1/L2 results:
After L3 findings:
After L4 investigation:
After L5 deck delivery:
/archive)"/export)"Always tailor suggestions to the actual findings — reference specific metrics, segments, or anomalies discovered. Generic suggestions ("want to know more?") are not helpful.
testing
# Skill: {{BLANK_1_SKILL_NAME}} ## Purpose {{BLANK_2_WHEN_TO_FIRE}} ## When to Use Fires automatically when the user asks Claude to do something that matches the trigger condition above. ## Instructions 1. Detect the trigger condition 2. Execute your guardrail check 3. If the check matters, print a clear, visible warning with "{{BLANK_3_SIGNATURE_PHRASE}}" as the first line 4. Continue with the analysis, incorporating the warning into the output ## Anti-Patterns - Do not fire when the condit
development
# Skill: Visualization Patterns ## Purpose Ensure every chart Claude Code produces follows high-quality design standards with named themes, consistent styling, and clear data communication. ## When to Use Apply this skill whenever generating a chart, graph, or data visualization. Always apply the active theme unless the user specifies otherwise. Default theme: `minimal`. ## Instructions ### Pre-flight: Load Learnings Before executing, check `.knowledge/learnings/index.md` for relevant entrie
development
# Skill: Triangulation / Sanity Check ## Purpose Cross-reference analytical findings against multiple data sources, external benchmarks, and common sense to catch errors before they become bad decisions. ## When to Use Apply this skill after every analysis, before presenting findings to stakeholders, and whenever a result seems surprising. If a finding would change a decision, it MUST be triangulated first. ## Instructions ### Triangulation Framework Every finding gets checked through four
data-ai
# Skill: Tracking Gap Identification ## Purpose Assess whether the data needed for an analysis actually exists, identify what's missing, and produce prioritized instrumentation requests for engineering when gaps are found. ## When to Use Apply this skill after the Data Explorer agent inventories available data, when an analysis requires data that might not exist, or when initial query results suggest incomplete tracking. Run before committing to an analysis approach. ## Instructions ### Gap