connect-data
Skill304 starsChanged 2 months agoMITView on GitHub
Guided wizard to connect a new dataset to the AI Analyst system. Use this skill whenever the user wants to add a new data source, connect a database, set up data access, or configure a new dataset for analysis. This skill handles the full connection workflow: choosing connection type (CSV, DuckDB, PostgreSQL, Snowflake, BigQuery, Databricks, Redshift, SQL Server, MySQL), collecting credentials, validating connectivity, profiling schema, and setting up the knowledge brain. Trigger this skill when users say things like "/connect-data", "connect my database", "add a new dataset", "set up my data", "I have a database I want to analyze", "can you connect to my Postgres/BigQuery/Snowflake", "I need to add CSV files", "how do I get my data into this system", or "connect to my warehouse". Also trigger after first-run welcome when users need to set up their first dataset, or after /switch-dataset when the target dataset doesn't exist yet. This is the primary entry point for all new data connections — always offer this when users mention having data they want to analyze but haven't connected yet.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- link7373/agentic-bi-teamtheir own version, first seen Sep 23, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- link7373/agentic-bi-team★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository65 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- always-compareSkill
- analysis-designSkill
- analyst-coreSkill
- archaeologySkill
- archive-analysisSkill
- auth-preflightSkill
- businessSkill
- causalSkill
- chart-to-driveSkill
- close-the-loopSkill
- codex-reviewSkill
- compare-datasetsSkill
- connect-snowflakeSkill
- context-compareSkill
- context-traceSkill
- data-inspectSkill
- data-mapSkill
- data-profilingSkill
- data-quality-checkSkill
- datasetsSkill
- distribution-profilerSkill
- evalSkill
- evaluate-graderSkill
- experiment-briefSkill
- experimentSkill
- exploreSkill
- exportSkill
- forecastSkill
- google-doc-exportSkill
- google-slides-exportSkill
- guardrailsSkill
- historySkill
- improve-contextSkill
- knowledge-bootstrapSkill
- log-correctionSkill
- maintain-contextSkill
- metric-specSkill
- metricsSkill
- monitor-evalsSkill
- notion-exportSkill
- paceSkill
- patternsSkill
- question-framingSkill
- question-routerSkill
- reliabilitySkill
- resume-pipelineSkill
- run-pipelineSkill
- runsSkill
- score-analysisSkill
- session-handoffSkill
- setup-dev-contextSkill
- setup-notionSkill
- setupSkill
- setup-slackSkill
- setup-snowflakeSkill
- srm-checkSkill
- stakeholder-communicationSkill
- stress-testSkill
- switch-datasetSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. About 0 are common, 13 are distinctive, and 15 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
15
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
After /switch-dataset when the target dataset doesn't exist yet
- Very specific: line 25
Parameter Handling: If the user provides type={connection_type} (e.g., type=bigquery, type=postgres), SKIP Step 1 entirely and proceed …
- Distinctive: line 46
Ask: "What's the path to your CSV directory?
- Distinctive: line 47
Verify the directory exists and contains .csv files
- Distinctive: line 51
Ask: "Path to your .duckdb file?"
- Very specific: line 53
Test connection with SELECT 1
- Distinctive: line 57
Ask for: server_hostname, http_path (both from the SQL warehouse "Connection details" panel), catalog, schema
- Distinctive: line 63
Ask for the GCP project id and BigQuery dataset name
- Very specific: line 64
Use Application Default Credentials for local development.
- Distinctive: line 66
Never ask for a service-account JSON key in chat and never copy one into the repository.
- Very specific: line 67
After writing the manifest, verify with ConnectionManager(dataset_id=...).verify_remote() before declaring success.
- Very specific: line 73
Ask the user to fill in host, port, database, schema, and username.
- Very specific: line 75
IMPORTANT: Never ask for or store passwords directly.
- Very specific: line 78
After writing the manifest, verify with ConnectionManager(dataset_id=...).verify_remote() before declaring success (remote opt-in: …
- Very specific: line 92
Write manifest.yaml from the connection template + user inputs
- Very specific: line 93
Create empty quirks.md with section headers
- Very specific: line 99
Use ConnectionManager from helpers/data/connection_manager.py:
- Distinctive: line 110
If fails: show error, offer to retry or edit config
- Very specific: line 111
If it passes, call verify_remote() and show the remote identity before proceeding.
- Distinctive: line 112
If the selected source resolves to DuckDB, CSV, or another fallback, stop.
- Very specific: line 120
Call mgr.list_tables() to enumerate tables
- Very specific: line 129
Update .knowledge/active.yaml to point to the new dataset
- Distinctive: line 136
Never store credentials in plain text in manifest files
- Distinctive: line 137
Always test the connection before declaring success
- Distinctive: line 138
Always generate a schema.md — it's required for analysis
- Very specific: line 139
Create the full .knowledge/datasets/{id}/ tree even if profiling fails
- Distinctive: line 140
If the user already has this dataset, ask before overwriting
- Distinctive: line 144
No CSV files found: Check for other formats (.parquet, .json)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Once a CSV folder is registered, it is SQL-queryable through
ConnectionManager().query(sql): each file becomes a table named after its file stem (orders.csv->orders), and the manifest'sfiles:list is the table inventory. Every query is auto-logged for provenance.
Skill: Connect Data
Purpose
This is an interactive setup wizard, not a documentation generator. Guide the user through the actual connection process by executing each step, creating files, testing connectivity, and setting up the knowledge system. Do not just explain what would happen — make it happen.
When to Use
- User says
/connect-dataor "connect my database" or "add a new dataset" - First-run welcome suggests connecting data
- After
/switch-datasetwhen the target dataset doesn't exist yet
Invocation
/connect-data — start the connection wizard
/connect-data type=postgres — skip type selection and go directly to Step 2
Parameter Handling: If the user provides type={connection_type} (e.g., type=bigquery, type=postgres), SKIP Step 1 entirely and proceed directly to Step 2 with that connection type already selected.
Instructions
Step 1: Choose Connection Type
Skip this step if type parameter was provided in the invocation.
Present options:
- CSV files — "I have CSV files in a local directory"
- DuckDB — "I have a local DuckDB database file"
- PostgreSQL — "I have a PostgreSQL database"
- Snowflake — "I have a Snowflake warehouse"
- BigQuery — "I have a Google BigQuery dataset"
- Databricks — "I have a Databricks SQL warehouse"
- Redshift — "I have an Amazon Redshift cluster"
- SQL Server — "I have a Microsoft SQL Server / Azure SQL database"
- MySQL — "I have a MySQL or MariaDB database"
Step 2: Collect Connection Details
For CSV:
- Ask: "What's the path to your CSV directory? (relative to this repo)"
- Verify the directory exists and contains .csv files
- List found files and ask to confirm
For DuckDB:
- Ask: "Path to your .duckdb file?"
- Verify file exists
- Test connection with
SELECT 1
For Databricks:
- Copy
connection_templates/databricks.yaml.example - Ask for: server_hostname, http_path (both from the SQL warehouse "Connection details" panel), catalog, schema
- Store the personal access token in
.envas$DATABRICKS_TOKEN(never inline)
For BigQuery:
- Copy
connection_templates/bigquery.yaml.example - Ask for the GCP project id and BigQuery dataset name
- Use Application Default Credentials for local development. Ask the user to complete
gcloud auth application-default loginthemselves if ADC is not already available. - Never ask for a service-account JSON key in chat and never copy one into the repository.
- After writing the manifest, verify with
ConnectionManager(dataset_id=...).verify_remote()before declaring success.
For PostgreSQL / Redshift / SQL Server / MySQL:
- Copy the matching template from
connection_templates/(postgres,redshift,mssql,mysql) - Ask the user to fill in host, port, database, schema, and username. MySQL keys
information_schemaby database and SQL Server defaults to thedboschema. - IMPORTANT: Never ask for or store passwords directly. Put the password in
.envas an env var (e.g.,$REDSHIFT_PASSWORD,$MSSQL_PASSWORD,$MYSQL_PASSWORD) and reference it from the manifest. - After writing the manifest, verify with
ConnectionManager(dataset_id=...).verify_remote()before declaring success (remote opt-in:AAP_USE_REMOTE=1/use_remote: true).
For Snowflake:
- Route to the dedicated setup wizard: "Run
/setup-snowflakefor guided Snowflake setup — it selects the approved authentication method, stores the credential in.env, and verifies you are live on the warehouse before finishing."
Step 3: Create Dataset Brain
- Generate a dataset_id from the display name using lowercase letters with hyphens (NOT underscores).
- Example: "Production Analytics" →
production-analytics - Example: "GA4 Event Data" →
ga4-event-data - Example: "Sales Database" →
sales-database
- Example: "Production Analytics" →
- Create
.knowledge/datasets/{id}/directory - Write
manifest.yamlfrom the connection template + user inputs - Create empty
quirks.mdwith section headers - Create empty
metrics/index.yaml
Step 4: Test Connection
You MUST use ConnectionManager — do not write custom connection scripts.
Use ConnectionManager from helpers/data/connection_manager.py:
- Instantiate with the new config:
from helpers.data.connection_manager import ConnectionManager config = {"type": connection_type, "dataset_id": dataset_id, ...} mgr = ConnectionManager(config=config) - Call
test_connection():result = mgr.test_connection() - If fails: show error, offer to retry or edit config
- If it passes, call
verify_remote()and show the remote identity before proceeding. - If the selected source resolves to DuckDB, CSV, or another fallback, stop. Do not describe the remote connection as successful.
Why ConnectionManager? It handles connection pooling, error handling, and provides a consistent interface across every supported source type. Do not bypass it with psycopg2, pandas, or warehouse-specific clients.
Step 5: Profile Schema
Use ConnectionManager methods — do not write raw SQL for schema introspection.
- Call
mgr.list_tables()to enumerate tables - For each table: get column names and types via
mgr.get_table_schema(table_name) - Generate
schema.mdusingschema_to_markdown()fromhelpers/data/data_helpers.py - Write to
.knowledge/datasets/{id}/schema.md - Offer to run full data profiling: "Want me to deep-profile this dataset?"
Why? ConnectionManager abstracts away warehouse-specific schema queries (INFORMATION_SCHEMA for Postgres/BigQuery, PRAGMA for DuckDB, pandas for CSV).
Step 6: Set Active
- Update
.knowledge/active.yamlto point to the new dataset - Confirm: "Connected! {display_name} is now your active dataset."
- Show: table count, estimated row count, date range (if detected)
- Suggest next steps:
/exploreto browse,/metricsto define metrics, or just ask a question
Rules
- Never store credentials in plain text in manifest files
- Always test the connection before declaring success
- Always generate a schema.md — it's required for analysis
- Create the full .knowledge/datasets/{id}/ tree even if profiling fails
- If the user already has this dataset, ask before overwriting
Edge Cases
- Directory doesn't exist: Offer to create it
- No CSV files found: Check for other formats (.parquet, .json)
- Connection fails repeatedly: Suggest checking credentials, firewall, VPN
- Schema too large (>100 tables): Profile only, skip per-table details
- Dataset name collision: Append a number (e.g., "mydata-2")
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

