tracing-upstream-lineage

tracing-upstream-lineage is a skill for Claude Code from astronomer/agents. It costs 40 tokens per session (1,050 once invoked), scanned A, original, Apache-2.0.

Instructions for tracing where data comes from, such as the jobs, tables, columns, or source systems that feed a target dataset. A data lineage trace shows these upstream connections.

In plain words
What is it for?
Use it to trace tables, columns, and Airflow workflows by finding producing jobs, reading their source, checking task lists, and using lineage views when available.
Why use it?
It helps explain the origin of a table or field when the source is spread across scheduled data-processing jobs.

Skill for Claude Code

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

Part of the astronomer-data plugin — 35 skills, 3 commands shipped together

Good fit Use it to trace tables, columns, and Airflow workflows by finding producing jobs, reading their source, checking task lists, and using lineage views when available.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/astronomer/agents/tracing-upstream-lineage
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.

Any agent
npx skills add astronomer/agents --skill tracing-upstream-lineage
Clone the repo
git clone --depth 1 https://github.com/astronomer/agents

Made for: Claude Code.

Or install astronomer-data, the plugin that ships this one along with the rest of its 35 skills, 3 commands.

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 tracing-upstream-lineage

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/astronomer/agents/tracing-upstream-lineage"><img src="https://agentmods.dev/badge/skills/astronomer/agents/tracing-upstream-lineage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,050 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. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 25 Feb 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00040 $0.01050
Opus 5 $0.00020 $0.00525
Sonnet 5 $0.00008 $0.00210
Haiku 4.5 $0.00004 $0.00105

Measured 9d ago against content hash f7e540bb391c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

tracing-upstream-lineage 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 9d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/tracing-upstream-lineage/SKILL.md · 138 lines

How it starts

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

Upstream Lineage: Sources

Trace the origins of data - answer "Where does this data come from?"

Lineage Investigation

Step 1: Identify the Target Type

Determine what we're tracing:

  • Table: Trace what populates this table
  • Column: Trace where this specific column comes from
  • DAG: Trace what data sources this DAG reads from

Step 2: Find the Producing DAG

Tables are typically populated by Airflow DAGs. Find the connection:

  1. Search DAGs by name: Use af dags list and look for DAG names matching the table name

    • load_customers -> customers table
    • etl_daily_orders -> orders table
  2. Explore DAG source code: Use af dags source <dag_id> to read the DAG definition

    • Look for INSERT, MERGE, CREATE TABLE statements
    • Find the target table in the code
  3. Check DAG tasks: Use af tasks list <dag_id> to see what operations the DAG performs

On Astro

If you're running on Astro, the Lineage tab in the Astro UI provides visual lineage exploration across DAGs and datasets. Use it to quickly trace upstream dependencies without manually searching DAG source code.

On OSS Airflow

Use DAG source code and task logs to trace lineage (no built-in cross-DAG UI).

Step 3: Trace Data Sources

From the DAG code, identify source tables and systems:

SQL Sources (look for FROM clauses):

# In DAG code:
SELECT * FROM source_schema.source_table  # <- This is an upstream source

External Sources (look for connection references):

  • S3Operator -> S3 bucket source
  • PostgresOperator -> Postgres database source
  • SalesforceOperator -> Salesforce API source
  • HttpOperator -> REST API source

File Sources:

  • CSV/Parquet files in object storage
  • SFTP drops
  • Local file paths

Step 4: Build the Lineage Chain

Recursively trace each source:

TARGET: analytics.orders_daily
    ^
    +-- DAG: etl_daily_orders
            ^
            +-- SOURCE: raw.orders (table)
            |       ^
            |       +-- DAG: ingest_orders
            |               ^
            |               +-- SOURCE: Salesforce API (external)
            |
            +-- SOURCE: dim.customers (table)
                    ^
                    +-- DAG: load_customers
                            ^
                            +-- SOURCE: PostgreSQL (external DB)

Read the full file on GitHub · 138 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. 9d ago First seen · 138 lines · 40 tokens per session scan A f7e540bb391c

Subscribe to this mod's changes

tracing-upstream-lineage is a skill published in the GitHub repository astronomer/agents (439 stars, last pushed 4d ago), licensed Apache-2.0. It adds 40 tokens to every session and 1,050 once invoked, about $0.0002 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.