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.5 $0.00020 $0.00118
Sonnet 5.5 $0.00010 $0.00059
Haiku 4.5 $0.00005 $0.00030

Measured 1mo ago against content hash 52d4b0600e58, 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-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 1mo 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. 1mo 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 17d ago), licensed MIT. It adds 49 tokens to every session and 296 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-09-03.

Related

Other skills, from other repositories

data-isolation-and-lifecycle

Use when the diff stores, caches, indexes, exports, imports, migrates, soft-deletes or revokes access-controlled or multi-tenant data - policy vs query disagreement, bypass clients, tenant-less cache and object keys, signed links, derived copies (search, cache, logs, analytics), export/restore scope, migration…

makifbaysal/tasktrooper · 82 tokens

test-database-seeding

Use when a test needs a database - spin up a dedicated, disposable test database (Testcontainers) seeded with known data, never a shared or production database.

makifbaysal/tasktrooper · 37 tokens

mirrord-db-branching

Helps users configure mirrord.json for database branching, enabling isolated database copies for safe development and testing. Use when the user wants to set up MySQL, MariaDB, PostgreSQL, MSSQL, MongoDB, Redis, DynamoDB, ClickHouse, Google Spanner, Amazon S3, or generic branches, configure copy modes, connection…

aiskillstore/marketplace · 91 tokens

firebase-development

This skill should be used when working with Firebase projects, including initializing projects, adding Cloud Functions or Firestore collections, debugging emulator issues, or reviewing Firebase code. Triggers on "firebase", "firestore", "cloud functions", "emulator", "firebase auth", "deploy to firebase", "firestore…

aiskillstore/marketplace · 67 tokens

prisma-orm-setup

Set up Prisma ORM in an application, connect its database, or troubleshoot the connection of an existing Prisma 6, 7, or 8 app. Defaults new applications to Prisma ORM 8 and loads the package-owned prisma-8 skill; keeps existing Prisma 6/7 apps on their version with provider references for PostgreSQL, MySQL, SQLite…

aiskillstore/marketplace · 94 tokens

create-grid-query-builder

Create the Doctrine DBAL QueryBuilder that fetches grid rows, and optionally a GridDataFactory decorator for post-processing. The column aliases must exactly match the column IDs in the Grid Definition. Trigger: "create grid query builder for {Domain}".

jeffsenso/prestashop-skills · 55 tokens