SKILL.md
CSV analyse
When to use
The user has a CSV file (uploaded, written to the filesystem, or inline) and wants a structured summary or statistical analysis.
Examples:
- "Summarise sales.csv"
- "What columns are in this file and what do they contain?"
- "Give me descriptive stats for the numeric columns"
- "Count missing values per column"
Steps
- Locate the CSV. If the user mentioned a filename, call
fslistandfsreadunderuploads/or their chosen folder to get the content as a string. If the content is in a previous tool result or an attachment, pass it directly asstdin.
- Run the bundled analyser. Call:
`` runskillscript({ name: "csv-analyse", path: "scripts/analyse.py", stdin: <the CSV content as a string> }) `` The script reads stdin, uses pandas to profile the data, and prints a JSON report to stdout.
- Parse the JSON. The stdout is a single JSON object with keys:
shape,columns,dtypes,missing,numericsummary,categoricalsummary,head. Show the user the bits they asked for — don't dump the whole thing unless they asked for "everything".
- Offer follow-ups. Use
offer_choiceswith 3-5 relevant next steps, e.g.:
- "Plot the distribution of [numeric column]" - "Filter rows where [condition]" - "Export the summary to a Word document" - "Correlate these columns"
Style
- Present the shape (rows × cols) first — it's the most useful single fact.
- Show missing-value percentages only where > 0.
- Round numeric summaries to 3 significant figures.
- If the file is big (>10k rows), mention that analysis used the full file, not a sample.
What not to do
- Don't guess column meanings. If a column name is ambiguous, ask the user.
- Don't dump the full CSV back in the chat. The user already has it.
- Don't run the analysis if the input looks like it's not a CSV (check for delimiters in the first line). Ask for clarification instead.