bauplan-dag-optimization

bauplan-dag-optimization is a skill for Claude Code from BauplanLabs/bauplan-skills. It costs 171 tokens per session (2,864 once invoked), scanned A, original, MIT.

A workflow for restructuring a Bauplan data pipeline, called a DAG, so it runs faster without changing its results. A DAG is a set of data-processing steps connected by their dependencies.

In plain words
What is it for?
It is for profiling and optimizing existing Bauplan pipelines, including model structure, table materialization, projections, filters, project boundaries, and data partitioning.
Why use it?
It finds performance costs in the data being read, written, and processed, then proposes changes such as narrower inputs, different materialization, and better partitioning. It also checks the project's Bauplan SDK version before making changes.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the bauplan plugin — 9 skills shipped together

Good fit It is for profiling and optimizing existing Bauplan pipelines, including model structure, table materialization, projections, filters, project boundaries, and data partitioning.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bauplanlabs/bauplan-skills/bauplan-dag-optimization
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 BauplanLabs/bauplan-skills --skill bauplan-dag-optimization
Clone the repo
git clone --depth 1 https://github.com/BauplanLabs/bauplan-skills

Made for: Claude Code.

Or install bauplan, the plugin that ships this one along with the rest of its 9 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 bauplan-dag-optimization

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/bauplanlabs/bauplan-skills/bauplan-dag-optimization"><img src="https://agentmods.dev/badge/skills/bauplanlabs/bauplan-skills/bauplan-dag-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 171 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,864 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.00171 $0.02864
Opus 5.5 $0.00068 $0.01146
Sonnet 5.5 $0.00034 $0.00573
Haiku 4.5 $0.00017 $0.00286

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

Security

Grade A, and why

bauplan-dag-optimization 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 1mo 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.

plugins/bauplan/skills/bauplan-dag-optimization/SKILL.md · 139 lines

How it starts

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

Optimize a Bauplan DAG

Contents

Mental model · Workflow · 1. Inventory · 2. Profile · 3. Materialization · 4. Inputs · 5. Model structure · 6. Project boundaries · 7. Partitioning · 8. Verify and measure · Proposal

References: partitioning.md for the profiling queries and partitioning heuristics, patterns.md for before/after code.

This skill uses the typed SDK (0.3.0+) syntax: inputs are Annotated[pa.Table, bauplan.Model(...)], projections are TableSchema classes passed as projection_schema=, and every model declares its output schema in its return annotation. If the project is on an older SDK, migrate it first with the bauplan-migrate-to-typed-sdk skill, or ask the user before optimizing old-style code.

Mental model

Bauplan handles I/O, Arrow conversion between models, where intermediate data lives and when work is scheduled. A model that is not materialized is still handed to its children by the platform; you do not manage memory or placement, and you should not try to. Performance comes from data modeling:

  1. How much data each model reads: columns and rows.
  2. How many tables are written to the lake and read back.
  3. How the work is split into models and into projects.
  4. How large tables are partitioned, so that reads prune and runs rewrite only what changed.

The biggest wins are almost always I/O: fewer materialized intermediates, narrower inputs, and partitioned tables that consumers can read slice by slice.

Platform facts that drive the decisions

  1. Filters apply only to catalog inputs. filter= on bauplan.Model(...) works only on a table that already exists in the catalog when the run starts. Setting it on a model produced in the same run is rejected by the planner ("Apply the filter inside the function"). To read a slice of an intermediate, materialize it in one project and read it with filter= from a later project run.
  2. Catalog filters and projections are pushed into the scan. The filter drives Iceberg file pruning (partition values and file statistics) before any data reaches the model, and only the projected columns are read. Pruning needs plain comparisons on columns: event_date >= '2025-01-01' prunes, LOWER(region) = 'emea' or other functions on the column do not. Parameters can be used inside filters with $name syntax, for example filter="event_date >= $start_date". The planner warns about unfiltered scans of tables of 20 GB or more.
  3. Non-materialized intermediates are cheap. A model without a materialization_strategy (the default is NONE) does not write to object storage and no Iceberg commit happens. A materialized output is additionally written to object storage and committed to the catalog (REPLACE drops and rewrites the whole table).
  4. Light models run in parallel. Within a job, when possible, independent models run in parallel. As a rule of thumb, the lighter the jobs, the easier it is to parallelize them. Heavier jobs, which take up a lot of memory, can result in an overall job slowdown.
  5. Declarations are read statically. filter=, projection_schema=, the schema classes and the decorators are parsed from the source before execution, so filters must be string literals (a $name parameter inside the literal is fine), not f-strings or variables.

Read the full file on GitHub · 139 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 139 lines · 171 tokens per session scan A 7baa88d8f457

Subscribe to this mod's changes

bauplan-dag-optimization is a skill published in the GitHub repository BauplanLabs/bauplan-skills (17 stars, last pushed 3d ago), licensed MIT. It adds 171 tokens to every session and 2,864 once invoked, about $0.0007 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-10-08.

Related

bauplan-dag-optimization compared with skills from other repositories

bauplan-dag-optimization next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bauplan-dag-optimizationBauplanLabs/bauplan-skillsSkill173d agoMITA171Claude Code
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code