Once a month, scans a repository's Dockerfiles and CI cache configuration for ordering mistakes that defeat layer caching, applies minimal reordering fixes, and opens a single pull request that estimates the build time and layer savings. Returns no PR when the Dockerfiles are already ordered correctly.
- Identifier
build-cache-optimizer- Version
- 1.0.1
- Steps
- 3
- Triggers
- 1
- build
- cache
- docker
- ci
- optimization
- cost
When it runs
schedule.monthly- Schedule
- Day 1 of each month at 00:00 UTC
0 0 1 * * - Timezone
- UTC
The pipeline
The graph below is the one the workflow opens with in the builder — same steps, same layout, drawn on the same canvas. The run playing through it is a simulation; the branches and conditions are real.
- 01Monthly Schedule (1st 00:00 UTC)
triggerThe event that starts the run.
- 02Clone Repository ⚠️ SET YOUR REPO
git.cloneShallow-clones the repository at the right ref.
- 03Optimize Build Cache & Open PR
agent.runOne agent works the task with its toolkit.
The agent
Build Cache Optimizer
- Base type
- Senior Developer
- Temperature
- 0.2
- Max iterations
- 40
- Tools
- 8
Filesystem · 3
read_fileRead File · readlist_dirList Directory · readedit_fileEdit File · write
Git provider · 3
create_branchCreate Branch · writecreate_or_update_fileCreate or Update File · writecreate_pull_requestCreate Pull Request · write
Terminal · 1
run_terminal_cmdRun Terminal Command · write
Status · 1
update_statusUpdate Status · write
Related playbooks
CI Duration Regression Watch
Weekly analysis of CI durations that identifies regressed jobs, opens the workflow definition, and proposes a specific cause and fix.
Deploy Verification
After a deploy workflow succeeds, independently verifies that serving revisions, health endpoints, and client bundles match the built commit.
Fix CI
Reads CI failure logs, locates the root cause in the diff, and pushes a fix.