Index of every page on this site: llms.txt
All skills
Run it yourself

Audits a repository's GitHub Actions workflows for CI optimization opportunities — missing caches, redundant setup, sleep-based readiness, long test jobs without sharding, full-history checkout, dead env vars, build-cache misconfig, and ~60 more patterns across caching, redundancy, parallelization, conditional execution, trigger scope, and hidden failures. Use when: (1) analyzing a repo's CI for optimization opportunities, (2) producing a prioritized report with measured wall-clock and runner-minute savings, (3) re-auditing after upstream CI changes. Do not trigger for: general CI setup help, writing new workflows from scratch, non-GitHub-Actions CI systems, or security/posture audits — use `ci-secure` for those.

Use this Skill: https://skilld.dev/gh/starslingdev/skills/ci-speedup

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencespatternsopt102-emulated-multi-platform-image-compilation.md

≈894 tokens on demand. Your agent reads this file only when SKILL.md points to it.

OPT102 — Foreign-Architecture Image Compilation Runs Under Emulation

Anti-pattern: A Docker Buildx or docker build step on one inspected builder node builds a Linux architecture foreign to that node's native platform from a repository-local Dockerfile whose compile or source-install stage does not run on the build platform (FROM --platform=$BUILDPLATFORM). Buildx then runs that work through emulation, which is often far slower than native compilation. Target flags such as GOARCH, GOOS or --target inside a target-platform stage do not avoid this: the compiler itself still runs emulated.

Detection heuristic:

  • require a foreign Linux platform on a job whose runs-on resolves to a different native platform; resolve literal environment, matrix, reusable-workflow input, and earlier-step output values, while leaving unknown values silent
  • read only a repository-local build context and Dockerfile
  • require a compile command in a Dockerfile stage the built target reaches; recognize common Go, Rust, CMake, Ninja, Meson, Node native-addon, Python wheel, Maven, and related build commands, including shell heredocs
  • count npm ci or npm install only when the stage explicitly requests source builds with a skip-prebuilt or npm_config_build_from_source flag
  • stay quiet when that stage's FROM uses --platform=$BUILDPLATFORM, directly or through the stage it is based on
  • confirm the log diagnosis only when docker buildx inspect --bootstrap shows exactly one builder node; skip user-configured platforms marked with * and use the first detected platform as that node's native platform, failing closed when the inspect block is missing, lists multiple nodes, or contains no detected platform
  • confirm the opportunity from buildx per-platform RUN and DONE lines; report source installs separately and size the opportunity only when foreign-architecture compile and source-install time is at least half of all measured cold image-build layer time and, when native compilation was measured, each measured foreign architecture takes at least twice that native compile time; include shared-stage layers without a platform prefix in the cold-layer total, and let a foreign-only build qualify against the cold-layer share alone

Fix: Build platform-independent output once in a stage based on FROM --platform=$BUILDPLATFORM, passing the target architecture to a supported cross-compiler, then copy the artifact into each target image. Native cross-compilation still costs about one native compile per extra architecture, so size the saving as the emulated seconds minus the native seconds for each foreign architecture, and retain cache import/export, image export, and push time. cgo with CGO_ENABLED=1, Rust -sys crates, and native Node add-ons can require tonistiigi/xx or gcc-<arch>-linux-gnu. If the toolchain cannot cross-compile safely, build on native runners per architecture and merge the manifests; check each runner's cores and memory against link-time optimisation and parallel links, and build only the binaries the image ships. Preserve every platform, verify the produced binary architecture, test each image natively, and compare total runner minutes as well as wall time.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert2d3 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    The skill is a robust CI optimization tool that audits GitHub Actions workflows. It identifies performance bottlenecks using deterministic logic and provides analysis of job logs. While it processes untrusted log data, it includes strong defensive instructions to mitigate indirect prompt injection. A minor best-practice issue regarding unsafe YAML loading was identified in a utility script.

  • Socket2d

    No alerts

  • Snyk2d

    Risk: CRITICAL · 2 issues

Signed by skilld at 9a84115. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 16 hours ago.

Activeupdated yesterday

README badge

README badge for starslingdev/skills/ci-speedup