sql-analysis

sql-analysis is a skill for Claude Code, Codex from runxhq/runx. It costs 43 tokens per session (1,329 once invoked), scanned A, original, Apache-2.0.

A controlled way to answer data questions with approved, parameterized SQL queries. SQL is a language for reading and working with database data; the query definitions and their inputs are fixed by the database operator.

In plain words
What is it for?
Use it to answer recurring questions about campaigns, support, activation, or other configured data by running a declared read and interpreting its results.
Why use it?
It avoids arbitrary SQL, injected inputs, unapproved database access, and answers that are not based on returned rows. It also reports when the approved queries cannot answer the question.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to answer recurring questions about campaigns, support, activation, or other configured data by running a declared read and interpreting its results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/runxhq/runx/sql-analysis
Install

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.

Any agent
npx skills add runxhq/runx --skill sql-analysis
Clone the repo
git clone --depth 1 https://github.com/runxhq/runx

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for sql-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/runxhq/runx/sql-analysis/github.svg)](https://agentmods.dev/skills/runxhq/runx/sql-analysis)
Your own site
<a href="https://agentmods.dev/skills/runxhq/runx/sql-analysis"><img src="https://agentmods.dev/badge/skills/runxhq/runx/sql-analysis/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.

agentmods 80×15 button for sql-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/runxhq/runx/sql-analysis"><img src="https://agentmods.dev/badge/skills/runxhq/runx/sql-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,329 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.01329
Opus 5.5 $0.00017 $0.00532
Sonnet 5.5 $0.00009 $0.00266
Haiku 4.5 $0.00004 $0.00133

Measured 2d ago against content hash adca4f40cab2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sql-analysis 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.

The scan reads SKILL.md. This mod also ships 1 executable file (sql-analysis.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/sql-analysis/SKILL.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SQL Analysis

Use SQL Analysis for recurring questions over a configured database: which campaigns produced qualified trials, how support resolution changed, or where activation stalls. It chooses a relevant declared query, checks its parameters, runs that read through the selected SQL connector and answers from the returned rows. The result carries the exact native provider operation, not a model's claim that it queried a database.

The operator owns the database and its useful reads. The optional sql connector uses installed SQLAlchemy dialects and DBAPI drivers; the skill and CLI have no fixed database-engine list. Configure another source instance to change engine, credentials, query definitions or permissions. The connector's README explains dependency installation and source configuration.

This is not an arbitrary SQL console. Query definitions are operator-owned SQL with named bound parameters and complete JSON Schema parameter contracts. The agent sees descriptions, input contracts and result semantics; it cannot inject a URL, replace SQL, install a driver or broaden permissions. If no declared read answers the question, the skill explains what is missing. An operator can add an appropriate read at the source and run again. Use a separate authorized database session for exploratory SQL, writes or schema changes.

How a run works

The default analyst runner takes question, the exact logical source_ref, and an optional max_rows ceiling, then:

  1. Reads the selected source's query catalog without opening a database.
  2. Chooses the smallest relevant query and supplies values from the question or caller context. Missing dates, definitions or filters are reasons to stop.
  3. Checks the complete parameter contract using native data.validate. The connector independently validates before executing.
  4. Executes only that query, within both caller and source row limits.
  5. Interprets actual rows and retains the native operation evidence, source, query, parameter values, observation time and truncation state.

Read the full file on GitHub · 121 lines

Changes

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.

  1. 2d ago First seen · 121 lines · 43 tokens per session scan A adca4f40cab2

Subscribe to this mod's changes

sql-analysis is a skill published in the GitHub repository runxhq/runx (103 stars, last pushed today), licensed Apache-2.0. It adds 43 tokens to every session and 1,329 once invoked, about $0.0002 per session on Opus 5.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-10-18.