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 agentmods add skills/eric861129/skills_all-in-one/sql-pronpx skills add eric861129/SKILLS_All-in-one --skill sql-progit clone --depth 1 https://github.com/eric861129/SKILLS_All-in-oneWrote 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/eric861129/skills_all-in-one/sql-pro)<a href="https://agentmods.dev/skills/eric861129/skills_all-in-one/sql-pro"><img src="https://agentmods.dev/badge/skills/eric861129/skills_all-in-one/sql-pro.svg" alt="Measured on agentmods" 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.00115 | $0.01169 |
| Opus 5 | $0.00057 | $0.00584 |
| Sonnet 5 | $0.00023 | $0.00234 |
| Haiku 4.5 | $0.00012 | $0.00117 |
Grade A, and why
sql-pro 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 2d 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.
This is a copy
92% identical to sql-pro — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SQL Pro
Core Workflow
- Schema Analysis - Review database structure, indexes, query patterns, performance bottlenecks
- Design - Create set-based operations using CTEs, window functions, appropriate joins
- Optimize - Analyze execution plans, implement covering indexes, eliminate table scans
- Verify - Run
EXPLAIN ANALYZEand confirm no sequential scans on large tables; if query does not meet sub-100ms target, iterate on index selection or query rewrite before proceeding - Document - Provide query explanations, index rationale, performance metrics
Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| Query Patterns | references/query-patterns.md |
JOINs, CTEs, subqueries, recursive queries |
| Window Functions | references/window-functions.md |
ROW_NUMBER, RANK, LAG/LEAD, analytics |
| Optimization | references/optimization.md |
EXPLAIN plans, indexes, statistics, tuning |
| Database Design | references/database-design.md |
Normalization, keys, constraints, schemas |
| Dialect Differences | references/dialect-differences.md |
PostgreSQL vs MySQL vs SQL Server specifics |
Quick-Reference Examples
CTE Pattern
-- Isolate expensive subquery logic for reuse and readability
WITH ranked_orders AS (
SELECT
customer_id,
order_id,
total_amount,
ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY order_date DESC) AS rn
FROM orders
WHERE status = 'completed' -- filter early, before the join
)
SELECT customer_id, order_id, total_amount
FROM ranked_orders
WHERE rn = 1; -- latest completed order per customer
Window Function Pattern
-- Running total and rank within partition — no self-join required
SELECT
department_id,
employee_id,
salary,
SUM(salary) OVER (PARTITION BY department_id ORDER BY hire_date) AS running_payroll,
RANK() OVER (PARTITION BY department_id ORDER BY salary DESC) AS salary_rank
FROM employees;
What ships with it
5 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.
- 2d ago First seen · 130 lines · 115 tokens per session scan A 5f265ffc6d63
sql-pro is a skill published in the GitHub repository eric861129/SKILLS_All-in-one (52 stars, last pushed 4mo ago), licensed MIT. It adds 115 tokens to every session and 1,169 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to sql-pro, differing in 2 lines, and is treated as a copy.
Other skills, from other repositories
sql-optimization-patterns
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.
rb:constraint-debug
Diagnosing Active Record constraint failures: unique-index, foreign-key, NOT-NULL violations. Triggers: "constraint error", "unique violation", "foreign key", "PG::UniqueViolation".
landing-performance
Fix performance issues in apps/landing for leaderboards, battles, rankings, vote/reaction summaries, and high-cardinality result pages.
ck:fix
Fix a bug using Scout → Diagnose → Fix → Review → Finalize. Use when the user pastes an error message, stack trace, or test failure, or says "fix this bug", "something's broken", "tests are failing", "I'm getting an error". Also accepts --from-quality or --from-test to fix exactly the findings/failures a report lists.…
When Stuck - Problem-Solving Dispatch
Dispatch to the right problem-solving technique based on how you're stuck.
debug
Structured debugging with hypothesis testing. Observe, hypothesize, verify, fix, explain — teaches debugging methodology via a domain-adapted hint ladder. Defers to .agents/README.md.