SQL To Business Logic
nimrodfisher/data-analytics-skills
Translate SQL queries into plain language business logic. An agent skill from nimrodfisher/data-analytics-skills.
A skill your agent uses when a metric (revenue, MRR, margin) needs defining once in a governed semantic layer so every dashboard, report and agent returns the same number, or when an LLM must answer…
$ npx skills add ericrisco/rsc-harness --skill business-intelligence -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ericrisco/rsc-harness business-intelligence --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/business-intelligence .claude/skills/business-intelligence && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "business-intelligence" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/business-intelligence into .claude/skills/business-intelligence/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "business-intelligence", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ericrisco/rsc-harness/tree/main/skills/business-intelligenceType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ericrisco/rsc-harness --skill business-intelligence -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ericrisco/rsc-harness business-intelligence --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/business-intelligence .agents/skills/business-intelligence && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "business-intelligence" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/business-intelligence into .agents/skills/business-intelligence/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "business-intelligence", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ericrisco/rsc-harness --skill business-intelligence -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ericrisco/rsc-harness business-intelligence --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/business-intelligence .cursor/skills/business-intelligence && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "business-intelligence" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/business-intelligence into .cursor/skills/business-intelligence/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "business-intelligence", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ericrisco/rsc-harness.git --path skills/business-intelligence--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ericrisco/rsc-harness --skill business-intelligence -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ericrisco/rsc-harness business-intelligence --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/business-intelligence .gemini/skills/business-intelligence && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "business-intelligence" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/business-intelligence into .gemini/skills/business-intelligence/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "business-intelligence", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ericrisco/rsc-harness business-intelligenceInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ericrisco/rsc-harness --skill business-intelligence -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/business-intelligence .github/skills/business-intelligence && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "business-intelligence" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/business-intelligence into .github/skills/business-intelligence/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "business-intelligence", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ericrisco/rsc-harness --skill business-intelligence -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ericrisco/rsc-harness business-intelligence --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/business-intelligence .opencode/skills/business-intelligence && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "business-intelligence" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/business-intelligence into .opencode/skills/business-intelligence/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "business-intelligence", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
business-intelligenceA skill your agent uses when a metric (revenue, MRR, margin) needs defining once in a governed semantic layer so every dashboard, report and agent returns the same number, or when an LLM must answer…
Business Intelligence is an agent skill from ericrisco/rsc-harness. Use when a metric (revenue, MRR, margin) needs defining once in a governed semantic layer so every dashboard, report and agent returns the same number, or when an LLM must answer data questions in plain language without hallucinating SQL. NOT chart layout (that is dashboard), NOT which KPIs to track (that is kpi-framework), NOT a hand-written query (that is sql).
Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `evals/README.md`, `evals/cases.yaml` and `references/authoring-semantic-models.md`).
It sits in Writing & Content, covering OKRs and executive reporting, Plain language and style rules and SQL. It works with SQL. The repository describes itself as: Your agent invents things because it has no memory, and can't touch your database because it has no arms. rsc is the meta-harness that gives it both, plus the trade to know the… The licence is MIT.
Read from SKILL.md and the folder at commit e3d5b33. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Shell), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Business Intelligence loads about 2.5k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 98 tokens; SKILL.md has 1,049 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from ericrisco/rsc-harness at commit e3d5b33, republished under its MIT licence (© ericrisco). 1,049 words, ~2,504 tokens.
.claude/skills/business-intelligence/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Answer business questions over the org's data through a governed semantic layer — define each metric once in versioned YAML, then route every "what was revenue last quarter by region" through that layer. Numbers come out consistent, auditable, and the same for everyone. This skill builds the layer and queries it in plain language.
Never free-hand SQL against raw tables to answer a governed business question. Go through the layer.
Why, with numbers: in dbt's April 2026 benchmark (ACME Insurance, 11 questions × 20 runs, ~15-table schema), an LLM grounded in a semantic layer scored 98.2% (Claude Sonnet 4.6) / 100% (GPT-5.3 Codex) vs 90.0% / 84.1% for raw text-to-SQL on the same schema; on the unmodeled schema it was 72.7% vs 64.5%, and a 2023 GPT-4 baseline managed 32.7%. The layer is not bureaucracy — it is the accuracy. The model writing SQL against undecorated tables is the failure mode you are eliminating.
Your job is two motions: (1) build the metrics layer (entities, dimensions, measures, metrics) and (2) query it — translate a plain-language question into metric + dimensions + grain + filter, never into a hand-written query.
Every semantic layer (MetricFlow, Cube, warehouse-native) is built from the same four nouns. Learn these and the rest is syntax.
order_id is the primary entity of orders; customer_id is a foreign entity that joins to customers. Entities are how the layer knows how tables relate so it writes the join, not you.order_date by day/week/month/quarter) and categoricals (region, product_category).sum(amount), count(distinct customer_id).gross_revenue, mrr, gross_margin_pct. This is what a human or agent actually asks for by name.# MetricFlow-style semantic model for an orders table
semantic_models:
- name: orders
model: ref('fct_orders')
entities:
- name: order # primary join key
type: primary
expr: order_id
- name: customer # foreign key -> customers semantic model
type: foreign
expr: customer_id
dimensions:
- name: order_date
type: time
type_params: { time_granularity: day } # grain is declared, not implied
- name: region
type: categorical
measures:
- name: order_amount
agg: sum # explicit aggregation
expr: amountDo not stand up a semantic layer for a spreadsheet. Branch on consumers and conflict, not on data size alone.
| Situation | Build the layer? | Route |
|---|---|---|
| One analyst, one table, a 200-row CSV, a one-off question | No | ../sql/SKILL.md or ../duckdb/SKILL.md |
| One metric, queried in one place, never disputed | No | ../sql/SKILL.md |
| Many consumers (dashboards + reports + notebooks + an agent) | Yes | this skill |
| An LLM/agent must answer data questions safely | Yes | this skill |
| Two teams already report different numbers for the same thing | Yes | this skill |
If the answer is "no," stop here and write the query. The layer earns its weight only when a definition has to be shared.
| Pick | When | Why |
|---|---|---|
| dbt Semantic Layer / MetricFlow | You already run dbt; want Git-native definitions colocated with models, reviewed in PR/CI | Metrics live in YAML next to dbt models, version-controlled, served over JDBC + GraphQL APIs that apps query; compiles to SQL on Snowflake/BigQuery/Redshift/Databricks |
| Cube | One definition must feed a BI tool and a product dashboard and an AI copilot | Open-source, one definition exposed over four query APIs (SQL/REST/GraphQL/MDX) plus an AI API / MCP support so agents call governed metrics as tools |
| Warehouse-native (Snowflake Semantic Views / Databricks Metric Views) | The org is all-in on one warehouse | Semantic objects live inside the warehouse — no separate service to run |
MetricFlow was open-sourced (Apache 2.0) at Coalesce 2025 and contributed as an OSI reference implementation, so its YAML is a safe default authoring format regardless of which engine you land on.
One definition, version-controlled, reviewed in PR — colocated with the models. Definitions belong in code review, not in a BI tool's UI where they silently fork.
# A metric defined once over the measure above
metrics:
- name: gross_revenue
label: Gross Revenue
type: simple
type_params:
measure: order_amount # built on the measure, not raw SQL
- name: gross_margin_pct
label: Gross Margin %
type: ratio # ratio metric: numerator / denominator
type_params:
numerator: gross_profit
denominator: gross_revenue# Bad -> Good
Bad: "revenue" SUM(amount) hand-written in Tableau,
SUM(net_amount) in the Looker view,
SUM(amount)-refunds in a notebook -> three different numbers
Good: one `gross_revenue` metric in YAML; Tableau, the notebook,
and the agent all query that one metric -> one numberFor multi-entity join paths, additive vs non-additive vs ratio vs cumulative/derived metrics, semi-additive measures (balances, inventory snapshots), time spines, and the fan-out double-count trap, see references/authoring-semantic-models.md.
Decompose the question into the four parts before any SQL exists. Never jump to a query.
Question: "MRR by plan, monthly, last 2 quarters, EU customers only"
metric -> mrr
group by -> plan
time grain -> month
date filter -> last 2 quarters
filter -> region = 'EU'You hand the layer that spec; it generates the governed SQL. You then explain the answer back in business terms ("EU MRR grew 8% QoQ, driven by the Pro plan"), not as a table dump.
Expose the layer as an MCP / metrics tool. The agent selects governed metrics + dimensions; the layer returns the SQL/results. The agent never sees raw warehouse tables.
# Bad -> Good
Bad: agent gets warehouse credentials, reads the schema,
writes SELECT ... FROM raw.orders JOIN ... -> 84-90% accurate, unauditable
Good: agent calls query_metrics(metric="gross_revenue",
group_by=["region"], grain="month", filters=["region='EU'"])
-> layer returns governed SQL/result, 98-100% accurateGuardrails: deny raw-table access, validate that requested dimensions actually exist on the metric, reject any ungoverned aggregate. Full MCP pattern plus dbt SL GraphQL/JDBC and Cube REST/SQL/MCP query shapes are in references/wiring-agents-and-apis.md.
When sales says revenue is X and finance says Y, it is almost never a query bug — it is two definitions. Do not write a third query to "settle it." Find the two definitions, pick the correct one, encode it once in the layer, and point both teams at it. The disagreement disappears because there is now one number to disagree about.
Author toward the Open Semantic Interchange standard so definitions survive a tool switch. OSI is the vendor-neutral, Apache-2.0, YAML-based spec for datasets/metrics/dimensions/relationships, launched 2025-09-23 by Snowflake + dbt Labs, Cube, Salesforce/Tableau and others; v1.0 spec published on GitHub 2026-01-27. Write MetricFlow/OSI-shaped YAML; never invent a proprietary metric format trapped in one BI tool.
| Anti-pattern | Why it bites | Instead |
|---|---|---|
| Free-handing the SQL "just this once" because it's faster | "Once" becomes the fourth conflicting revenue figure; it's unauditable | Add/query a metric |
| Letting each dashboard define revenue itself | That is exactly how you get three numbers and a fire drill | One metric, all consumers query it |
| Skipping the time dimension's grain because it's "obvious" | Undeclared grain → silent daily-vs-monthly mismatches | Declare time_granularity/grain |
| Handing the agent warehouse creds to figure out the joins | Raw text-to-SQL is 84-90% (33% in 2023) and unauditable; the dbt 2026 benchmark puts the layer +8-14pts ahead | Expose metrics via MCP/API |
| Standing up a semantic layer for a 200-row CSV | Pure overhead for one analyst | ../sql/SKILL.md / ../duckdb/SKILL.md |
| Hard-coding the EU filter into the metric | Now you need a second metric for every region | Pass filters at query time |
Run scripts/verify.sh [path] on your semantic-model directory. It is read-only, never touches a warehouse, and discovers candidate YAML, then warns (advisory) on: a metric with no underlying measure, a measure with no declared agg, a time dimension with no grain, duplicate metric names, and a .sql beside the model hand-rolling an aggregate the layer should own. It exits non-zero only on unparseable YAML; an empty or clean target passes clean.
Siblings: ../sql/SKILL.md · ../dashboard/SKILL.md · ../kpi-framework/SKILL.md · ../reporting/SKILL.md · ../analytics/SKILL.md · ../forecasting/SKILL.md
© ericrisco, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (scripts, references) in skills/business-intelligence of ericrisco/rsc-harness.
Open the folder on GitHubat commit e3d5b33
Business Intelligence next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Business Intelligence this skillericrisco/rsc-harness | 167 | — | ~2.5k | Automated safety check: Pass | MIT | |
| SQL To Business Logicnimrodfisher/data-analytics-skills | 465 | — | ~636 | Automated safety check: Pass | MIT | |
| SQL Translatorcriptogus/agent-evolve-network | 288 | — | ~735 | Automated safety check: Pass | CC-BY-SA-4.0 | |
| Advanced Analytics Dashboardsickn33/agentic-awesome-skills | 47k | 1 repos | ~3.3k | Automated safety check: Pass | MIT | |
| Weekly Ops Reportdavila7/claude-code-templates | 32k | — | ~861 | Automated safety check: Pass | MIT | |
| SQL Root Cause Analysiszj-unicom-ai/UniEmployee | 358 | — | ~433 | Automated safety check: Pass | MIT |
nimrodfisher/data-analytics-skills
Translate SQL queries into plain language business logic. An agent skill from nimrodfisher/data-analytics-skills.
criptogus/agent-evolve-network
Translates a plain-English question into a single, safe, read-only SQL query against a known schema, with assumptions made explicit.
sickn33/agentic-awesome-skills
Dashboard metric register: metric, source module, formula, period, value, target, trend, owner and last-updated, as CSV, SQL, JSON Schema or Notion on request.
davila7/claude-code-templates
Turn raw operational data into a weekly management report that answers exactly three questions - what changed, where is it concentrated, what needs a decision.
zj-unicom-ai/UniEmployee
SQL 版归因分析技能。当用户问为什么、指标异常、趋势下滑/增长、KPI 未达标、营收/订单/转化/成本波动时使用. An agent skill from zj-unicom-ai/UniEmployee.
jeremylongshore/tons-of-skills-marketplace
Produce a complete metrics definition doc — metric name, formula, data source, segmentation, SQL or event tracking spec, and what good/bad looks like.
ericrisco/rsc-harness
A skill your agent uses when designing or analyzing a controlled experiment — falsifiable hypothesis, sample size from an MDE, reading significance/CI/power, CUPED, or rescuing tests that won't go…
ericrisco/rsc-harness
A skill your agent uses when making a web UI conform to WCAG 2.2 Level AA — axe-core or Lighthouse a11y violations, keyboard operability, focus management, ARIA roles/names/live regions, contrast…
ericrisco/rsc-harness
A skill your agent uses when running or fixing paid acquisition on Google or Meta — campaign structure (Performance Max, Demand Gen, Search, Advantage+), platform-fit creative, budget/scaling rules…
ericrisco/rsc-harness
A skill your agent uses when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual…
ericrisco/rsc-harness
A skill your agent uses when a creative goal must become a finished media file: pick and order generative-media models per modality — AI voiceover, image-to-video clips, score — then glue them with…
ericrisco/rsc-harness
A skill your agent uses when instrumenting product or web analytics — GA4/PostHog SDK wiring, event taxonomy, funnels, double-counted events, consent gating, PII scrubbing.
Works with
A skill your agent uses when a metric (revenue, MRR, margin) needs defining once in a governed semantic layer so every dashboard, report and agent returns the same number, or when an LLM must answer…. Business Intelligence is an agent skill from ericrisco/rsc-harness. Use when a metric (revenue, MRR, margin) needs defining once in a governed semantic layer so every dashboard, report and agent returns the same number, or when an LLM must answer data questions in plain language without hallucinating SQL.
Business Intelligence fits situations like: A metric (revenue; margin) needs defining once in a governed semantic layer so every dashboard; report and agent returns the same number; an LLM must answer data questions in plain language without hallucinating SQL.
Run `npx skills add ericrisco/rsc-harness --skill business-intelligence -a claude-code`. Or copy the skill folder (skills/business-intelligence in ericrisco/rsc-harness) into .claude/skills/business-intelligence in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ericrisco/rsc-harness --skill business-intelligence -a codex`. Or copy the skill folder (skills/business-intelligence in ericrisco/rsc-harness) into .agents/skills/business-intelligence in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ericrisco/rsc-harness --skill business-intelligence -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/business-intelligence, .gemini/skills/business-intelligence, .github/skills/business-intelligence and .opencode/skills/business-intelligence in your project.
Going by SKILL.md and its folder, Business Intelligence needs a shell for the scripts in its folder. Our summary lists: A Bash shell.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Business Intelligence is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Business Intelligence: SQL To Business Logic (nimrodfisher/data-analytics-skills, 465 stars), SQL Translator (criptogus/agent-evolve-network, 288 stars), Advanced Analytics Dashboard (sickn33/agentic-awesome-skills, 47k stars) and Weekly Ops Report (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ericrisco (a GitHub user) maintains it in ericrisco/rsc-harness, which has 167 GitHub stars. The repository holds 227 skills in this directory. The repository was last updated on October 7, 2026.
Source: ericrisco/rsc-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.