Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Jignesh-Ponamwar/skills-mcp --skill sql-query-writergit clone --depth 1 https://github.com/Jignesh-Ponamwar/skills-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jignesh-ponamwar/skills-mcp/sql-query-writer)<a href="https://agentmods.dev/skills/jignesh-ponamwar/skills-mcp/sql-query-writer"><img src="https://agentmods.dev/badge/skills/jignesh-ponamwar/skills-mcp/sql-query-writer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/jignesh-ponamwar/skills-mcp/sql-query-writer"><img src="https://agentmods.dev/badge/skills/jignesh-ponamwar/skills-mcp/sql-query-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00067 | $0.01406 |
| Opus 5 | $0.00034 | $0.00703 |
| Sonnet 5 | $0.00013 | $0.00281 |
| Haiku 4.5 | $0.00007 | $0.00141 |
Grade A, and why
sql-query-writer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SQL Query Writer Skill
Overview
Write correct, readable, and performant SQL queries. Covers SELECT fundamentals through advanced window functions, CTEs, and performance optimization. Dialect-aware: PostgreSQL, MySQL, SQLite, BigQuery.
Step-by-Step Process
Step 1: Understand the Data Model
Before writing a query, confirm:
- Tables involved and their primary keys
- Join relationships (1:1, 1:many, many:many via junction table)
- Data types of filter and join columns
- Approximate row counts (affects optimization strategy)
- Target dialect (PostgreSQL, MySQL, SQLite, BigQuery, DuckDB)
Step 2: Start with the Simplest Correct Query
-- Start simple, then optimize
SELECT
u.id,
u.name,
u.email,
COUNT(o.id) AS order_count,
SUM(o.total_amount) AS total_spent
FROM users u
LEFT JOIN orders o ON o.user_id = u.id
WHERE u.created_at >= '2024-01-01'
GROUP BY u.id, u.name, u.email
ORDER BY total_spent DESC
LIMIT 100;
Step 3: Common Query Patterns
Top N per group (window function)
SELECT *
FROM (
SELECT
product_id,
category,
revenue,
ROW_NUMBER() OVER (PARTITION BY category ORDER BY revenue DESC) AS rank
FROM product_sales
) ranked
WHERE rank <= 5;
Running totals and moving averages
SELECT
date,
revenue,
SUM(revenue) OVER (ORDER BY date) AS cumulative_revenue,
AVG(revenue) OVER (ORDER BY date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) AS revenue_7d_avg
FROM daily_sales
ORDER BY date;
Year-over-year comparison
SELECT
DATE_TRUNC('month', order_date) AS month,
SUM(total) AS revenue,
LAG(SUM(total), 12) OVER (ORDER BY DATE_TRUNC('month', order_date)) AS revenue_prev_year,
ROUND(
(SUM(total) - LAG(SUM(total), 12) OVER (ORDER BY DATE_TRUNC('month', order_date)))
/ NULLIF(LAG(SUM(total), 12) OVER (ORDER BY DATE_TRUNC('month', order_date)), 0) * 100,
1
) AS yoy_pct_change
FROM orders
GROUP BY 1
ORDER BY 1;
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 183 lines · 67 tokens per session scan A c955d4b1f142
sql-query-writer is a skill published in the GitHub repository Jignesh-Ponamwar/skills-mcp (7 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 67 tokens to every session and 1,406 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
deprecation-and-migration
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset…
database-migration
Execute database migrations across ORMs and platforms with zero-downtime strategies, data transformation, and rollback procedures. Use when migrating databases, changing schemas, performing data transformations, or implementing zero-downtime deployment strategies.
database-migrations-migration-observability
Migration monitoring, CDC, and observability infrastructure.
database-architect
Expert database architect specializing in data layer design from scratch, technology selection, schema modeling, and scalable database architectures. Masters SQL/NoSQL/TimeSeries database selection, normalization strategies, migration planning, and performance-first design. Handles both greenfield architectures and…
baserow-automation
Automate Baserow tasks via Rube MCP (Composio). Always search tools first for current schemas.
database-admin
Expert database administrator specializing in modern cloud databases, automation, and reliability engineering. Masters AWS/Azure/GCP database services, Infrastructure as Code, high availability, disaster recovery, performance optimization, and compliance. Handles multi-cloud strategies, container databases, and cost…