model-context

model-context is an agent for Claude Code from kbichave/skills. It costs 97 tokens per session (2,023 once invoked), scanned A, original, MIT.

A metadata reader that builds a map of dbt models, their settings, tests, lineage, production tables, exposures, and scheduled jobs. It reads structure and metadata without reading table rows.

In plain words
What is it for?
It helps inspect changed models or a target table, including incremental filters, test status, upstream sources, downstream users, and the job that runs each model.
Why use it?
It gives data-quality investigations a shared picture of how models and sources connect, while avoiding unnecessary access to table data. This helps later checks use the right model context.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the deep plugin — 5 skills, 22 agents, 6 hooks shipped together

Good fit It helps inspect changed models or a target table, including incremental filters, test status, upstream sources, downstream users, and the job that runs each model.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kbichave/skills/model-context
Install

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.

Clone the repo
git clone --depth 1 https://github.com/kbichave/skills

Made for: Claude Code.

Or install deep, the plugin that ships this one along with the rest of its 5 skills, 22 agents, 6 hooks.

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 model-context

README.md
[![agentmods](https://agentmods.dev/badge/agents/kbichave/skills/model-context/github.svg)](https://agentmods.dev/agents/kbichave/skills/model-context)
Your own site
<a href="https://agentmods.dev/agents/kbichave/skills/model-context"><img src="https://agentmods.dev/badge/agents/kbichave/skills/model-context/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 model-context

Your own site · 80×15
<a href="https://agentmods.dev/agents/kbichave/skills/model-context"><img src="https://agentmods.dev/badge/agents/kbichave/skills/model-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,023 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.00097 $0.02023
Opus 5.5 $0.00039 $0.00809
Sonnet 5.5 $0.00019 $0.00405
Haiku 4.5 $0.00010 $0.00202

Measured 11d ago against content hash 97d8c97bcc47, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

model-context 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 11d 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.

agents/model-context.md · 134 lines

How it starts

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

Model context (context stage: model-context)

Describe a scope of one or more dbt models as one picture: shared sources and exposures once, then one entry per model. The hypothesizer, the prover, the domain-context reader, and the review-verifier all read your output, so they never fetch this metadata again.

Input

Your prompt contains:

  • models: the changed models (names or paths), or a target (a model, table, source, or domain) for dq-investigate.
  • repo: the dbt project root.
  • profile: the resolved deployment profile JSON, or null. It names the production environment, the layer naming, the CI schema pattern, and the warehouse tool.

Hard limits

  • No table data. The only warehouse queries allowed are metadata: INFORMATION_SCHEMA.TABLES, INFORMATION_SCHEMA.COLUMNS, SNOWFLAKE.ACCOUNT_USAGE.TABLES (with deleted is null), and describe. Never select from a model or source relation.
  • Never call get_model_details or get_node_details on a model or test to read its SQL; read the .sql file instead, and only its config(), header comment, and is_incremental() block. Use node details for sources and exposures only.
  • Never read a schema .yml whole: grep for - name: <model> and read that range.
  • Scope cap: about 60 relations. Past that, cut by distance from the changed set and state the cut in cut.

Steps

  1. Probe tools. Note which of the dbt MCP (either prefix) and a warehouse query tool are present. Each missing tool goes in unavailable; continue with what remains.
  2. Health. get_model_health per model: unique_id, last run status and time, every test with its last status, upstream source freshness.
  3. Lineage. For each unique_id:
    • get_lineage upstream, depth=0, no types filter (a type filter breaks the walk): every ancestor back to the raw sources and seeds. Direct parents are the ones with an edge to the model.
    • get_lineage downstream, depth=0, types=["Model","Exposure"], limit=500: the downstream count, the exposures reached, and any other in-scope model it feeds.
  4. Relations. One metadata query for the names of the in-scope models, upstream models, and direct children: database, schema, row count, last altered. Pick the production copy using profile.environments; with no profile, take the copy with no environment prefix, else the prod_ one, and say which rule you used. Then describe each production relation for its columns and types. Write every relation as DATABASE.SCHEMA.TABLE.
  5. Config. Read each model's .sql for materialization, incremental strategy, unique_key, the incremental filter (one line), and the header comment's purpose and grain.
  6. Jobs. get_model_performance (last 5 runs for in-scope models, the last run for lineage nodes), then get_job_run_details once per distinct run id and get_job_details once per distinct job: name, environment, trigger, schedule (cron and in words), and which step selects the model and how (path, tag, selector, + operator). A node with no run has no job; record it, never guess one.
  7. Sources and exposures. get_source_details for each raw source (relation, loader, freshness config) and get_exposure_details for each exposure (owner, type, url), once each.

Read the full file on GitHub · 134 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. 11d ago First seen · 134 lines · 97 tokens per session scan A 97d8c97bcc47

Subscribe to this mod's changes

model-context is an agent published in the GitHub repository kbichave/skills (2 stars, last pushed 12d ago), licensed MIT. It adds 97 tokens to every session and 2,023 once invoked, about $0.0004 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-10-08.

Related

Other agents, from other repositories

data-model-architect

Use when an orchestrator needs a Dataverse data model proposed (existing-table reuse, new tables in dependency-tier order, Mermaid ER diagram) for embedding in native-app-plan.md. Read-only — proposes, never mutates. Called by native-app-planner and /edit-app; not invoked directly by users.

microsoft/power-platform-skills · 67 tokens

genpage-entity-builder

Creates Dataverse entities (tables, columns, relationships, choices) specified in genpage-plan.md using the plugin's Node.js Web API scripts. Handles dependency ordering, propagation delays, sample data creation (with $batch bulk), and solution membership. Called by the genpage skill when new entities need creating …

microsoft/power-platform-skills · 73 tokens

data-engineer

Adversarial data and database engineer who assumes the design is mis-normalized and indexed for a workload that does not exist. Audits schemas, migrations, queries, ORM code, document shapes, stream contracts, and pipelines against normalization, dimensional modeling, key-value access patterns, columnar and…

testdouble/han · 216 tokens

d1-query-optimizer

Performance analysis agent that identifies slow queries, missing indexes, and optimization opportunities in Cloudflare D1 databases using metrics, insights, and query plan analysis. Use when encountering slow queries, high latency, or performance degradation.

secondsky/claude-skills · 49 tokens

verifier

Use this agent when verifying that implementation meets success criteria, validating phase completion, checking plan coverage before execution, or performing pre-ship validation. Examples: Context: A phase has been fully built and reviewed, and needs final verification before moving on. user: "Verify that the database…

lgbarn/shipyard · 278 tokens

doctrine-performance-optimizer

Read-only performance audit of Doctrine usage: N+1 queries, fetch modes, batch processing, missing indexes, and caching opportunities. Use proactively after adding entities, relations, repository queries, or when a page/endpoint is reported slow.

dev-toolings/superpowers-symfony · 53 tokens