source-tieout

source-tieout is an agent for coding agents from ai-analyst-lab/ai-analyst. It costs 0 tokens per session (2,732 once invoked), scanned C, original, MIT.

A data-checking agent that reads source files in two different ways and compares the results with a DuckDB database. DuckDB is a database designed for querying files and datasets.

In plain words
What is it for?
Use it to check CSV, Excel, Parquet, or JSON files against DuckDB tables and stop a data pipeline when the basic figures do not match.
Why use it?
It catches loading mistakes such as wrong separators, missing rows, misread dates, or encoding problems before they affect analysis.

Agent

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.

agentmods
npx agentmods add agents/ai-analyst-lab/ai-analyst/source-tieout
Clone the repo
git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst

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 source-tieout

README.md
[![agentmods](https://agentmods.dev/badge/agents/ai-analyst-lab/ai-analyst/source-tieout.svg)](https://agentmods.dev/agents/ai-analyst-lab/ai-analyst/source-tieout)
Your own site
<a href="https://agentmods.dev/agents/ai-analyst-lab/ai-analyst/source-tieout"><img src="https://agentmods.dev/badge/agents/ai-analyst-lab/ai-analyst/source-tieout.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,732 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00000 $0.02732
Opus 5 $0.00000 $0.01366
Sonnet 5 $0.00000 $0.00546
Haiku 4.5 $0.00000 $0.00273

Measured 5d ago against content hash c9de519d8bae, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

source-tieout scanned grade C with 1 finding 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 5d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- CONTRACT_START name: source-tieout description: Verify data loading integrity by comparing pandas direct-read vs DuckDB SQL on foundational metrics. HALT on mismatch. inputs: - name: DATA_SOURCE type: file source: s
agents/source-tieout.md · 267 lines

How it starts

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

Agent: Source Tie-Out

Purpose

Verify data loading integrity by reading source files two independent ways (pandas direct read vs DuckDB SQL) and comparing foundational metrics. Catches data loading errors — wrong delimiter, dropped rows, date misparsing, encoding issues — that would otherwise corrupt both the analysis and its validation. Acts as a pipeline gate: FAIL halts the pipeline before analysis begins.

Inputs

  • {{DATA_SOURCE}}: Path to the source data file(s) — CSV, Excel, Parquet, or JSON. Can be a single file or a directory of files.
  • {{DUCKDB_PATH}}: Path to the DuckDB database file (e.g., working/hawaii.duckdb). If using MotherDuck, provide the connection string.
  • {{DATASET_NAME}}: Short name for output file naming (e.g., "hawaii", "my_dataset").
  • {{TABLE_MAPPING}}: (optional) Explicit mapping of source files to DuckDB table names, as file.csv:table_name pairs. If not provided, the agent will auto-discover the mapping by matching filenames to table names.

Workflow

Step 0: Schema Pre-Scan

Before discovering the source-to-table mapping, run an automated schema profile to understand the full dataset structure and identify which tables, columns, and relationships should be validated.

Read the full file on GitHub · 267 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. 5d ago First seen · 267 lines · 0 tokens per session scan C c9de519d8bae

Subscribe to this mod's changes

source-tieout is an agent published in the GitHub repository ai-analyst-lab/ai-analyst (296 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,732 tokens. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.