sql-to-business-logic

sql-to-business-logic is a skill for Claude Code, Codex from nimrodfisher/data-analytics-skills. It costs 39 tokens per session (518 once invoked), scanned A, original, MIT.

A translator that turns SQL queries—the instructions used to retrieve data from databases—into plain-language business rules and explanations.

In plain words
What is it for?
Use it to document queries, explain analyses, review query correctness, and build a searchable query catalogue.
Why use it?
It helps non-technical readers understand what a query means and lets developers check whether it matches the intended business logic.

Skill for Claude CodeCodex

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

Good fit Use it to document queries, explain analyses, review query correctness, and build a searchable query catalogue.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nimrodfisher/data-analytics-skills/sql-to-business-logic
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 nimrodfisher/data-analytics-skills --skill sql-to-business-logic
Clone the repo
git clone --depth 1 https://github.com/nimrodfisher/data-analytics-skills

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-to-business-logic

README.md
[![agentmods](https://agentmods.dev/badge/skills/nimrodfisher/data-analytics-skills/sql-to-business-logic/github.svg)](https://agentmods.dev/skills/nimrodfisher/data-analytics-skills/sql-to-business-logic)
Your own site
<a href="https://agentmods.dev/skills/nimrodfisher/data-analytics-skills/sql-to-business-logic"><img src="https://agentmods.dev/badge/skills/nimrodfisher/data-analytics-skills/sql-to-business-logic/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-to-business-logic

Your own site · 80×15
<a href="https://agentmods.dev/skills/nimrodfisher/data-analytics-skills/sql-to-business-logic"><img src="https://agentmods.dev/badge/skills/nimrodfisher/data-analytics-skills/sql-to-business-logic.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 518 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.00039 $0.00518
Opus 5.5 $0.00016 $0.00207
Sonnet 5.5 $0.00008 $0.00104
Haiku 4.5 $0.00004 $0.00052

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

Security

Grade A, and why

sql-to-business-logic 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 3mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/sql_explainer.py), 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.

02-documentation-knowledge/sql-to-business-logic/SKILL.md · 34 lines

How it starts

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

SQL to Business Logic Translator

When to use

  • A stakeholder asks "what exactly does this query calculate?"
  • Documenting a query library or a dbt model for non-technical readers
  • Reviewing a query for correctness by comparing its logic to the business requirement
  • Onboarding new analysts to existing SQL patterns
  • Translating legacy undocumented queries before refactoring

Process

  1. Receive the query and context — obtain the SQL and the business question it answers. Also collect any schema notes (what the key tables and columns represent in business terms).
  2. Translate the FROM/JOIN structure — describe in plain language which data sources are combined and what type of join is used (inner keeps only matches; left keeps all rows from the left side). Note if the join type seems inconsistent with the stated purpose.
  3. Translate WHERE filters — list each filter condition as a business rule in plain language (e.g., status = 'completed' → "only includes orders that have been paid and fulfilled").
  4. Explain GROUP BY and aggregations — describe what each aggregation computes and at what grain. Use scripts/sql_explainer.py to automate a first-pass structural parse.
  5. Summarise output columns — for each output column, state its business meaning and any edge cases (nulls, rounding, currency units).
  6. Flag issues and write validation questions — identify potential problems (implicit null propagation, unexpected fan-out, hardcoded dates). Generate 3–5 questions the query author should confirm. Use assets/query_documentation_template.md to record the full translation.

Inputs the skill needs

  • The complete SQL query (SELECT through ORDER BY)
  • The business question the query is intended to answer
  • Table and column descriptions (or a data catalog entry)
  • Any business rules for key status values, date handling, or currency
  • The intended output: who reads the result and for what decision

Output

  • scripts/sql_explainer.py — parses a SQL query and generates a structured plain-language explanation
  • assets/query_documentation_template.md — completed translation covering purpose, step-by-step logic, output columns, business rules, and validation questions
  • Optionally: a flowchart representation of the query logic

Read the full file on GitHub · 34 lines

Files

What ships with it

3 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. 3mo ago First seen · 34 lines · 39 tokens per session scan A d7780ace6b62

Subscribe to this mod's changes

sql-to-business-logic is a skill published in the GitHub repository nimrodfisher/data-analytics-skills (564 stars, last pushed 23d ago), licensed MIT. It adds 39 tokens to every session and 518 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-08-30.

Related

sql-to-business-logic compared with skills from other repositories

sql-to-business-logic next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sql-to-business-logicnimrodfisher/data-analytics-skillsSkill56423d agoMITA39Claude Code, Codex
bigquery-migration-metadata-extractorgoogle/skillsSkill25ktodayApache-2.0A188Claude Code, Codex
bigquery-migration-data-exportergoogle/skillsSkill25ktodayApache-2.0A142Claude Code, Codex
alloydb-basicsgoogle/skillsSkill25ktodayApache-2.0A72Claude Code, Codex
cloud-databases-onboardinggoogle/skillsSkill25ktodayApache-2.0A83Claude Code, Codex
obsidian-baseskepano/obsidian-skillsSkill55k4d agoMITA63Claude Code
spanner-basicsgoogle/skillsSkill25ktodayApache-2.0A47Claude Code, Codex