A prompt library for data work: stop starting from scratch

The fastest good prompt is one that already worked. How to keep a small library of prompts for the jobs analysts repeat (explain a query, write a measure, summarise a chart), what each entry needs, and where to keep it.

Short answer: keep the prompts that worked, with blanks where the details change, in one shared place your team already uses. Each entry needs a name, the job it does, the prompt with placeholders like {table} and {question}, and one example of a good answer. Five to ten prompts cover most of an analyst's week: explain a query, write a measure, review SQL, summarise a chart, draft a data dictionary entry.

Image creators copy the prompt behind a picture they like and swap in their own subject. Analysts can do the same: the structure of a good prompt for "explain this query" does not change from one query to the next. Only the query does.

Nothing loads from YouTube until you press play. Then Google receives your IP address and may set its own storage. Narrated with an AI-generated voice. Privacy

Which prompts are worth keeping?

NameJobThe part that changes
Explain queryExplain a SQL query in plain English, step by step{query}
Write measureWrite one DAX measure with variables and DIVIDE{meaning}, {tables}, {filters}
Review SQLFind wrong joins, missing filters and slow patterns{query}, {table sizes}
Summarise chartThree sentences on what a chart shows, for an email{numbers}, {audience}
Dictionary entryName, definition, formula and owner of a metric{metric}, {formula}
A starter library for data work

What does one entry look like?

Name: Explain query
Job: explain a SQL query to someone who does not write SQL
Prompt:
  Explain this {dialect} query in plain English for a business reader.
  Say what one row of the result means, then each step in order.
  Point out anything that could make the numbers wrong.
  Query: {query}
Good answer: (paste one you were happy with)

The "good answer" line is what makes the entry reusable by a colleague: it shows what success looks like.

Where should the library live?

Where your team already looks: a page in your wiki, a folder in your repository, or a shared document. A coding agent can read it too: Claude Code loads skills from a project's .claude/skills/ folder, so a prompt you repeat daily can become a skill. Keep one owner, so entries get fixed when they stop working.

What goes wrong?

  • Saving every prompt. Keep only the ones you used more than twice and liked the result of.
  • No placeholders. A prompt with last month's table name baked in fails quietly next month.
  • Company data in the examples. Use made-up rows in the "good answer".

Where can you check this?

Where do you start?

Write your first two entries from the DAX prompt and the SQL prompt. When one becomes a daily habit, see a Claude skill for your DAX conventions.

Keep reading

More from the blog.

Every post

Next

Building this? Say hello.

A question about this post, a pattern you would build differently, or the next thing you want written out: Behnia reads every message.