Answer the ad-hoc data question
Set up
Try a plugin
The Data plugin ships with /write-query and other warehouse-and-BI skills as a starting point, already structured to read a data model and write queries against it. If your admin manages plugins and it's not available yet, skip this; nothing below requires it.
Data10 skills for SQL generation, table profiling, dashboard specs, and metric narratives
/write-queryRead the warehouse model, write the SQL, and answer the business question
/explore-dataProfile a table and summarize what's in it
Connect your tools
Claude Cowork is more powerful when it works directly with your systems. You control permissions and access. Learn about tool access.
Navigate to Customize → Connectors in Cowork to set up.
Databricks
Read the semantic layer and run SQL against the lakehouse so the answer comes with the query.
Microsoft 365
Pull the stakeholder's question from Teams or email and write the answer back as a reply.
SnowflakeOptional
Query the warehouse directly when the answer isn't in the semantic model yet.
Browse all connectors
Want to try this task before setting anything up? Add your files to a working folder, point Cowork at the folder, and start with the prompt.
Set your working folder
Drag the files you'll use (your schema export or dbt models, your metrics library, your data dictionary) into one folder and point Cowork at it. Cowork reads the model from there and writes the SQL, the result table, and the answer memo back to it. If you field ad-hoc questions regularly, create a Cowork project from that folder so your naming conventions and certified-metric list stay attached.
Analytics / EMEA-margin-question
finance-schema.sqlApr 22, 2026312 KB
metrics-library.mdMar 30, 202618 KB
data-dictionary.xlsxFeb 14, 202662 KB
In Cowork’s chat bar:Analytics / EMEA-margin-question
The prompt
Copy this into Claude Cowork
Here's the question from the business: "Why is gross margin down in EMEA this quarter?" Write the SQL to answer it, run it against the warehouse, and tell me what's driving the move. Then give me the chart spec to add to the dashboard so nobody has to ask again.
Analytics / EMEA-margin-question
Why this works
Prompt
Paste the question verbatim. Using their exact words keeps the answer aimed at what they asked, in the terms they used.
Prompt
Ask for what's driving the number. "What's driving the move" is asking for the breakdown behind the number: which segment, which change, which date.
Prompt
Ask for a reusable output. "Chart spec to add to the dashboard" is asking for something the asker can refresh themselves next time.
Source
Let the working folder supply context. SQL is written against your tables and your metric names, not invented ones.
Get a better draft
Practice
Add an example to match. Drop an example you like into the folder and Cowork matches your structure and voice.
Practice
Ask it to flag uncertainty. Add "flag anything you're not confident about" so you know where to look first when you review the draft.
Make Cowork work for you
A plugin skill is a starting point — customize it with your own practices and expertise. A few minutes of conversation and it runs with your standards from then on.
Make what we've done in this task so far into a skill, or edit the /write-query skill with my feedback.
Analytics
Tip: tell Claude to edit the skill for you.
Make it repeatable
Run it on every inbound question
The ad-hoc queue never stops. Type /schedule in the prompt, or open Scheduled in the Cowork sidebar, and the customized skill watches your analytics-requests channel and drafts the query and answer before you've even read the message.
/schedule Every hour, check #analytics-requests for new questions, run /write-query on each one, and write the draft answer to Analytics/Inbox/<thread-id>.md for me to review before it goes back.
Analytics
Scheduled taskActive
Ad-hoc analytics inbox
Hourly, reads new questions in #analytics-requests, runs /write-query against the warehouse, and writes a draft answer for review.
Every hour on weekdays
Share with your teammates
Your customized /write-query now carries your warehouse model, your certified metrics, and your answer format. Share it so every analyst writes SQL against the same definitions, and the business gets the same number no matter who they ask.
Share the skill
In Cowork, open Skills → /write-query → Share and pick your teammates (or your whole workspace, if your admin allows). They get the skill with your model and naming rules baked in, so they don't repeat Steps 1-3.
What changes for the analytics queue
Ad-hoc data questions are answered with a working query and explanation drafted together — you review and correct instead of writing SQL from scratch.
You did this for one margin question. The same approach covers cohort retention, funnel conversion, and anomaly checks — each one becomes a skill your team runs the same way.

Comments