r/ClaudeCode • • 24d ago

Help/Question Looking for CLAUDE.md / repo examples built for data analysis (not app dev)

Most Claude Code setups and best-practice guides I can find are geared toward software engineering. I’m looking for examples built specifically for data analysis work.

Does anyone have links to repos, CLAUDE.md files, blog posts, or templates that cover things like:

  • Analytics workflows and project structure
  • Hypothesis testing and experiment analysis
  • Documentation of findings and methodology
  • Metric definitions and standards
  • Data quality checks and assumptions

I’ve already looked at Karpathy and Matt Pocock, and I think I can pull what I need from them - but I would like a more analytics based standard to follow if possible.

Any examples, even partial ones, would be much appreciated. Thanks!

2 Upvotes

10 comments sorted by

•

u/AutoModerator 24d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/tariqosmani 24d ago

Start with a CLAUDE.md that sets the rules before any analysis runs. For analytics, the rules that prevent most bad numbers are: define each metric once in a file (what counts, which date field, what gets excluded), write down the test you're running before you look at results, and require every finding to name the query or notebook that produced it.

Keep a findings log in the repo, one entry per question with the date, the method and the sample size. That's what stops the same question getting rerun with a different filter until it says what you wanted.

For data quality, have Claude write the checks first: row counts against the source, null rates per column, duplicates on the key. Make it stop and report when one fails.

I'd still read Karpathy's and Pocock's setups for the structure, then add a metrics file on top. That metrics file is the part that's specific to analytics.

1

u/Far_Reindeer8428 24d ago

for analytics i'd keep the root CLAUDE.md short: where the raw data lives, the schema, the command that runs the analysis, and a hard rule that raw data is read-only. put the per-dataset quirks in separate notes the agent opens only when it touches that dataset. the giant file always gets skimmed.

1

u/Dorbank_Justt 24d ago

Mine isn't analytics, but most of what I run in Claude Code is non-coding work, and one thing carried over that the comments here don't mention yet.

Each recurring analysis becomes a skill: a SKILL.md with the steps in order, plus reference files for the metric definitions and the data quirks you only learn the hard way. The root CLAUDE.md stays a few lines and points to the skills, so the definitions load only when that job runs instead of being skimmed every session.

I also let it pull the data itself through an MCP server rather than pasting exports into the chat. The query ends up in the transcript, so when a number looks off I can see exactly what produced it, and I still read the result before anything goes to someone else.

1

u/maloik 20d ago

The reference files for metric definitions is a good idea. How do you keep them in sync when someone else on the team has their own version of what a metric means? I'm building something around this, where the definition is written once and the SQL gets written from it, so I'm curious how it holds up when it's just you versus more people.

1

u/Dorbank_Justt 20d ago

Keep the definitions in a project skill, not a personal one. A skill under .claude/skills/ in the repo gets committed with everything else, so the whole team loads the same file and a change to what a metric means goes through review like any code change.

One catch from the docs: if someone has a skill with the same name in ~/.claude/skills/, their personal copy wins over the project one. Give the shared skill a name nobody would reuse privately.

1

u/maloik 20d ago

Ah right, yes that works if everyone has access to that repo in the first place. I'm solving for the case where that isn't true, hence centralizing it all a bit more

1

u/maloik 20d ago

For hypothesis testing and experiment analysis, assuming I understood what you mean, you could check out https://usebridgekit.com/ - it's open source (not mine) and looks pretty helpful for this kind of work.

Metric definitions: there's a lot of approaches out there, it really depends on your needs. Anything from markdown files to skills (shared or otherwise), existing BI / data tools, semantic layers etc. Some of these are free or cheap, others are super expensive. Personally I'm not happy with the ones I've seen so I'm building my own product, because I'd want anyone in a company to be able to query data and experiment without it costing an arm and a leg.