new-silver-model

Create a new dbt Silver model with SQL + YAML contract. Use when adding a new Silver layer model from a raw source table.

14 stars

Best use case

new-silver-model is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Create a new dbt Silver model with SQL + YAML contract. Use when adding a new Silver layer model from a raw source table.

Teams using new-silver-model should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/new-silver-model/SKILL.md --create-dirs "https://raw.githubusercontent.com/spideystreet/medox/main/.claude/skills/new-silver-model/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/new-silver-model/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How new-silver-model Compares

Feature / Agentnew-silver-modelStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Create a new dbt Silver model with SQL + YAML contract. Use when adding a new Silver layer model from a raw source table.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Skill: Add a New Silver dbt Model

## Steps

1. **Identify the raw source table** — check `dbt/models/sources.yml`; add it if missing.

2. **Create the SQL model** at `dbt/models/silver/<layer>_<source>__<entity>.sql`:
   ```sql
   {{ config(materialized='table') }}

   SELECT
       {{ clean_text('col') }}   AS col,
       {{ parse_bdpm_date('date_col') }} AS date_col
   FROM {{ source('raw', 'table_name') }}
   WHERE {{ is_valid_cis('cis') }}
   ```

3. **Create the contract** at `dbt/models/silver/<layer>_<source>__<entity>.yml`:
   ```yaml
   version: 2
   models:
     - name: <layer>_<source>__<entity>
       description: "..."
       columns:
         - name: <pk>
           data_tests: [unique, not_null]
   ```

4. **Add a new macro** in `dbt/macros/` if any transformation is reused across models.

5. **Validate** locally:
   ```bash
   uv run dotenv -f dbt/.env run -- uv run dbt run --project-dir dbt --profiles-dir dbt --select <model_name>
   uv run dotenv -f dbt/.env run -- uv run dbt test --project-dir dbt --profiles-dir dbt --select <model_name>
   ```

Related Skills

We are still matching the closest adjacent skills for this page. In the meantime, continue through the full directory.