redshift-lineage-from-stl

redshift-lineage-from-stl is a command for Claude Code from kouko/redshift-comment-mcp. It costs 63 tokens per session (284 once invoked), scanned A, original, MIT.

A read-only tool that reconstructs actual table-to-table data lineage from Amazon Redshift query history. Data lineage shows which tables supply or affect other tables.

In plain words
What is it for?
It helps inspect recent Redshift queries, limit results by date, table, or user, and optionally produce a Mermaid diagram of the relationships.
Why use it?
It finds ad-hoc, business-intelligence, and manual queries that a dbt manifest, a file describing dbt-managed dependencies, may miss.

Command for Claude Code

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

Part of the redshift-comment-mcp plugin — 7 skills, 7 commands, 1 MCP server shipped together

Good fit It helps inspect recent Redshift queries, limit results by date, table, or user, and optionally produce a Mermaid diagram of the relationships.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kouko/redshift-comment-mcp/redshift-lineage-from-stl
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/kouko/redshift-comment-mcp

Made for: Claude Code.

Or install redshift-comment-mcp, the plugin that ships this one along with the rest of its 7 skills, 7 commands, 1 MCP server.

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 redshift-lineage-from-stl

README.md
[![agentmods](https://agentmods.dev/badge/commands/kouko/redshift-comment-mcp/redshift-lineage-from-stl/github.svg)](https://agentmods.dev/commands/kouko/redshift-comment-mcp/redshift-lineage-from-stl)
Your own site
<a href="https://agentmods.dev/commands/kouko/redshift-comment-mcp/redshift-lineage-from-stl"><img src="https://agentmods.dev/badge/commands/kouko/redshift-comment-mcp/redshift-lineage-from-stl/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 redshift-lineage-from-stl

Your own site · 80×15
<a href="https://agentmods.dev/commands/kouko/redshift-comment-mcp/redshift-lineage-from-stl"><img src="https://agentmods.dev/badge/commands/kouko/redshift-comment-mcp/redshift-lineage-from-stl.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 284 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.00063 $0.00284
Opus 5 $0.00032 $0.00142
Sonnet 5 $0.00013 $0.00057
Haiku 4.5 $0.00006 $0.00028

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

Security

Grade A, and why

redshift-lineage-from-stl 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.

commands/redshift-lineage-from-stl.md · 15 lines

What it actually says

Use the redshift-comment-mcp:redshift-lineage-from-stl skill. Argument forms:

  • /redshift-lineage-from-stl --since 2026-04-01 (mine queries since date)
  • /redshift-lineage-from-stl --since 7d (last 7 days)
  • /redshift-lineage-from-stl --since 7d --table dbt_marts.fct_orders (scope to one table)
  • /redshift-lineage-from-stl --since 7d --user [email protected] (scope to one user)
  • /redshift-lineage-from-stl --since 7d --output mermaid (also emit Mermaid graph)
  • /redshift-lineage-from-stl --since 7d --include-system (include pg_catalog/STL/etc)

Caveat: STL retention is roughly 2-5 days on provisioned clusters, longer on serverless. The skill detects cluster type and warns if --since exceeds retention.

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 · 15 lines · 63 tokens per session scan A 8220c3d7816d

Subscribe to this mod's changes

redshift-lineage-from-stl is a command published in the GitHub repository kouko/redshift-comment-mcp (1 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 284 once invoked, about $0.0003 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-31.