derivation-python

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

An Estuary data-pipeline guide for writing transformations in Python, including asynchronous processing, typed inputs and outputs, and optional saved state. Python transformations can also use external packages and services.

In plain words
What is it for?
Use it for embeddings, tokenisation, machine-learning models, asynchronous API calls, data processing with pandas or pyarrow, and custom Python parsers.
Why use it?
It provides a Python option when a simple SQL or TypeScript transformation is awkward, especially for machine-learning work or asynchronous network requests. It also states that these transformations require a private or customer-managed Estuary data plane.

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 for embeddings, tokenisation, machine-learning models, asynchronous API calls, data processing with pandas or pyarrow, and custom Python parsers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/estuary/agent-skills/derivation-python
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-python
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-python

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/estuary/agent-skills/derivation-python"><img src="https://agentmods.dev/badge/skills/estuary/agent-skills/derivation-python.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,437 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.00149 $0.04437
Opus 5.5 $0.00060 $0.01775
Sonnet 5.5 $0.00030 $0.00887
Haiku 4.5 $0.00015 $0.00444

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

Security

Grade A, and why

derivation-python 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 2mo 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-python/SKILL.md · 361 lines

How it starts

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

derivation-python

Estuary derivation implemented as a Python class with async-generator transforms. Runtime is uv, types come from Pydantic models generated at flowctl generate time, and the whole thing is validated in pyright strict mode at publish.

Prereq: read derivation-basics first for concepts, project layout, stateless-vs-stateful, and the universal workflow.

Hard constraint: Python derivations run on private or BYOC data planes only — never on shared public planes. Reach out to your Estuary account manager if you're interested in a private or BYOC data plane.

Docs: concept page · walkthrough · upstream examples (stateful.flow.py, pipeline.flow.py).

When to reach for Python (vs SQL / TypeScript)

  • ML / embeddings / tokenisers — model2vec, fastembed, transformers, tiktoken
  • Async I/O — per-document await httpx.get(...), external APIs with bounded concurrency
  • Heavy Python ecosystem deps — pandas, pyarrow, custom parsers
  • Rich type safety — Pydantic validators; pyright-strict at publish

Reach for other skills when plain filter/transform fits SQL (derivation-filter-transform), the logic is reducible (derivation-aggregate-metrics), or you want stateful logic without a private DP (derivation-stateful-logic, SQLite).

How it works

You declare derive.using.python.module: <file>.flow.py. flowctl generate introspects your collection schemas and emits IDerivation, Document, and Request symbols you import. Your Derivation(IDerivation) class has one async generator method per transform — named as snake_case of the YAML transforms[].name. Each transform method consumes Request.Read<TransformName> (typed Pydantic read.doc) and yields Document(...) values. Dependencies in derive.using.python.dependencies are resolved by uv at publish time and at runtime. Optional state is persisted across restarts via __init__ / start_commit / reset lifecycle methods.

Read the full file on GitHub · 361 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. 2mo ago First seen · 361 lines · 149 tokens per session scan A c179256d9d3f

Subscribe to this mod's changes

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

Related

derivation-python compared with skills from other repositories

derivation-python next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
derivation-pythonestuary/agent-skillsSkill74d agoApache-2.0A149Claude Code
accelerateNousResearch/hermes-agentSkill262ktodayMITA13Claude Code, Codex
pytorch-patternsaffaan-m/ECCSkill299k2d agoMITA32Claude Code, Kiro
developing-genkit-pythongoogle/skillsSkill24kyesterdayApache-2.0A49Claude Code, Codex
optimize-for-gpuK-Dense-AI/scientific-agent-skillsSkill56k6d agoMITA151Claude Code, Codex
marimo-pairmarimo-team/marimoSkill23kyesterdayApache-2.0A57Claude Code, Codex
cocoindexcocoindex-io/cocoindexSkill12ktodayApache-2.0A88Claude Code, Codex