altimate-code: Skill for OpenCode

.opencode/skills/dbt-unit-tests/SKILL.md

dbt-unit-tests is a skill for OpenCode from AltimateAI/altimate-code. It costs 79 tokens per session (2,327 once invoked), scanned A, original, MIT.

A generator for dbt unit tests, which check a data model's logic using mock input rows and expected results. dbt is a tool for building and testing SQL-based data transformations.

In plain words
What is it for?
Use it to add unit-test coverage to a dbt model, test-driven development (writing tests around expected behavior), or verify how a model handles specific inputs and dependencies.
Why use it?
It reduces the manual work of designing test data and covers logic such as conditions, joins, window functions, missing values, and incremental processing.

Skill for OpenCode

Written for OpenCode: installed under .opencode/.

This is AltimateAI/altimate-code's own configuration. It tells OpenCode how to work on altimate-code itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything altimate-code configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AltimateAI/altimate-code. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AltimateAI/altimate-code/main/.opencode/skills/dbt-unit-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/AltimateAI/altimate-code

Made for: OpenCode.

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 dbt-unit-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/altimateai/altimate-code/dbt-unit-tests/github.svg)](https://agentmods.dev/skills/altimateai/altimate-code/dbt-unit-tests)
Your own site
<a href="https://agentmods.dev/skills/altimateai/altimate-code/dbt-unit-tests"><img src="https://agentmods.dev/badge/skills/altimateai/altimate-code/dbt-unit-tests/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 dbt-unit-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/altimateai/altimate-code/dbt-unit-tests"><img src="https://agentmods.dev/badge/skills/altimateai/altimate-code/dbt-unit-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,327 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00079 $0.02327
Opus 5.5 $0.00032 $0.00931
Sonnet 5.5 $0.00016 $0.00465
Haiku 4.5 $0.00008 $0.00233

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

Security

Grade A, and why

dbt-unit-tests 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.

.opencode/skills/dbt-unit-tests/SKILL.md · 223 lines

How it starts

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

dbt Unit Test Generation

Requirements

Agent: builder or migrator (requires file write access) Tools used: dbt_unit_test_gen, dbt_manifest, dbt_lineage, altimate_core_validate, altimate_core_testgen, bash (runs altimate-dbt commands), read, glob, write, edit

When to Use This Skill

Use when the user wants to:

  • Generate unit tests for a dbt model
  • Add test coverage to an existing model
  • Create mock data for testing
  • Test-driven development (TDD) for dbt
  • Verify CASE/WHEN logic, NULL handling, JOIN behavior, or aggregation correctness
  • Test incremental model logic

Do NOT use for:

  • Adding schema tests (not_null, unique, accepted_values) -> use dbt-test
  • Creating or modifying model SQL -> use dbt-develop
  • Writing descriptions -> use dbt-docs
  • Debugging build failures -> use dbt-troubleshoot

The Iron Rules

  1. Never guess expected outputs. Compute them by running SQL against mock data when possible. If you cannot run SQL, clearly mark expected outputs as placeholders that need verification.
  2. Never skip upstream dependencies. Every ref() and source() the model touches MUST have a mock input. Miss one and the test won't compile.
  3. Use sql format for ephemeral models. Dict format fails silently for ephemeral upstreams.
  4. Never weaken a test to make it pass. If the test fails, the model logic may be wrong. Investigate before changing expected values.
  5. Compile before committing. Always run altimate-dbt test --model <name> to verify tests compile and execute.
  6. Mock data MUST exercise the failure modes of every SQL construct in the model. A unit test that only covers the happy path validates that the model handles easy inputs — it does not validate correctness. Before writing given: rows, list every SQL construct in the model and the boundary case it can mishandle, then ensure at least one mock row triggers each. Universal cases to always cover when the construct appears:
    • LEFT JOIN / LEFT OUTER JOIN → at least one parent row with no matching child (catches COUNT(*) phantom rows, SUM over NULL, fan-out / dropout)
    • INNER JOIN → at least one parent row whose child is filtered out by the JOIN condition (catches missing rows)
    • COUNT(*) / COUNT(<col>) → row where the counted column is NULL (catches COUNT(*) vs COUNT(col) divergence)
    • NULLIF(x, y) → row where x = y (so the result is NULL, exercising downstream NULL-handling)
    • / division → row where the denominator is 0 or NULL
    • CASE WHEN → at least one row matching each branch, including the implicit ELSE NULL if no explicit ELSE is set
    • COALESCE / IFNULL → row where every argument is NULL
    • Window functions (OVER) → a partition of size 1 (single-row group exercises rank/first/last edge cases), a row at the partition boundary, and a tie-break row (two rows with the same ORDER BY key)
    • Date arithmetic / date spines → a row at the start of range, end of range, and a gap day with no events
    • Aggregations with GROUP BY → at least one group of size 1 (often masks fan-out bugs) and one group whose key is NULL
    • Incremental merge keys → both an "insert" row and an "update" row matching an existing key If you can't think of a failure mode for a construct, you don't yet understand it well enough to test it — read the SQL again before guessing inputs.

Read the full file on GitHub · 223 lines

Files

What ships with it

4 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 · 223 lines · 79 tokens per session scan A a5dd72b5aa24

Subscribe to this mod's changes

dbt-unit-tests is a skill published in the GitHub repository AltimateAI/altimate-code (813 stars, last pushed today), licensed MIT. It adds 79 tokens to every session and 2,327 once invoked, about $0.0003 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

Other skills, from other repositories

knowledge-engineering-quality-and-delivery-unit-integration-and-shared-test-harnesses

A testing guide for the CLI and web interfaces, covering unit, integration, end-to-end, and real-process test setup with shared fixtures and cleanup.

echoVic/blade-code · 184 tokens

test-unit

Test individual functions and methods in isolation. Test happy path, edge cases, and error handling. Use when adding new functions, after bug fixes, or before commits.

dhaupin/vant · 36 tokens

test-writing

Write comprehensive tests for code including unit tests, integration tests, and end-to-end tests. Use this to ensure code quality, catch bugs, and validate functionality.

KarmaloopAI/Jiva · 35 tokens

zarr-python

Chunked N-D arrays for cloud storage. Compressed arrays, parallel I/O, S3/GCS integration, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.

synthetic-sciences/openscience · 42 tokens

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard…

synthetic-sciences/openscience · 74 tokens

llm-as-judge-evaluation

Evaluate LLM outputs using frontier models as judges. Use for pairwise model comparison, quality scoring with custom rubrics, and automated evaluation pipelines. Covers position bias mitigation, statistical significance, and generating preference data for DPO/RLHF.

synthetic-sciences/openscience · 56 tokens