Let a whole team self-serve data via an agent-written schema guide
- Posted
- by Dylan (@dylangans)
- Last checked
- Method:
- How we verify
Evidence: Described by posterThe person describes what happened in words, without screenshots or video.
Outcome
Claude Code wrote a markdown guide to the company's data model and business terms from SQLMesh context and past queries; Hex's agent now handles the team's data requests. The team had posted a data analyst role, and the poster now thinks the role is 'completely dead'.
Agent
Prompt Recreated prompt
The source didn't share its exact prompt, so we wrote this from what it describes.
Using our SQLMesh models, my past queries and business context, write a markdown file explaining how our data is structured and what our business terms mean, so another agent can answer data requests.
Try this in:
Sends the Recreated prompt shown above. ChatGPT and Grok open with it filled in, and ChatGPT may send it straight away. Gemini opens empty, so we copy the prompt for you to paste. Every button also copies it.
The source used Claude Code and Hex agent, which can take actions on your computer or in a browser. These are general chat tools, so results may differ, and a normal chat may only give you a plan.
Opens in a new tab. We don't see what you send.
These links are only a shortcut. We're not affiliated with OpenAI, Google or xAI, and your results may not match the source.
Optional stronger version
Our rewrite with extra checks. The poster didn't test it.
Goal: Write a markdown guide to our data models and business terms so another agent can answer data requests. Inputs (fill in or confirm): - SQLMesh models - Past queries - Business glossary - Who will read the guide (agents, analysts) - Example questions people ask most Rules: - Describe each table, grain, keys and joins. - Define business terms with the exact SQL logic. - Include example queries for common questions. - Mark uncertain items for review. - Note data freshness and known data-quality issues per table. - List common pitfalls (double counting, time zones, soft-deleted rows). - Keep the guide in the repo next to the models so it can be updated. - Test the guide by answering 5 real questions with it. - Write the guide in plain language a new analyst understands, with SQL as examples. - Link each business term to the model and column it comes from. - Add a 'which table do I use?' section for the most common questions. - Have an agent answer the example questions using only the guide and check results against known answers. If you get stuck: If definitions conflict, list both. If a login, CAPTCHA or two-step code appears, stop and ask me to handle it; never guess or store passwords. Verify before you finish: Run example queries to confirm they work. Output: Markdown guide. Done when: another agent can answer common requests correctly.
Source
https://x.com/dylangans/status/2047768695678578723
Related cases
- Analyze every entry of a huge JSONL file with Claude Code subagentsRecreated promptEvidence: Described by poster
Claude Code previewed the data, trimmed fields, defined a schema and ran hundreds of Haiku subagents over ~45 minutes so every entry in a large JSONL file was analyzed.
Claude Code · Data · Source date:
The poster says he asked Grok to graph Iowa traffic deaths per month for the last five years, then California, to check whether a roadside death counter looked low; he shared the charts.
Grok · Data · Source date:
- Build a support data pipeline and dashboard in under an hour with DevinRecreated promptEvidence: Company case study
At Eight Sleep, a support manager who used to need the data team for dashboards built an end-to-end pipeline and dashboard herself with Devin in under an hour, according to Devin's customer story.
Poster says:Under an hour
Devin · Data · Source date: