sql-analyst

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

A read-only data-analysis workflow that answers a specific question from one declared database source using its known tables and fields.

In plain words
What is it for?
It helps plan a database read, retrieve the approved result, and explain what that result shows.
Why use it?
It blocks unsafe or invented queries, such as requests for unknown fields, unbounded rows, or changes to the data.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/runxhq/runx/sql-analyst
Any agent
npx skills add runxhq/runx --skill sql-analyst
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-analyst

README.md
[![agentmods](https://agentmods.dev/badge/skills/runxhq/runx/sql-analyst.svg)](https://agentmods.dev/skills/runxhq/runx/sql-analyst)
Your own site
<a href="https://agentmods.dev/skills/runxhq/runx/sql-analyst"><img src="https://agentmods.dev/badge/skills/runxhq/runx/sql-analyst.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 652 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00032 $0.00652
Opus 5 $0.00016 $0.00326
Sonnet 5 $0.00006 $0.00130
Haiku 4.5 $0.00003 $0.00065

Measured yesterday against content hash c8807a325e10, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sql-analyst 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (sql-analyst.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-analyst/SKILL.md · 70 lines

How it starts

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

SQL Analyst

Use this skill to answer a bounded data question from one declared, typed data source operation. The default validates the plan, performs the exact data-store read, and interprets only that returned evidence. The explicit plan runner stops at a reviewable read-only plan.

The schema and optional sample snapshot must carry stable upstream SHA-256 digests and observation times. Runx treats them as caller-supplied provenance, not provider verification. Deterministic admission rejects stale or malformed sources, write intent, invalid identifiers or dialects, unknown allowed tables, and unbounded row requests before the model runs. The model designs a plan against a normalized table/field index. A deterministic finalizer then rejects invented tables and fields, untyped joins, unstructured filters, literal filter values, invalid limits, incomplete interpretation, and write tokens.

This skill never emits or executes raw SQL. The default requires a validated execution_context for data-store.read_projection, read_events, or list_stream_heads; it performs that read and returns an interpretation. The explicit plan runner may omit the context and returns planned_only.

Composes

  • data-store#list_stream_heads
  • data-store#read_events
  • data-store#read_projection

Inputs

  • question: bounded analysis question.
  • schema_summary: source-bound available tables and fields.
  • dialect: postgres, sqlite, or mysql.
  • as_of and max_schema_age_days: deterministic source-freshness boundary.
  • sample_rows: optional source-bound snapshot containing at most 20 non-sensitive rows.
  • constraints: allowed tables, maximum rows, and privacy limits.
  • execution_context: required for the default; an exact governed data-store read runner and bounded resource inputs. It is optional only for plan.

Output

The default returns analysis_result from the validated plan and actual runx.data.operation_result.v1 evidence. plan returns the existing runx.data.sql_analysis_plan.v1 packet.

Read the full file on GitHub · 70 lines

Files

What ships with it

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

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. yesterday First seen · 70 lines · 32 tokens per session scan A c8807a325e10

Subscribe to this mod's changes

sql-analyst is a skill published in the GitHub repository runxhq/runx (84 stars, last pushed yesterday), licensed Apache-2.0. It adds 32 tokens to every session and 652 once invoked, about $0.0002 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-09-03.