dex: Instructions file for Codex

AGENTS.md

dex AGENTS.md is an instructions file for Codex, OpenCode from exmergo/dex. It costs 18,744 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for dex, an analytics engineering toolkit that helps coding agents explore databases and maintain dbt projects. dbt is a tool for building tested, documented data models with SQL.

In plain words
What is it for?
Use them to map a warehouse or DuckDB database, create dbt models and metrics, and find schema, data-volume, or definition changes over time.
Why use it?
They provide the commands and rules for examining unfamiliar data, changing models, and detecting differences between the database and the project.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code.

This is exmergo/dex's own configuration. It tells Codex and OpenCode how to work on dex 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 dex configures →

Reuse

Borrowing it

Nothing to install: this file belongs to exmergo/dex. 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/exmergo/dex/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/exmergo/dex

Made for: Codex, 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 dex AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/exmergo/dex/agents-md"><img src="https://agentmods.dev/badge/instructions/exmergo/dex/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18,744 This file is loaded in full into every session.
When invoked 18,744 The same file — it is already loaded in full.
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.18744 $0.18744
Opus 5.5 $0.07498 $0.07498
Sonnet 5.5 $0.03749 $0.03749
Haiku 4.5 $0.01874 $0.01874

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

Security

Grade A, and why

dex AGENTS.md 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 yesterday.

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.md · 379 lines

How it starts

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

dex: driving the engine from any agent

dex is the agent-native analytics engineering toolkit. All logic lives in one portable engine, exmergo-dex-core; this file tells any coding agent how to drive it. On Claude Code the three skills (explore, transform, maintain) auto-trigger and do this for you. On other agents, follow the contract below directly. The guardrails and outputs are identical because they live in the engine, not here.

The loop: Explore, Transform, Maintain (ETM)

  1. Explore an unfamiliar warehouse or DuckDB database: rank what matters, profile selectively, infer joins, persist a draft map.
  2. Transform the project: author and refactor dbt SQL models (staging to marts) with tests and docs, and author the semantic layer on top, either as dbt semantic models (MetricFlow YAML: entities, dimensions, measures, metrics) or as native Apache Ossie documents in the repository. Both are the same job, reviewable diffs to files in git.
  3. Maintain the repository as the world changes: diff the current warehouse, the transformation project, and the semantic layer against the last .dex/ snapshot, surface schema, volume, grain, and definition drift, and propose the reconciling edits. The two project layers are fingerprinted independently, so a repository with a semantic layer and no transformation project still gets a baseline.

The command contract

The engine exposes one small, stable command surface. Run a subcommand, read the single JSON envelope it prints to stdout, decide the next step. State persists in .dex/, so subcommands are stateless and you orchestrate multi-step flows.

uv run python -m exmergo_dex_core <subcommand> [flags]
# or, with the pinned wrapper a skill ships:
uv run --no-project --script scripts/run.py <subcommand> [flags]
# and once, ahead of the first command, to pay the engine's install out of band:
uv run --no-project --script scripts/run.py --warm

Both forms need uv on PATH: it is what installs and runs the engine, and no agent host installs it for you. Without it the shell reports uv: command not found, and the shipped wrapper run directly refuses with an error envelope (reason: prerequisite) naming the fix. The install is one line (brew install uv or pipx install uv, or the installer for the user's platform from the uv docs); relay it to the user rather than running an installer yourself or reaching for another way to do the work, since every guardrail below lives in the engine.

Read the full file on GitHub · 379 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. yesterday Changed · +27 lines · +1,245 tokens per session eb58e87b7505
  2. 4d ago Changed · +3 lines · +950 tokens per session 93287808dd7f
  3. 5d ago Changed · +70 tokens per session f50f674af8dd
  4. 6d ago Changed · +6 lines · +107 tokens per session 4431a301e1d5
  5. 7d ago Changed · +161 tokens per session ef5c23aa194c
  6. 8d ago Changed · +15 lines · +842 tokens per session e69445172f7a
  7. 9d ago Changed · +1 lines · -1 tokens per session scan C → A cc6544c20fd6
  8. 12d ago Changed · +7 lines · +126 tokens per session f10015a7f5f3
  9. 14d ago Changed · +149 tokens per session 77a306f76730
  10. 18d ago First seen · 320 lines · 15,095 tokens per session scan C fc3eca403032

Subscribe to this mod's changes

dex AGENTS.md is an instructions file published in the GitHub repository exmergo/dex (88 stars, last pushed today), licensed Apache-2.0. It adds 18,744 tokens to every session, about $0.0750 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 instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,384 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,159 tokens