.claude/skills/setup/SKILL.md
# Skill: /setup Run a 4-phase conversational interview that populates the knowledge system from the user's real context. Turns a blank `.knowledge/` directory into a fully configured analytical environment. ## Parameters - **No arguments**: Start from Phase 1 (or resume from last incomplete phase) - `/setup status`: Show current setup state - `/setup reset`: Reset profile and preferences (Tier 1) - `/setup reset everything`: Full reset including dataset connections (Tier 2) ## Trigger Phrase
npx skillsauth add ai-analyst-lab/ai-analyst .claude/skills/setupInstall 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.
Run a 4-phase conversational interview that populates the knowledge system
from the user's real context. Turns a blank .knowledge/ directory into a
fully configured analytical environment.
/setup status: Show current setup state/setup reset: Reset profile and preferences (Tier 1)/setup reset everything: Full reset including dataset connections (Tier 2)/setupset up my environmentconfigure the analystonboard medata/sales/.
I do not see that directory — did you mean data/?")null and move on. Never block progress
on optional fields.All setup state lives in .knowledge/setup-state.yaml. Create it on first
run if it does not exist.
# .knowledge/setup-state.yaml
setup_version: 1
started_at: "YYYY-MM-DDTHH:MM:SS"
last_updated: "YYYY-MM-DDTHH:MM:SS"
status: "complete" | "partial" | "in-progress"
phases:
role_and_team:
status: "complete" | "skipped" | "pending"
completed_at: "YYYY-MM-DDTHH:MM:SS" | null
data_connection:
status: "complete" | "partial" | "skipped" | "pending"
completed_at: "YYYY-MM-DDTHH:MM:SS" | null
partial_reason: null | "warehouse_mcp_needed"
business_context:
status: "complete" | "skipped" | "pending"
completed_at: "YYYY-MM-DDTHH:MM:SS" | null
preferences:
status: "complete" | "skipped" | "pending"
completed_at: "YYYY-MM-DDTHH:MM:SS" | null
Goal: Understand who the user is so we can adapt communication style, technical depth, and default output formats.
Group 1:
Group 2: 3. "What team or department are you on?" (optional) 4. "What domain does your product operate in? (e.g., e-commerce, SaaS, fintech, marketplace, healthcare, media)" (optional)
Write to .knowledge/user/profile.md (create directory if needed):
# User Profile
## Role & Expertise
- **Role:** {role}
- **Technical level:** {technical_level}
- **SQL comfort:** {inferred from technical_level: none|basic|intermediate|advanced}
- **Statistics comfort:** {inferred: none|basic|intermediate|advanced}
- **Domain:** {domain or "not specified"}
- **Team:** {team or "not specified"}
## Communication Preferences
_Set in Phase 4._
## Corrections Log
<!-- Format: YYYY-MM-DD | What was wrong | What was right -->
Update .knowledge/setup-state.yaml:
phases.role_and_team.status: completephases.role_and_team.completed_at to current timestampDisplay:
Phase 1 complete — Role & Team
Role: {role}
Tech level: {technical_level}
Domain: {domain}
Team: {team}
Next up: Phase 2 — Data Connection
Goal: Get the user's data connected so analyses can run.
Group 1:
If CSV:
data/, data/examples/)./connect-data type=csv)
to create the dataset brain and profile schema.If DuckDB:
/connect-data type=duckdb to set up the connection.If Cloud warehouse:
.claude/mcp.json with your credentials."/connect-data for full setup.partial with partial_reason: warehouse_mcp_needed.If Nothing yet / sample dataset:
data/examples/ for available sample datasets./connect-data type=csv.skipped, note that /connect-data
is available later.After Phase 2:
data_connection.status == "complete": data is available. Continue to
Phase 3.data_connection.status == "partial" (warehouse MCP needed): continue
to Phase 3 anyway. The user can finish data connection separately.data_connection.status == "skipped": continue to Phase 3.Dataset artifacts are created by the /connect-data skill (manifest.yaml,
schema.md, active.yaml). Phase 2 only tracks the interview state.
Update .knowledge/setup-state.yaml:
phases.data_connection.status appropriatelyphases.data_connection.completed_at or leave null if partial/skippedphases.data_connection.partial_reason if applicableDisplay:
Phase 2 complete — Data Connection
Source: {type} ({path or "pending MCP setup"})
Tables: {N} tables found (or "N/A — skipped")
Status: {connected | partial — warehouse setup needed | skipped}
Next up: Phase 3 — Business Context
Goal: Understand the business so analyses produce relevant insights, not just numbers.
Group 1:
Group 2: 3. "What business question or problem are you trying to answer right now? This helps me prioritize what to explore first." (optional) 4. "Are there any current OKRs or goals I should know about?" (optional)
Group 3 (if domain warrants it): 5. "Any key segments I should know about? (e.g., free vs paid users, regions, platforms)" (optional) 6. "Is there seasonality or known patterns in your data? (e.g., holiday spikes, end-of-quarter effects)" (optional)
Write to .knowledge/user/business-context.md:
# Business Context
## Company & Product
{company_description}
## Key Metrics
| Metric | Definition | Notes |
|--------|-----------|-------|
| {metric_1} | {definition or "TBD"} | {any notes} |
| {metric_2} | {definition or "TBD"} | |
## Current Focus
- **Primary question:** {business_question or "Not specified"}
- **OKRs/Goals:** {okrs or "Not specified"}
## Segments & Patterns
- **Key segments:** {segments or "Not specified"}
- **Seasonality:** {seasonality or "Not specified"}
If the user provided metrics and a dataset is connected, seed
.knowledge/datasets/{active}/metrics/index.yaml with stub entries for each
metric (name + empty definition). These can be fleshed out later with
/metrics.
Update .knowledge/setup-state.yaml:
phases.business_context.status: completephases.business_context.completed_atDisplay:
Phase 3 complete — Business Context
Product: {one-line summary}
Key metrics: {metric_1}, {metric_2}, {metric_3}
Focus: {business_question or "General exploration"}
Next up: Phase 4 — Preferences
Goal: Configure output style and communication preferences so results match what the user actually wants.
Group 1:
Group 2: 3. "How do you usually share results? (helps me format exports)
/export format list.Update .knowledge/user/profile.md — fill in the Communication Preferences
section:
## Communication Preferences
- **Detail level:** {detail_level}
- **Chart preference:** {chart_preference}
- **Narrative style:** {inferred: bullet-points for exec-summary, prose for deep-dive, mixed for standard}
- **Preferred exports:** {export_channels}
- **Custom notes:** {anything_else or "None"}
Update .knowledge/setup-state.yaml:
phases.preferences.status: completephases.preferences.completed_atstatus: complete (or partial if data_connection was partial)last_updatedAfter Phase 4, display the final summary:
=== SETUP COMPLETE ===
Role: {role} ({technical_level})
Domain: {domain}
Data: {dataset_name} — {N} tables ({source_type})
Key metrics: {metric_1}, {metric_2}, {metric_3}
Detail level: {detail_level}
Charts: {chart_preference}
Status: {"Ready for analysis" | "Partial — data connection pending"}
Get started:
- Ask a question: "What's our {metric_1} trend?"
- Explore data: /data
- Full pipeline: /run-pipeline
- Dev context: /setup-dev-context (optional — for development workflow preferences)
If setup status is partial, also display:
To finish data setup: /connect-data
Show the current setup state by reading .knowledge/setup-state.yaml.
Setup Status
============
Phase 1 — Role & Team: {status} {completed_at or ""}
Phase 2 — Data Connection: {status} {completed_at or ""}
Phase 3 — Business Context: {status} {completed_at or ""}
Phase 4 — Preferences: {status} {completed_at or ""}
Overall: {status}
Started: {started_at}
Updated: {last_updated}
If no setup-state.yaml exists:
Setup has not been started yet. Run /setup to begin.
Two-tier reset system to prevent accidental data loss.
/setup resetClears profile and preferences (Phase 1 + Phase 4 data). Does NOT touch data connections or business context.
What it does:
.knowledge/user/profile.mdphases.role_and_team and phases.preferences to pending in
setup-state.yamlstatus: partiallast_updatedConfirmation required: Ask once: "This will reset your role profile and output preferences. Your data connections and business context are safe. Continue? (yes/no)"
/setup reset everythingClears the entire setup — profile, preferences, business context, AND dataset connections. This is a destructive operation.
What it does:
.knowledge/user/profile.md.knowledge/user/business-context.md.knowledge/datasets/*/ directories.knowledge/active.yaml to active_dataset: null.knowledge/setup-state.yaml to all-pending statedata_sources.yaml entries added by setupConfirmation required: The user must type the exact phrase
reset everything to confirm.
Prompt:
This will erase your entire setup:
- User profile and preferences
- Business context
- All dataset connections and schema documentation
This cannot be undone.
To confirm, type: reset everything
If the user types anything other than reset everything, cancel the
operation: "Reset cancelled. Your setup is unchanged."
Phase 5 (development context) is opt-in and independent of the core setup flow. It covers development workflow preferences such as IDE, language, framework conventions, and code style preferences.
At the end of Phase 4, mention its existence:
Optional: Run /setup-dev-context to configure development workflow
preferences (IDE, languages, code style). This is independent of
your analytics setup.
This skill does NOT implement Phase 5. The /setup-dev-context skill
handles it separately.
When /setup is invoked and .knowledge/setup-state.yaml already exists:
pending.complete, display:
Setup is already complete. Use /setup status to review,
or /setup reset to start over.
Welcome back. Phases 1-2 are done. Picking up at Phase 3 —
Business Context.
partial, offer to complete it or skip:
Phase 2 (Data Connection) is partially complete — your warehouse
needs MCP configuration. Want to finish that now, or continue
to Phase 3?
/connect-data and are stored in manifest.yaml
or environment variables only./setup reset is always Tier 1.
Tier 2 requires the explicit reset everything phrase.| Scenario | Handling |
|----------|----------|
| User runs /setup but profile.md already exists | Warn and ask to confirm overwrite before proceeding |
| CSV path does not exist | Suggest alternatives, check data/ and data/examples/ |
| User provides warehouse type but no MCP | Mark Phase 2 as partial, continue interview |
| User skips all optional fields | That is fine. Record nulls and proceed. |
| User wants to jump to a specific phase | Allow it: "/setup phase 3" resumes from Phase 3 |
| Session ends mid-interview | State is saved per-phase. Next /setup resumes. |
| /setup called inside a pipeline | Warn: "Setup changes may affect the running pipeline. Finish the pipeline first, or continue at your own risk." |
| User gives contradictory answers | Ask once for clarification. Record what they confirm. |
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