Chain small agents that clean data, analyse it and write a summary
Idea + starter prompt, not run by us yet
For: Data analysts who repeat the same clean, analyse and report routine
A data analyst named Bronson had an AI tool draft a 713-line spec, then let Claude Code build from it. In about five hours it produced five agents for cleaning, analysis, charts, the report and the summary, plus a command that runs them in sequence. It wrote and repaired its own tests, ending with 627 passing. Not yet tried on real work data, and results still need an analyst's review.
Steps
- Write the specification first. The author found it the hard part.
- Describe each agent's job and its input and output files.
- Let Claude Code build one agent at a time and approve its permissions as it asks.
- Run the whole chain on a made-up or public data set and read every output.
- Before using real work data, check what is allowed to leave your machine. Have an analyst review the summary.
Starter prompt
Trial first: build and run the whole chain on a small public sample data set, [sample CSV], in a new folder called [pipeline-trial]. Do not point it at my real data. I want a small pipeline of five agents: one cleans the data, one analyses it, one draws charts, one writes the report and one writes the executive summary. Add one command that runs them in order and passes files between them. First write the specification: what each agent reads and writes and how it handles missing or odd values. Show it to me and wait. Then build and test one agent at a time. Stop and wait for my yes before you install anything and before you run it on [CSV file], my real data. It reads and writes only inside the project folder. A good result on sample data is not permission to use mine.
Original post: bronsonelliott.substack.com · found via agentusecases.ai. Written up in our own words. We haven't run it, so test it on made-up data first.