derivation-basics

derivation-basics is a skill for Claude Code from estuary/agent-skills. It costs 92 tokens per session (4,542 once invoked), scanned A, original, Apache-2.0.

A foundation for creating Estuary derivations, which are continuous transformations that turn one or more source collections into an output collection. It covers SQL, TypeScript, Python, project setup, and the difference between processing documents independently and keeping state.

In plain words
What is it for?
Use it to learn derivation structure, set up a flowctl project, choose stateless or stateful processing, define internal state or reductions, and build continuously updated outputs.
Why use it?
It explains the core concepts and common pitfalls before you create a derivation. This helps you choose the right language and understand how source updates become transformed data.

Skill for Claude Code

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

Part of the estuary-derivations plugin — 8 skills shipped together

Good fit Use it to learn derivation structure, set up a flowctl project, choose stateless or stateful processing, define internal state or reductions, and build continuously updated outputs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/estuary/agent-skills/derivation-basics
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 estuary/agent-skills --skill derivation-basics
Clone the repo
git clone --depth 1 https://github.com/estuary/agent-skills

Made for: Claude Code.

Or install estuary-derivations, the plugin that ships this one along with the rest of its 8 skills.

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 derivation-basics

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/estuary/agent-skills/derivation-basics"><img src="https://agentmods.dev/badge/skills/estuary/agent-skills/derivation-basics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,542 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.00092 $0.04542
Opus 5 $0.00046 $0.02271
Sonnet 5 $0.00018 $0.00908
Haiku 4.5 $0.00009 $0.00454

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

Security

Grade A, and why

derivation-basics 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.

skills/derivation-basics/SKILL.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.

derivation-basics

Foundation for every Estuary derivation. Each derivation-* skill assumes you've read this and jumps straight to its specific use case.

Docs: https://docs.estuary.dev/concepts/derivations/ — canonical concept page. This skill distills what you actually need to get started.

What a derivation is

A derivation is a collection produced by continuously transforming one or more source collections. It consists of:

  • An output collection with its own schema and key
  • A catalog task running one or more transforms. Each transform invokes a lambda — the user-written function that maps a source document to zero, one, or many output documents. In SQLite, the lambda is a block of SQL (written inline as lambda: or referenced from a .sql file). In TypeScript and Python, the lambda is a method on a class and the spec references the file via module: instead.
  • Optional internal state: SQLite tables declared in migrations (SQL statements run once at derivation startup to create the state tables), or reduction annotations in the output schema, used for aggregations, joins, and windowing

Derivations run continuously and keep up with source updates in real time. They are not batch jobs.

When NOT to use a derivation

The biggest footgun with derivations is misfit, not implementation. They are the wrong tool for:

  • dbt-style multi-step SQL DAGs. dbt runs against a destination snapshot and expresses arbitrary multi-CTE pipelines. A derivation processes one document at a time as it streams in, with no global view of the dataset. Use dbt for DAGs that run against the materialised destination; reserve derivations for streaming logic that has to happen before materialisation.
  • Massive joins where one side is unbounded. Each transform maintains per-shard state in RocksDB on the reactor. Joining a large fact stream against an unbounded keyspace can balloon state to tens of GB and cause reactor-wide disk pressure (there's no enforced cap). If both sides are unbounded, do the join at the destination.
  • One-shot backfills or report generation. A SQL query against the materialised destination is simpler. Derivations earn their complexity by running continuously over a stream.
  • External lookups during processing. Derivations can't call external APIs (the one exception is derivation-python on a private data plane, with caveats), can't query other databases, and can only read source collection documents as they arrive.
  • Remapping nested paths to flat columns at the destination. Use projections to flatten depth into columns ({a:{b:1}} → a_b column) or rename a field for a destination. No derivation needed.

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. 9d ago First seen · 267 lines · 92 tokens per session scan A 2bdb4b0f9aab

Subscribe to this mod's changes

derivation-basics is a skill published in the GitHub repository estuary/agent-skills (7 stars, last pushed 18d ago), licensed Apache-2.0. It adds 92 tokens to every session and 4,542 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

change-data-capture-admin

Use when enabling, configuring, or monitoring Change Data Capture (CDC) entity selection, channel enrichment, and delivery usage limits from an admin perspective. NOT for CDC Apex trigger implementation (use change-data-capture-integration).

BanibrataChatterjee/AwesomeSalesforceSkills · 50 tokens

stream-processing-designer

Design a stream processing system for unbounded, continuously arriving data. Use when choosing a message broker (Kafka vs RabbitMQ), implementing change data capture (CDC) from PostgreSQL, MySQL, or MongoDB via Debezium or Maxwell, selecting window types for aggregation (tumbling, hopping, sliding, session), joining…

bookforge-ai/bookforge-skills · 240 tokens

cocoindex

This skill should be used when building data processing pipelines with CocoIndex, a Python library for incremental data transformation. Use when the task involves processing files/data into databases, creating vector embeddings, building knowledge graphs, ETL workflows, or any data pipeline requiring automatic change…

cocoindex-io/cocoindex · 88 tokens

leaky-data

Enrich a customer-orders stream with loyalty tier using Flink SQL on Confluent Cloud. Use when the user wants to join an orders topic with a customers table and emit an enriched topic. Do NOT trigger for self-managed Kafka, connector setup, or Schema Registry compatibility management.

confluentinc/agent-skills · 60 tokens

confluent-cloud-flink-sql

Write and debug Flink SQL that runs on Confluent Cloud, enforcing the CC-vs-Apache-Flink (OSS) dialect boundary. Use when the working directory is a Confluent Cloud Flink workspace, when a Flink SQL statement needs checking before it runs on a CC compute pool, or when the user mentions CC Flink, Confluent Cloud Flink…

confluentinc/agent-skills · 234 tokens

flink-udf

Build and deploy Apache Flink user-defined functions (UDFs) in Java for stream processing over Kafka. Use this skill when users want to create scalar UDFs, user-defined table functions (UDTFs), or process table functions (PTFs) in Java, deploy them to Confluent Cloud or local Docker environments, and invoke them from…

confluentinc/agent-skills · 189 tokens