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.
curl -O https://raw.githubusercontent.com/AltimateAI/altimate-code/main/.opencode/skills/dbt-unit-tests/SKILL.mdgit clone --depth 1 https://github.com/AltimateAI/altimate-codeWrote 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.
[](https://agentmods.dev/skills/altimateai/altimate-code/dbt-unit-tests)<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.
<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>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once 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 |
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.
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
- 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.
- Never skip upstream dependencies. Every ref() and source() the model touches MUST have a mock input. Miss one and the test won't compile.
- Use sql format for ephemeral models. Dict format fails silently for ephemeral upstreams.
- Never weaken a test to make it pass. If the test fails, the model logic may be wrong. Investigate before changing expected values.
- Compile before committing. Always run
altimate-dbt test --model <name>to verify tests compile and execute. - 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 (catchesCOUNT(*)phantom rows,SUMoverNULL, 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 isNULL(catchesCOUNT(*)vsCOUNT(col)divergence)NULLIF(x, y)→ row wherex = y(so the result isNULL, exercising downstreamNULL-handling)/division → row where the denominator is0orNULLCASE WHEN→ at least one row matching each branch, including the implicitELSE NULLif no explicitELSEis setCOALESCE/IFNULL→ row where every argument isNULL- 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 isNULL - 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.
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.
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.
- 1mo ago First seen · 223 lines · 79 tokens per session scan A a5dd72b5aa24
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.
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.
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.
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.
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.
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…
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.