Agent skill

Docker Buildx Stale Rust Binary

by divinevideo in divinevideo/divine-mobile

Fix deployed Rust binaries not reflecting code changes when using docker buildx.

MPL-2.0Auto-check passedDevOps & Cloud

Install Docker Buildx Stale Rust Binary

skills CLI
$ npx skills add divinevideo/divine-mobile --skill docker-buildx-stale-rust-binary -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install divinevideo/divine-mobile docker-buildx-stale-rust-binary --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/docker-buildx-stale-rust-binary .claude/skills/docker-buildx-stale-rust-binary && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
docker-buildx-stale-rust-binary
GitHub stars
266
Token cost
~874 tokens
SKILL.md length
217 words
Files
1
Skills in repo
103
Repo updated
First seen
Licence
MPL-2.0

At a glance

Fix deployed Rust binaries not reflecting code changes when using docker buildx.

  • Code changes are verified locally (tests pass) but production behavior doesnt change after deploy
  • SKILL.md covers Problem, Context / Trigger Conditions, Solution and Verification, plus 2 more sections
  • Calls docker
  • Docker image has a new tag but contains old compiled binary

What it does

Docker Buildx Stale Rust Binary is an agent skill from divinevideo/divine-mobile. Fix deployed Rust binaries not reflecting code changes when using docker buildx. Use when: (1) Code changes are verified locally (tests pass) but production behavior doesn't change after deploy, (2) Docker image has a new tag but contains old compiled binary, (3) Dockerfile uses multi-stage build with dependency pre-compilation layer and source copy layer. Docker buildx layer caching can serve stale compilation output even when source files change, especially with cross-compilation (--platform linux/amd64).

Its SKILL.md is about 870 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Containers. It works with Docker, Rust and Linux. The licence is MPL-2.0.

When your agent uses it

  • Code changes are verified locally (tests pass) but production behavior doesnt change after deploy
  • Docker image has a new tag but contains old compiled binary
  • Dockerfile uses multi-stage build with dependency pre-compilation layer and source copy layer

Example prompts

  • “/docker-buildx-stale-rust-binary”

Requirements

  • Docker

What it can do on your machine

Read from SKILL.md and the folder at commit 6487b05. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Docker Buildx Stale Rust Binary loads about 874 tokens when it runs. Until then it costs about 136 tokens; SKILL.md has 217 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~136
When it runs · the whole SKILL.md, loaded when a task matches
~874

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from divinevideo/divine-mobile at commit 6487b05, republished under its MPL-2.0 licence (© divinevideo). 217 words, ~874 tokens.

Download SKILL.mdSave it as .claude/skills/docker-buildx-stale-rust-binary/SKILL.md (or your agent's skills folder).
name
docker-buildx-stale-rust-binary
description
Fix deployed Rust binaries not reflecting code changes when using docker buildx. Use when: (1) Code changes are verified locally (tests pass) but production behavior doesn't change after deploy, (2) Docker image has a new tag but contains old compiled binary, (3) Dockerfile uses multi-stage build with dependency pre-compilation layer and source copy layer. Docker buildx layer caching can serve stale compilation output even when source files change, especially with cross-compilation (--platform linux/amd64).
author
Claude Code
version
1.0.0
date
2026-03-31

Docker Buildx Stale Rust Binary Cache

Problem

Docker buildx may serve stale compiled Rust binaries from layer cache even when source files have changed. The image gets a new tag and pushes successfully, but contains the old compiled binary. This is especially common with cross-platform builds (--platform linux/amd64 on ARM Macs).

Context / Trigger Conditions

  • Dockerfile uses multi-stage pattern: copy Cargo.toml → build deps → copy source → build
  • Using docker buildx build --push with --platform linux/amd64
  • Code changes verified locally (tests pass) but production shows old behavior
  • Image digest from cached build differs from --no-cache build
  • Adding a simple response header in code and it doesn't appear in production

Solution

Always use --no-cache when deploying code changes:

bash
# WRONG — may use cached compilation layer with old code
docker buildx build --platform linux/amd64 --target api \
  -t registry/image:tag --push .

# CORRECT — forces full recompilation
docker buildx build --platform linux/amd64 --target api \
  --no-cache -t registry/image:tag --push .

Verification

Compare image digests between cached and no-cache builds:

bash
# Build with cache
docker buildx build --platform linux/amd64 --target api \
  -t registry/image:cached --push . 2>&1 | grep "pushing manifest"
# Note the sha256 digest

# Build without cache
docker buildx build --platform linux/amd64 --target api \
  --no-cache -t registry/image:nocache --push . 2>&1 | grep "pushing manifest"
# Note the sha256 digest

# If digests differ, the cached build had stale code

Example

Typical Dockerfile pattern vulnerable to this:

dockerfile
# Layer 1: Copy manifests (cached if Cargo.toml unchanged)
COPY Cargo.toml Cargo.lock ./
COPY crates/*/Cargo.toml crates/

# Layer 2: Build dependencies (cached — this is the good cache)
RUN cargo build --release && rm -rf src crates

# Layer 3: Copy actual source (SHOULD invalidate on source change)
COPY crates crates
COPY bin bin

# Layer 4: Rebuild with actual source
RUN touch crates/*/src/lib.rs && cargo build --release

The issue: buildx's content-addressable cache may match Layer 4's output from a previous build if the intermediate representations happen to collide, especially during cross-compilation where the build environment state is more complex.

Notes

  • This primarily affects --platform cross-compilation builds (ARM → x86)
  • Native-platform builds are less likely to hit this issue
  • The --no-cache flag adds ~5-10 minutes to Rust builds but guarantees fresh compilation
  • Alternative: use --cache-from with explicit cache scoping to avoid stale layers
  • Consider adding a build-time env var (like commit hash) that forces layer invalidation:
    dockerfile
    ARG BUILD_HASH
    RUN echo $BUILD_HASH && cargo build --release

© divinevideo, MPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/docker-buildx-stale-rust-binary of divinevideo/divine-mobile.

Open the folder on GitHubat commit 6487b05

Compare with similar skills

Docker Buildx Stale Rust Binary next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Docker Buildx Stale Rust Binary compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docker Buildx Stale Rust Binary this skilldivinevideo/divine-mobile266—~874Automated safety check: PassMPL-2.0
Frb Dockerfzyzcjy/flutter_rust_bridge5.4k—~914Automated safety check: PassMIT
GreptimeDB Dev Docker ImageGreptimeTeam/greptimedb6.7k—~4kAutomated safety check: NotesApache-2.0
GitHub Actions CreatorFNOSP/FlyNarwhal4961 repos~2.4kAutomated safety check: PassAGPL-3.0
Swig CI Reproswig/swig6.3k—~1.2kAutomated safety check: PassCustom licence
Docker Jfr Benchmark Loopeclipse-rdf4j/rdf4j420—~945Automated safety check: PassBSD-3-Clause

Similar skills

  • Frb Docker

    fzyzcjy/flutter_rust_bridge

    A skill your agent uses for ordinary flutterrustbridge Docker/devcontainer setup, local image usage, and Apple Silicon containers; route image upgrades and publishing to frb-upgrade-docker.

    5.4k GitHub stars~914 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • GreptimeDB Dev Docker Image

    GreptimeTeam/greptimedb

    Packages a locally built GreptimeDB debug binary into a development-only Docker image for local-cluster testing, with an optional push to a dev registry.

    6.7k GitHub stars~4k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • GitHub Actions Creator

    FNOSP/FlyNarwhal

    A skill your agent uses when the user wants to create, generate, or set up a GitHub Actions workflow.

    496 GitHub starsUsed in 1 repo~2.4k tokens
    DevOps & CloudAuto-check passed
  • Swig CI Repro

    swig/swig

    Reproduce a GitHub Actions Linux CI failure locally when it does not happen on your machine: a podman/docker image that mirrors the ubuntu-22.04 runner by reusing the real Tools/CI-linux-.sh install…

    6.3k GitHub stars~1.2k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Docker Jfr Benchmark Loop

    eclipse-rdf4j/rdf4j

    Run a repeatable RDF4J performance loop against one JMH benchmark in Docker with Linux Java 26 and JFR CPU-time profiling.

    420 GitHub stars~945 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Official

    Configures automatic crash dumps or captures dumps from running processes for modern .NET apps on Linux, macOS and Windows, including Docker and Kubernetes.

    5.6k GitHub starsUsed in 2 repos~1.1k tokens
    DevOps & CloudAuto-check passed

More from divinevideo/divine-mobile

All 103 skills in this repo
  • Fix ArgoCD ExternalSecret deployment failing with "namespace X is not permitted in project Y".

    266 GitHub stars~931 tokensUpdated today
    Auto-check passed
  • Art Direct

    divinevideo/divine-mobile

    Art direction for any content — reads text, PDF, Word, HTML, PPT, then proposes 2-3 creative directions with photography style, mood, and visual language.

    266 GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Async Await Null Race Condition

    divinevideo/divine-mobile

    Fix "Null check operator used on a null value" errors when an object is set to null during an async await.

    266 GitHub stars~881 tokensUpdated today
    Auto-check passed
  • AWS V4 Signing Custom Headers Gcs

    divinevideo/divine-mobile

    Add custom metadata headers (x-amz-meta-) to AWS v4 signed requests for GCS S3-compatible API.

    266 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Bash Herestring Newline Secrets

    divinevideo/divine-mobile

    Fix password/secret authentication failures caused by trailing newlines when creating Google Cloud secrets (or similar) with bash here-strings.

    266 GitHub stars~791 tokensUpdated today
    Auto-check passed
  • Fix silent video/media processing failures caused by URL extraction code that filters on file extensions (.mp4, .webm, .webp).

    266 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Docker Buildx Stale Rust Binary

What does Docker Buildx Stale Rust Binary do?

Fix deployed Rust binaries not reflecting code changes when using docker buildx. Docker Buildx Stale Rust Binary is an agent skill from divinevideo/divine-mobile. Fix deployed Rust binaries not reflecting code changes when using docker buildx.

When should I use Docker Buildx Stale Rust Binary?

Docker Buildx Stale Rust Binary fits situations like: code changes are verified locally (tests pass) but production behavior doesnt change after deploy; Docker image has a new tag but contains old compiled binary; dockerfile uses multi-stage build with dependency pre-compilation layer and source copy layer.

How do I install Docker Buildx Stale Rust Binary in Claude Code?

Run `npx skills add divinevideo/divine-mobile --skill docker-buildx-stale-rust-binary -a claude-code`. Or copy the skill folder (.agents/skills/docker-buildx-stale-rust-binary in divinevideo/divine-mobile) into .claude/skills/docker-buildx-stale-rust-binary in your project. Claude Code loads it when a task matches its description.

How do I install Docker Buildx Stale Rust Binary in Codex?

Run `npx skills add divinevideo/divine-mobile --skill docker-buildx-stale-rust-binary -a codex`. Or copy the skill folder (.agents/skills/docker-buildx-stale-rust-binary in divinevideo/divine-mobile) into .agents/skills/docker-buildx-stale-rust-binary in your project. Codex loads it when a task matches its description.

Can I use Docker Buildx Stale Rust Binary in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add divinevideo/divine-mobile --skill docker-buildx-stale-rust-binary -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docker-buildx-stale-rust-binary, .gemini/skills/docker-buildx-stale-rust-binary, .github/skills/docker-buildx-stale-rust-binary and .opencode/skills/docker-buildx-stale-rust-binary in your project.

What does Docker Buildx Stale Rust Binary need to run?

Going by SKILL.md and its folder, Docker Buildx Stale Rust Binary needs the command-line tools its instructions call (docker). Our summary lists: Docker.

Does Docker Buildx Stale Rust Binary access the network?

SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Docker Buildx Stale Rust Binary safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Docker Buildx Stale Rust Binary use?

Docker Buildx Stale Rust Binary is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Docker Buildx Stale Rust Binary use?

About 874 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Docker Buildx Stale Rust Binary?

Skills that share tags, products or a category with Docker Buildx Stale Rust Binary: Frb Docker (fzyzcjy/flutter_rust_bridge, 5.4k stars), GreptimeDB Dev Docker Image (GreptimeTeam/greptimedb, 6.7k stars), GitHub Actions Creator (FNOSP/FlyNarwhal, 496 stars) and Swig CI Repro (swig/swig, 6.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docker Buildx Stale Rust Binary?

divinevideo (a GitHub organization) maintains it in divinevideo/divine-mobile, which has 266 GitHub stars. The repository holds 103 skills in this directory. The repository was last updated on October 9, 2026.

Source: divinevideo/divine-mobile on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.