跳到正文
FunCoding

data-explore

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.

Star
1,580
许可证
MIT
最近提交
2026年10月13日

hub/skills/data-explore/SKILL.md

在 GitHub 上查看

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_<table>") and compare to the source row count. If they differ, find out why before answering anything.
  5. Answer with query_data(sql). One query per question. Show the SQL you ran alongside the result so the user can check your reasoning.
  6. Say what the data cannot tell you. Missing rows, nulls, and a single month of history are all limits worth naming.

The prefix rule

Every table name in a query carries the scratch_ prefix. A table created as create_table("sales", ...) is queried as SELECT ... FROM scratch_sales. Getting this wrong is the single most common failure here — the query errors instead of returning data, and no amount of rephrasing the question fixes it.

Cleaning rules

  • Trim whitespace and normalize case before comparing text keys.
  • Nulls and zeros are different. Never coerce one to the other silently.
  • If a column mixes formats (dates as both 01/02/24 and 2024-02-01), normalize on load and tell the user you did.

Fork this

Pin step 2 to your recurring export's exact schema and step 5 to the five questions you always ask of it — the skill becomes a one-command monthly report.

相似的 Skill

精选

pdf

提取文本和表格、合并拆分、填写表单,也能对扫描件做 OCR。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

canvas-design

按设计理念生成海报和视觉作品,输出 PNG 或 PDF。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

docx

创建和编辑 Word 文档,支持目录、页码、页眉等排版。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

doc-coauthoring

按步骤协作撰写技术方案、提案和决策文档,逐轮修改。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

xlsx

读写 Excel 和 CSV,处理公式、格式、图表与数据清洗。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

pptx

生成、读取和修改演示文稿,也能合并拆分幻灯片。

ANanthropics/skills181k近 7 天新增 1,119 个 star