/agent-skills:sql-queriesfrom agent-skills
Writes and fixes SQL with correct joins, accurate aggregation, and index-aware queries. Verifies row grain, avoids silent NULL bugs, and interprets EXPLAIN plans.
Ships in agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
SQL fails quietly. A query with a wrong join returns rows — just the wrong ones, and nothing errors. The number looks plausible, someone puts it in a report, and it is wrong for months.
Verify the row count before trusting the aggregate. That single habit catches most SQL bugs.
Before writing, state the grain: "one row per order" or "one row per customer per month". Almost every SQL bug is a grain the author did not intend.
Then check it. If you expect one row per order and get 1,400 rows for 1,200 orders, a join
fanned out, and any SUM over that result is now inflated.
SELECT COUNT(*) FROM ...; -- vs. what you expect
SELECT order_id, COUNT(*) FROM ... GROUP BY 1 HAVING COUNT(*) > 1;
Done when: the row count matches the stated grain.
INNER drops rows with no match, often silently
excluding exactly the cases you care about, like customers with no orders.LEFT JOIN with a condition on the right table in WHERE becomes an inner join. The
filter removes the null rows the join just produced. Put the condition in the ON clause.Done when: each join's cardinality is deliberate.
NULL is not a value and does not behave like one:
NULL = NULL is not true. Use IS NULL, or IS DISTINCT FROMWHERE status != 'done' excludes rows where status is NULL. This is the single most
common silent filter bugAVG over a column with nulls averages fewer rows than you thinkCOUNT(*) counts rows; COUNT(col) counts non-null values. Different numbersNOT IN with a NULL in the subquery returns nothing at allDone when: every nullable column in a predicate has had its NULL behaviour considered.
EXPLAIN ANALYZE SELECT ...;
Read the plan, not the query. Look for sequential scans on large tables, and for estimated rows far from actual — that means stale statistics and a plan chosen on bad information.
Things that stop an index being used:
WHERE DATE(created_at) = ... cannot use an index on
created_at. Use a range insteadLIKE '%foo'OR across different columns: often better as UNION ALLComposite indexes only help when the query filters on a leading prefix of the columns.
Done when: the plan shows an index scan where you expect one.
EXISTS over IN for a subquery on a large set, and it is NULL-safeSELECT * in anything saved. It breaks when columns are added and pulls data you do
not needBETWEEN on timestamps. It includes the endpoint, so a day range double-counts
midnight. Use >= start AND < endDone when: the query says what it means and avoids the traps above.
Done when: the result agrees with an independent calculation.
Parameterise, always, including for internal tools and one-off scripts. This is the
straightforward path to SQL injection, and "it's internal" is how most such holes are justified
before they are found. See security-analysis.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub arjunprabhulal/agent-skills --plugin agent-skills60 skills in this plugin
/accessibility-reviewReviews an interface for barriers that stop people using it — keyboard operation, screen reader support, contrast, focus management, and form semantics. Use this whenever the user is building or reviewing UI, mentions accessibility, a11y, WCAG, screen readers, or keyboard navigation, and proactively when a change adds a modal, a custom control, a form, or anything interactive. For general code correctness, use code-review./agent-deploymentShips an agent to production — packaging, config and secrets, staged rollout, and the rollback plan — for a system whose failures are usually silent rather than loud. Use this whenever the user is deploying an agent or LLM feature, planning a rollout or canary, moving an agent from prototype to production, or asking how to release a prompt or model change safely. For monitoring it once live, use agent-observability./agent-designDesigns an agent's architecture — the tool surface, context strategy, control flow, and model choice — from a scoped set of jobs. Use this whenever the user is deciding how an agent should be built rather than what it should do — choosing tools, wiring up an agent loop, deciding single-agent vs multi-agent, picking a model, or planning what goes in the context window. Also use when an existing agent is unreliable and the cause looks structural rather than a prompt problem. For deciding what the agent is for, use agent-scoping first./agent-evaluationBuilds an eval set for an agent or LLM feature, writes graders, establishes a baseline, and reads the results honestly. Use this whenever the user wants to measure whether an agent works, asks if a prompt or model change was an improvement, mentions evals, LLM-as-judge, regression testing for AI, or is about to ship an agent on the strength of a few manual tries. Also use before any prompt or model change, since without a baseline no change can be judged./agent-hardeningMakes an agent safe to run with real permissions on real data — scoping what it can do, handling prompt injection, adding confirmation and dry-run for irreversible actions, and bounding cost. Use this whenever an agent is about to touch production, act autonomously, handle untrusted input, or use credentials, and whenever the user asks about agent safety, guardrails, permissions, or prompt injection. Also use when an agent has broad API access that nothing in code restricts./agent-implementationBuilds an agent from a design — the loop, the tools, the prompts, the schema validation, and the traces you will need later. Use this whenever the user is writing agent code — implementing tool calling, wiring an agent loop, building an MCP server or tool layer, writing system prompts for an agent, or turning a prototype agent into something maintainable. For deciding the architecture first, use agent-design; for measuring whether it works, use agent-evaluation.Other plugins' skills for the same job