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.
npx agentmods add skills/altimateai/altimate-code/dbt-unit-testsnpx skills add AltimateAI/altimate-code --skill dbt-unit-testsgit clone --depth 1 https://github.com/AltimateAI/altimate-codeWhat 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 | $0.00079 | $0.02327 |
| Opus 5 | $0.00039 | $0.01163 |
| Sonnet 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 3d 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.
- 3d 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 (803 stars, last pushed 3d ago), licensed MIT. It adds 79 tokens to every session and 2,327 once invoked, about $0.0004 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-08-30.
Other skills, from other repositories
writing-tests
How to write a Kiro Crew backend test that has NO side effects and does not flake. Use when adding, editing, reviewing, or debugging a pytest test in the Kiro Crew source repo: which conftest is under your file, what leaks (temp dirs, the real data home, /.kiro, cron, threads, child processes), how to tell which of…
golang-testing
Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…
golang-stretchr-testify
Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification…
test-pyramid
Analyze the repo's unit and E2E tests and propose rebalancing toward a test pyramid — which E2E tests (or assertions inside them) can be covered by unit tests, which unit-level gaps genuinely need E2E coverage, and where coverage is duplicated. Use when the user asks about test pyramid, test rebalancing, "should this…
fix-flakes
Diagnose and fix flaky tests tracked as open kind/flake issues in kubernetes-sigs/agent-sandbox — reproduce the flake, apply a minimal fix, and open a PR linking the issue. Use when asked to fix a flake, work through kind/flake issues, or when run on a schedule after dev/tools/flake-report has filed flake issues.
frontend-testing
Use when writing or changing Vitest or React Testing Library tests under web/ or packages/dify-ui/, or when the user explicitly requests frontend test strategy, including evaluation of an existing strategy. Do not use for frontend code-review-only requests, general testability discussion, Python tests, or…