Analyze a data file and report the patterns
Point Claude Code at a CSV or other data file; it checks the data, computes the key patterns with code and writes them to a report file.
Task: Analyze a data file and report the patterns · Other tasks
Fill in the details
A file inside your project folder. Type @ in Claude Code to pick the path.
Optional. Without it, Claude picks a name next to the data file.
Optional. Gives the summary a focus.
Copy your prompt
This site doesn't run Claude or show model output. Results depend on your input and the model you use.
You've edited the prompt, so changes to the fields aren't applied.
Replace what you've entered for this task with the example? This can't be undone.
What you type is kept in this tab's session storage so a reload doesn't lose it. Use "Clear this task" to remove it. Browsers can restore session data when they reopen tabs, so closing a tab isn't a guaranteed way to erase it.
When to use this template
- You have a one-off question about a CSV, spreadsheet export or JSON file and would rather describe it than write a script or build a pivot table.
- The file is already in your project folder, so Claude Code can read it. Reference it with @ and the path, or copy the export into the folder first. This site cannot attach files.
- You want the numbers computed by a script you can rerun next month, not estimated from a quick look at the rows.
When not to use it
- The data lives in a database or an analytics tool and changes often. Connect it through an MCP server instead of exporting a file each time.
- The file contains personal or confidential data that your policy does not allow an AI tool to read. Remove or mask those columns first.
- You need an audited figure for finance, compliance or a public report. Treat this as exploration and confirm the final numbers in your usual reporting tool.
Why this structure
- Checking the data first, with row counts, types and quality problems, puts broken exports and odd values in front of you before you read any findings built on them.
- Asking Claude to compute every number with code, and to keep the script, means each figure comes from something you can rerun and inspect.
- The output choice is a select, so you decide the format up front: an HTML page with charts for sharing, Markdown for notes, or a CSV for further work.
- The rule against changing the original file tells Claude to create new files only and leave your source data as it was.
- The closing request for three findings and the data problems gives you a short answer even when the report itself is long, and puts the limits next to the findings.
Example input (fictional)
- Data file
@reports/q1-signups.csv
- Output
a new HTML page with charts
- Output file name
reports/q1-signups-summary.html
- The question you care most about
Which channels bring signups that stay past the first week?
Follow-ups to send Claude
- Open the script you wrote and explain each step in one line, so I can check the calculations.
- Split the main finding by month and tell me whether it holds in every month or only in some.
- Write a short paragraph for a status update with the two findings that matter most and the caveats.
Common mistakes
- Not saying what a vague column means, such as "status" or "type". Claude may guess, and every pattern built on that guess is suspect. Answer its questions from step 1.
- Reading the charts without reading the data check. Duplicates or a missing month can create a trend that is not real.
- Asking for "insights" with no question. Add the question you care about so the summary focuses on it instead of listing everything.
Related templates
- Extract data to JSON: Pull specific fields out of messy text into JSON that matches your field list, with clear rules for missing or ambiguous values.
- Generate ad variations from performance data: Have Claude Code read your ad performance export, find the weakest headlines and write new variations that fit your character limit.
- Connect a tool to Claude Code with MCP: Name a tool and the data you need; Claude Code finds a trustworthy MCP server, shows the add command first, connects it and checks it with one read.
Sources
- Claude Code docs: Prompt library (Anthropic documentation)
- Claude Code docs: Reference files and directories (Anthropic documentation)
- Claude Code best practices: Give Claude a way to verify its work (Anthropic documentation)
- Anthropic blog: How Anthropic teams use Claude Code (Anthropic documentation)