sql-analysis-plan

sql-analysis-plan is a skill for Codex from jeremylongworth-source/AgentSkills. It costs 49 tokens per session (296 once invoked), scanned A, original, MIT.

A plan for answering analytics questions with SQL, the language used to query databases, without assuming direct database access.

In plain words
What is it for?
Planning joins, filters, common table expressions, aggregations, window functions, validation checks, and the expected shape of query results.
Why use it?
It prevents made-up table names and overlooked problems such as duplicates, missing values, time-zone errors, and late data.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex.

Good fit Planning joins, filters, common table expressions, aggregations, window functions, validation checks, and the expected shape of query results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jeremylongworth-source/agentskills/sql-analysis-plan
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 jeremylongworth-source/AgentSkills --skill sql-analysis-plan
Clone the repo
git clone --depth 1 https://github.com/jeremylongworth-source/AgentSkills

Made for: 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-plan

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jeremylongworth-source/agentskills/sql-analysis-plan"><img src="https://agentmods.dev/badge/skills/jeremylongworth-source/agentskills/sql-analysis-plan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 296 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.00049 $0.00296
Opus 5 $0.00024 $0.00148
Sonnet 5 $0.00010 $0.00059
Haiku 4.5 $0.00005 $0.00030

Measured 7d ago against content hash 52d4b0600e58, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

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

skills/sql-analysis-plan/SKILL.md · 44 lines

What it actually says

SQL Analysis Plan

Core Workflow

  1. Identify business question, grain, tables, fields, filters, time window, segments, and expected output.
  2. Outline query logic with joins, CTEs, aggregations, window functions, and validation checks.
  3. Define data quality checks for duplicates, missing values, timezone, late events, and source mismatches.
  4. Include expected result shape and interpretation caveats.
  5. Keep database access read-only unless the user explicitly approves otherwise.
  6. Flag missing schema information before writing final SQL.

Safety Rules

  • Do not run write queries, destructive queries, or production-impacting operations.
  • Do not invent table or field names when schema is missing.
  • Do not expose sensitive data in query output examples.

Deliverable Shape

For SQL analysis plans, provide:

  • Business question
  • Tables and fields needed
  • Query outline
  • Filters and segments
  • Validation checks
  • Expected output shape
  • Caveats and assumptions
  • Optional SQL draft when schema is known

References

  • Read references/sql-analysis-plan-checklist.md when planning analytics SQL.
Files

What ships with it

2 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. 7d ago First seen · 44 lines · 49 tokens per session scan A 52d4b0600e58

Subscribe to this mod's changes

sql-analysis-plan is a skill published in the GitHub repository jeremylongworth-source/AgentSkills (1 stars, last pushed 9d ago), licensed MIT. It adds 49 tokens to every session and 296 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.

Related

Other skills, from other repositories

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…

awslabs/agent-plugins · 229 tokens

technical-debt-audit

Use when the user says 'clean up my wordpress', 'what is bloating my wordpress', 'find orphaned shortcodes', or 'scan for unused plugins'. Audits orphaned shortcodes from deleted plugins, unused plugins, database bloat, unused media, and leftover data from inactive builders.

respira-press/agent-skills-wordpress · 66 tokens

spring-data-jpa

Use when designing or implementing Spring Data JPA on Spring Boot 4 — repository boundaries, projections, query patterns, custom repositories, CQRS read models, entity relationships, or persistence performance fixes. Not for generic SQL help, database admin work, or project-wide migration (see the springboot-migration…

a-pavithraa/springboot-skills-marketplace · 67 tokens

database-migrations

Database migration best practices for schema changes, data migrations, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Kysely, Django, TypeORM, golang-migrate).

datit309/supergraph · 56 tokens

sql-optimization

SQL query optimization patterns including EXPLAIN plan analysis, index strategies, query rewriting, and N+1 query prevention. Use when optimizing slow database queries, analyzing query performance, designing indexes, or debugging database bottlenecks. Works with PostgreSQL, MySQL, SQLite, and other SQL databases.…

stefan-jansen/claude-code-toolkit · 78 tokens

frappe-sql

Frappe-native SQL and ORM guidance for frappe.db, Query Builder, tab{DocType} tables, permission-sensitive queries, and raw SQL review. Use when writing or reviewing database access in Frappe.

Dkm0315/frappe-agent · 51 tokens