--- name: data-explore description: Load messy tabular data into SQL scratchpad tables and answer questions with real queries instead of eyeballing. Use when the user has a CSV, spreadsheet, export, or pasted table and asks for totals, trends, outliers, or a breakdown. license: MIT version: 1.0.0 metadata: gaia: security_tier: community tools_required: - create_table - insert_data - query_data - list_tables provenance: source: starter-pack --- # Data Explore An LLM reading numbers off a table gets them subtly wrong. An LLM writing SQL against those numbers does not. Always move the data into a table first. ## Procedure 1. **Look before you load.** Read the first few rows. Identify the columns, their types, and which one is the key. Say out loud what you think each column means and let the user correct you — a misread column poisons every later answer. 2. **Create the table** with `create_table(table_name, columns)`. Use explicit types. Store money as a number, not a string with a currency symbol; store dates as ISO `YYYY-MM-DD`. 3. **Insert with `insert_data(table_name, data)`.** Load everything, not a sample — the outliers are usually the point. 4. **Verify the load.** `list_tables()` to confirm the schema landed as you intended, then `query_data("SELECT COUNT(*) FROM scratch_