Agent skill

Switch Dataset

by ai-analyst-lab in ai-analyst-lab/ai-analyst

Change the active dataset to switch between different data sources for analysis.

MITAuto-check passed

Install Switch Dataset

skills CLI
$ npx skills add ai-analyst-lab/ai-analyst --skill switch-dataset -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ai-analyst-lab/ai-analyst switch-dataset --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/switch-dataset .claude/skills/switch-dataset && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
switch-dataset
GitHub stars
304
Token cost
~1.5k tokens
SKILL.md length
653 words
Files
1
Skills in repo
43
Repo updated
First seen
Licence
MIT

At a glance

Change the active dataset to switch between different data sources for analysis.

  • Works in 6 steps: Validate the target dataset → Check if already active → Validate the data brain exists → …
  • The user wants to analyze a different dataset
  • SKILL.md covers Purpose, When to Use, Instructions and Anti-Patterns
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Switch Dataset is an agent skill from ai-analyst-lab/ai-analyst. Change the active dataset to switch between different data sources for analysis. Use this skill whenever the user wants to analyze a different dataset, switch to another database, change data sources, work with different tables, or explicitly invokes /switch-dataset. This skill handles the full switch workflow: validating the target dataset exists, checking for in-progress work that might be lost, updating the active pointer, and confirming the switch with a summary of the new dataset. Apply when users say things…

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: AI Product Analyst — Claude Code-powered data analysis toolkit. The licence is MIT.

When your agent uses it

  • The user wants to analyze a different dataset
  • Switch to another database
  • Change data sources
  • Work with different tables

Example prompts

  • “switch to sales data”
  • “use the other dataset”
  • “change to production database”
  • “/switch-dataset”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Validate the target dataset
  2. Check if already active
  3. Validate the data brain exists
  4. Check for in-progress work (CRITICAL SAFETY CHECK)
  5. Update the active pointer
  6. Confirm the switch

What it can do on your machine

Read from SKILL.md and the folder at commit 52c0744. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Switch Dataset loads about 1.5k tokens when it runs. Until then it costs about 231 tokens; SKILL.md has 653 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~231
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ai-analyst-lab/ai-analyst at commit 52c0744, republished under its MIT licence (© ai-analyst-lab). 653 words, ~1,504 tokens.

Download SKILL.mdSave it as .claude/skills/switch-dataset/SKILL.md (or your agent's skills folder).
name
switch-dataset
description
Change the active dataset to switch between different data sources for analysis. Use this skill whenever the user wants to analyze a different dataset, switch to another database, change data sources, work with different tables, or explicitly invokes /switch-dataset. This skill handles the full switch workflow: validating the target dataset exists, checking for in-progress work that might be lost, updating the active pointer, and confirming the switch with a summary of the new dataset. Apply when users say things like "switch to sales data", "use the other dataset", "change to production database", "work with the marketing tables instead", "let's look at last month's data instead", "/switch-dataset analytics", or any request to change which dataset is currently being analyzed. Also trigger when starting a new analysis if the user mentions a dataset name that differs from the currently active one.

Skill: Switch Dataset

Purpose

Change the active dataset. Updates the active pointer, validates the target dataset exists, and confirms with a summary of what's now active.

When to Use

Invoke as /switch-dataset {name} when the user wants to analyze a different dataset than the currently active one.

Instructions

Step 1: Validate the target dataset
  1. List available datasets by checking .knowledge/datasets/ directory for subdirectories with manifest.yaml files
  2. Normalize the target name to lowercase for comparison (handles SALES-DATA → sales-data)
  3. If {name} matches exactly (case-insensitive), proceed to Step 2
  4. If not found, try fuzzy matching:
    • Check if {name} is a substring of any dataset name (e.g., "marketing" would match "marketing-prod")
    • Case-insensitive partial match
    • If exactly one match found, use that dataset and inform user: "Matched '{name}' to '{actual_dataset_name}'"
    • If multiple matches found, list all matches and ask user to choose
  5. If still not found, list all available datasets with brief descriptions (from manifests) and ask user to choose or suggest running /connect-data to add a new dataset
Step 2: Check if already active
  1. Read .knowledge/active.yaml to get the current active_dataset
  2. If {name} matches the current active dataset (case-insensitive):
    • Inform the user: "The {name} dataset is already active."
    • Display the current dataset summary (same format as Step 6)
    • List other available datasets they could switch to instead
    • STOP here (do not proceed to Step 3)
Step 3: Validate the data brain exists
  1. Check that .knowledge/datasets/{name}/manifest.yaml exists
  2. If it doesn't exist, suggest: "Dataset '{name}' directory exists but has no manifest. Run /connect-data to set it up."
  3. If manifest is missing, STOP (do not proceed)
Step 4: Check for in-progress work (CRITICAL SAFETY CHECK)

This step prevents accidental loss of analytical work. When you switch datasets, files in working/ become contextually orphaned — they contain SQL queries, charts, and data tied to the OLD dataset's schema and tables, which won't match the NEW dataset's structure. This doesn't delete the files, but it makes resuming that work much harder because the context has changed.

Why explicit confirmation is required: Users often have hours of work in the working/ directory. A dataset switch mid-analysis can make that work difficult or impossible to resume without manually reconnecting the artifacts to the original dataset.

  1. List all files in working/ directory (exclude .gitkeep and hidden files like .DS_Store)
  2. If 3 or more files exist:
    • Warn: "⚠️ You have {count} files in progress for {old_dataset}, including: [list first 3-5 files]. Switching datasets now may make that work harder to resume. Continue anyway?"
    • Provide two explicit options:
      • "Type 'yes' to proceed with the switch"
      • "Type 'no' to cancel and stay on {old_dataset}"
    • HALT and wait for user response
    • If user says "no" or "cancel" or "wait": STOP immediately and inform them the switch was cancelled
    • If user says "yes" or "continue" or "proceed": Continue to Step 5
  3. If fewer than 3 files exist, proceed directly to Step 5 (no confirmation needed — minimal risk of context loss)
Show full SKILL.md (159 more words)Show less
Step 5: Update the active pointer
  1. Read .knowledge/active.yaml
  2. Update active_dataset to {name} (use the exact case from the manifest)
  3. Write updated .knowledge/active.yaml
Step 6: Confirm the switch

Read the target dataset's manifest.yaml and display a confirmation summary using this format:

✓ Switched to: {name}
Tables: {count of tables in manifest}
Date range: {date_range.start} to {date_range.end} (or "not specified" if missing)
Connection: {connection_type}
Last analysis: {last_used or "never"}
Row counts: {summary of top 3 tables by row count with table names, or list all if ≤3 tables}

Example:

✓ Switched to: analytics_prod
Tables: 6
Date range: 2024-01-01 to 2026-03-31
Connection: snowflake
Last analysis: 2026-04-01
Row counts: fct_orders (245K), fct_sessions (1.2M), dim_users (89K)

If the user had in-progress work and proceeded anyway, add a reminder for how to switch back:

→ To return to {old_dataset}, run: /switch-dataset {old_dataset}

Anti-Patterns

  1. Never silently switch — always confirm with a summary
  2. Never skip the in-progress work check — if working/ has 3+ artifacts, HALT and require explicit user confirmation before proceeding
  3. Never infer the dataset — only switch when explicitly requested via this skill
  4. Never fail on case mismatch — normalize to lowercase for comparison (SALES-DATA should match sales-data)
  5. Never assume data_sources.yaml exists or is populated — it may be empty, use .knowledge/datasets/ directory listing as source of truth
  6. Never re-switch to an already-active dataset — detect this in Step 2 and inform user instead of performing redundant operations

© ai-analyst-lab, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/switch-dataset of ai-analyst-lab/ai-analyst.

Open the folder on GitHubat commit 52c0744

Compare with similar skills

Switch Dataset next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Switch Dataset compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Switch Dataset this skillai-analyst-lab/ai-analyst304—~1.5kAutomated safety check: PassMIT
DatasetsArize-ai/phoenix12k—~1.6kAutomated safety check: PassCustom licence
Source Mapsthedaviddias/Front-End-Checklist74k—~445Automated safety check: PassMIT
Switch Extension SourceBlackBeltTechnology/pi-agent-dashboard315—~986Automated safety check: PassMIT
Modeling Activation MetricsPostHog/posthog40k—~1.4kAutomated safety check: PassCustom licence
Dataset Curationwshobson/agents40k—~2kAutomated safety check: PassMIT

Similar skills

  • Datasets

    Arize-ai/phoenix

    Understand what a Phoenix dataset is and reason well about its examples, outputs, splits, and how it feeds evaluators and experiments.

    12k GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Source Maps

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing slow page loads, heavy assets, or rendering delays related to Provide source maps for production debugging.

    74k GitHub stars~445 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Switch Extension Source

    BlackBeltTechnology/pi-agent-dashboard

    Switch a monorepo extension/skill package between its published npm source and its local working-tree source, guaranteeing exactly one source per package.

    315 GitHub stars~986 tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Build reusable activation models — an activation-rate metric and a per-user/per-account activated flag — on either PostHog data-warehouse views (HogQL) or an external dbt project.

    40k GitHub stars~1.4k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Dataset Curation

    wshobson/agents

    Prepare, format, and validate datasets for supervised fine-tuning and preference training.

    40k GitHub stars~2k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Arize Dataset

    github/awesome-copilot

    Official

    Creates, manages, and queries Arize datasets and examples. An agent skill from github/awesome-copilot.

    40k GitHub starsUsed in 1 repo~3.9k tokens
    Testing & QAAuto-check: notes

More from ai-analyst-lab/ai-analyst

All 43 skills in this repo
  • Always Compare

    ai-analyst-lab/ai-analyst

    Never present a metric or number in isolation; anchor every number to a comparison (prior period, benchmark, or another segment) or state that none is available.

    304 GitHub stars~1.4k tokensUpdated 8 days ago
    Auto-check passed
  • Archaeology

    ai-analyst-lab/ai-analyst

    Retrieve proven SQL patterns, table cheatsheets, and join patterns from .knowledge/query-archaeology/ so past work gets reused.

    304 GitHub stars~1.3k tokensUpdated 8 days ago
    Auto-check passed
  • Archive Analysis

    ai-analyst-lab/ai-analyst

    Save completed analyses to the knowledge system's analysis archive for future reference.

    304 GitHub stars~2.7k tokensUpdated 8 days ago
    Auto-check passed
  • Auth Preflight

    ai-analyst-lab/ai-analyst

    Verify Google Workspace MCP authentication at the start of any session that needs Google APIs (Docs, Slides, Drive).

    304 GitHub stars~3.1k tokensUpdated 8 days ago
    Auto-check passed
  • Causal

    ai-analyst-lab/ai-analyst

    Causal inference toolkit for when experiments are not possible: estimate treatment effects from observational data with assumption checks and mandatory caveats.

    304 GitHub stars~1.8k tokensUpdated 8 days ago
    Auto-check passed
  • Chart To Drive

    ai-analyst-lab/ai-analyst

    Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides.

    304 GitHub stars~1.4k tokensUpdated 8 days ago
    Auto-check passed

Questions about Switch Dataset

What does Switch Dataset do?

Change the active dataset to switch between different data sources for analysis. Switch Dataset is an agent skill from ai-analyst-lab/ai-analyst. Change the active dataset to switch between different data sources for analysis.

When should I use Switch Dataset?

Switch Dataset fits situations like: the user wants to analyze a different dataset; switch to another database; change data sources; work with different tables.

How do I install Switch Dataset in Claude Code?

Run `npx skills add ai-analyst-lab/ai-analyst --skill switch-dataset -a claude-code`. Or copy the skill folder (.claude/skills/switch-dataset in ai-analyst-lab/ai-analyst) into .claude/skills/switch-dataset in your project. Claude Code loads it when a task matches its description.

How do I install Switch Dataset in Codex?

Run `npx skills add ai-analyst-lab/ai-analyst --skill switch-dataset -a codex`. Or copy the skill folder (.claude/skills/switch-dataset in ai-analyst-lab/ai-analyst) into .agents/skills/switch-dataset in your project. Codex loads it when a task matches its description.

Can I use Switch Dataset in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ai-analyst-lab/ai-analyst --skill switch-dataset -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/switch-dataset, .gemini/skills/switch-dataset, .github/skills/switch-dataset and .opencode/skills/switch-dataset in your project.

What does Switch Dataset need to run?

SKILL.md names no scripts, command-line tools or credentials: Switch Dataset is instructions for the agent only.

Does Switch Dataset access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Switch Dataset safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Switch Dataset use?

Switch Dataset is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Switch Dataset use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Switch Dataset?

Skills that share tags, products or a category with Switch Dataset: Datasets (Arize-ai/phoenix, 12k stars), Source Maps (thedaviddias/Front-End-Checklist, 74k stars), Switch Extension Source (BlackBeltTechnology/pi-agent-dashboard, 315 stars) and Modeling Activation Metrics (PostHog/posthog, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Switch Dataset?

ai-analyst-lab (a GitHub organization) maintains it in ai-analyst-lab/ai-analyst, which has 304 GitHub stars. The repository holds 43 skills in this directory. The repository was last updated on September 30, 2026.

Source: ai-analyst-lab/ai-analyst on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.