sql-reporting
What it does
It gives your agent a checklist for writing SQL that pulls metrics or reports from a data warehouse. It is for analysts and anyone who needs reliable numbers from database tables.
When to use it
- ✓When you ask for a metric, report, or dashboard figure pulled from warehouse tables.
- ✓When a query needs to add up counts, sums, or rolling windows.
- ✓When a report needs data from two or more tables combined together.
Skill link
https://github.com/apache/airflow/blob/main/providers/common/ai/src/airflow/providers/common/ai/example_dags/skills/sql-reporting/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you write a query that counts this month's orders by region from our warehouse tables?”
5 new skills a week. 1 minute to read.
How it works
The agent follows a fixed set of conventions, such as filtering by date first and naming every total. It checks its query against a short review list and returns the SQL with a one-sentence summary.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
SQL Reporting Skill
Apply this skill before writing or running any analytics SQL so reports stay consistent and safe.
When to Use This Skill
Use this skill when the task involves:
- Querying warehouse tables for a metric, report, or dashboard figure
- Aggregating rows (counts, sums, rolling windows)
- Cross-referencing two or more tables
Conventions
- Always
SELECTexplicit column names, neverSELECT *. - Filter on a partition/date column first to bound the scan.
- Alias aggregates with snake_case names (
order_count, notcount(*)). - Cap exploratory queries with
LIMITunless an aggregate already collapses the result set. - Prefer
COUNT(DISTINCT ...)over a sub-query when de-duplicating.
Review Checklist (run before returning an answer)
- No
SELECT *. - A date or partition predicate is present.
- Every aggregate has an explicit alias.
- The query reads only from tables the task actually needs.
Output Format
Return the final SQL in a fenced ```sql block, then one sentence describing what the query returns.
FAQ
Why does it avoid SELECT star?
The skill says to list explicit column names, which keeps queries clear and easier to check.
Does it limit how much data a query reads?
Yes. It says to filter on a date or partition column first, and to add a limit to exploratory queries.
What does the answer look like?
The final SQL appears in a code block, followed by one sentence describing what the query returns.
Details
Original description by the author
Conventions and review steps for writing analytics SQL against the warehouse. Use whenever the task involves querying tables, building a report, or aggregating metrics.
repo: apache/airflow
Popularity
- GitHub stars
- 47k
- Ranking position
- #6317
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
Similar skills
discrawl
394kLets your agent search and summarize a saved local archive of Discord messages, check how fresh it is, and read direct messages.
clickhouse-io
280kHelps your agent optimize queries and schemas in ClickHouse databases. It applies best practices for high-performance analytical workloads. Use when analytical queries are too slow.
scientific-db-pubmed-database
280kHelps your agent search for scientific articles in the biomedical field. It's useful for research needing specific medical information.