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.
npx skills add BauplanLabs/bauplan-skills --skill bauplan-dag-optimizationgit clone --depth 1 https://github.com/BauplanLabs/bauplan-skillsWrote 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.
[](https://agentmods.dev/skills/bauplanlabs/bauplan-skills/bauplan-dag-optimization)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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:
- How much data each model reads: columns and rows.
- How many tables are written to the lake and read back.
- How the work is split into models and into projects.
- 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
- Filters apply only to catalog inputs.
filter=onbauplan.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 withfilter=from a later project run. - 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$namesyntax, for examplefilter="event_date >= $start_date". The planner warns about unfiltered scans of tables of 20 GB or more. - Non-materialized intermediates are cheap. A model without a
materialization_strategy(the default isNONE) 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 (REPLACEdrops and rewrites the whole table). - 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.
- 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$nameparameter inside the literal is fine), not f-strings or variables.
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.
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.
- 1mo ago First seen · 139 lines · 171 tokens per session scan A 7baa88d8f457
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.
bauplan-dag-optimization compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| bauplan-dag-optimizationBauplanLabs/bauplan-skills | Skill | 17 | 3d ago | MIT | A | 171 | Claude Code |
| imagegenopenai/codex | Skill | 133k | yesterday | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 99k | yesterday | Apache-2.0 | A | 19 | Claude Code |
| local-ai-agentsmicrosoft/ai-agents-for-beginners | Skill | 79k | 4d ago | MIT | A | 200 | Claude Code, Codex |
| systematic-debuggingobra/superpowers | Skill | 313k | 3d ago | MIT | A | 21 | Claude Code |
| next-cache-components-adoptionvercel/next.js | Skill | 143k | yesterday | MIT | A | 95 | Claude Code |
| next-partial-prefetching-adoptionvercel/next.js | Skill | 143k | yesterday | MIT | A | 103 | Claude Code |