business_logic

business_logic is an agent for Claude Code from sfc-gh-dflippo/snowflake-dbt-demo. It costs 51 tokens per session (624 once invoked), scanned A, original, Apache-2.0.

A test-case assistant that reads source SQL and produces rows for its different code paths. It targets conditions such as IF branches, CASE choices, normal results, early returns, and handled errors.

In plain words
What is it for?
Use it to build branch-focused tests for database procedures from source-code analysis, using synthetic parameter values where needed.
Why use it?
It helps expose untested branches without requiring queries against the source database.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is See [`../skills/migration/migrate-objects/references/step-based-yaml.md` → Placeholders and `test_cases`](../skills/migration/migrate-objects/references/step-ba.

Part of the snowflake-migration plugin — 72 skills, 7 agents shipped together

Good fit Use it to build branch-focused tests for database procedures from source-code analysis, using synthetic parameter values where needed.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/sfc-gh-dflippo/snowflake-dbt-demo
agentmods
npx agentmods add agents/sfc-gh-dflippo/snowflake-dbt-demo/business_logic

Made for: Claude Code.

Or install snowflake-migration, the plugin that ships this one along with the rest of its 72 skills, 7 agents.

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 business_logic

README.md
[![agentmods](https://agentmods.dev/badge/agents/sfc-gh-dflippo/snowflake-dbt-demo/business_logic/github.svg)](https://agentmods.dev/agents/sfc-gh-dflippo/snowflake-dbt-demo/business_logic)
Your own site
<a href="https://agentmods.dev/agents/sfc-gh-dflippo/snowflake-dbt-demo/business_logic"><img src="https://agentmods.dev/badge/agents/sfc-gh-dflippo/snowflake-dbt-demo/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 business_logic

Your own site · 80×15
<a href="https://agentmods.dev/agents/sfc-gh-dflippo/snowflake-dbt-demo/business_logic"><img src="https://agentmods.dev/badge/agents/sfc-gh-dflippo/snowflake-dbt-demo/business_logic.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 624 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.00051 $0.00624
Opus 5 $0.00026 $0.00312
Sonnet 5 $0.00010 $0.00125
Haiku 4.5 $0.00005 $0.00062

Measured 2d ago against content hash be0ac0f461cb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

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 2d 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.

.claude/skills/snowflake-migration/agents/business_logic.md · 52 lines

How it starts

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

You produce test_cases: rows for the object in your prompt that exercise every code path in the source SQL.

You are NOT writing a YAML file. The stub YAML already exists (created by scai test seed). Your job is to produce just the test_cases: rows that will be merged into the existing stub.

See ../skills/migration/migrate-objects/references/step-based-yaml.md → Placeholders and test_cases for the row shape and dialect literal formatting.

Inputs

The prompt carries object_name, signature, source_code, and project_dir. A split of A or B means this is one half of a pair — write the matching tmp file below.

Instructions

Analyze the source code and produce rows that:

  • Exercise each IF / ELSEIF / ELSE branch.
  • Cover each CASE WHEN arm.
  • Hit the happy path with typical values.
  • Trigger early-return conditions.
  • Trigger error / exception paths (invalid inputs the proc must reject or handle).

Do not query the source database. Generate rows purely from code analysis. For parameter values that depend on data (e.g. valid IDs), use synthetic placeholder values (1, 2, 100, 999) — the data_driven agent handles real-data lookups.

When split is A, focus on happy paths and main branches. When it is B, focus on error paths, exceptions, and edge conditions found in the source SQL.

Output

Write your rows to <project_dir>/.scai/tmp/<object_name>_business_logic.yml, or _business_logic_a.yml / _business_logic_b.yml when split is set.

The file must contain only valid YAML starting with test_cases:. Also print the rows to stdout as a backup.

test_cases:
  - [1, 100.00]           # happy path - main IF branch
  - [1, 1500.00]          # high-value branch - CASE WHEN amount > 1000
  - [-1, 10.00]           # error path - negative ID
  - [null, 10.00]         # NULL guard - COALESCE branch

Read the full file on GitHub · 52 lines

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

Subscribe to this mod's changes

business_logic is an agent published in the GitHub repository sfc-gh-dflippo/snowflake-dbt-demo (33 stars, last pushed 3d ago), licensed Apache-2.0. It adds 51 tokens to every session and 624 once invoked, about $0.0003 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-10.

Related

Other agents, from other repositories