agentleFS
joelbarmettlerUZHjoelbarmettlerUZH/ultrainit.sh/.claude/skills/rebuild-test-image/SKILL.md

rebuild-test-image

Skill8 starsChanged 7 months agoApache-2.0View on GitHub

Make the needed changes. Common scenarios: Pinning bats helpers to a specific version (recommended — currently unpinned and cloned from HEAD): Adding a system tool: This builds and tags the image as ghcr.io/joelbarmettleruzh/ultrainit-test:latest locally. Verify all tests pass with the new image before pushing. Commit and push Dockerfile.test to main. The .github/workflows/docker-test-image.yml workflow triggers only when Dockerfile.test changes on main. The workflow pushes to ghcr.io/joelbarmettleruzh/ultrainit-test:latest. No version tag — always :latest. Trigger a test run (push any change) and verify…

  • Deletes or force-pushes
  • Installs packages
  • Commits and pushes

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify all tests pass with the new image before pushing.

    line 54
  2. Very specific:

    Commit and push Dockerfile.test to main.

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Before You Start

  • Dockerfile.test — the test image definition
  • .github/workflows/docker-test-image.yml — fires only on Dockerfile.test path changes on main
  • Makefile — test-image target
  • .github/workflows/test.yml — pulls the image from GHCR on every CI run

Steps

1. Edit Dockerfile.test

Make the needed changes. Common scenarios:

Pinning bats helpers to a specific version (recommended — currently unpinned and cloned from HEAD):

# Before (broken — HEAD can have breaking changes):
RUN git clone https://github.com/bats-core/bats-support.git

# After (pinned to a specific tag):
RUN git clone --branch v1.11.1 --depth 1 https://github.com/bats-core/bats-support.git

Adding a system tool:

RUN apt-get update && apt-get install -y --no-install-recommends \
    your-tool \
    && rm -rf /var/lib/apt/lists/*

2. Build locally

make test-image

This builds and tags the image as ghcr.io/joelbarmettleruzh/ultrainit-test:latest locally.

3. Run the full test suite against the new image

make test-all

Verify all tests pass with the new image before pushing.

4. Push to main

Commit and push Dockerfile.test to main. The .github/workflows/docker-test-image.yml workflow triggers only when Dockerfile.test changes on main.

git add Dockerfile.test
git commit -m "chore: pin bats-support to v1.11.1 in test image"
git push origin main

5. Monitor the GHCR image rebuild

gh run list --workflow=docker-test-image.yml
gh run watch

The workflow pushes to ghcr.io/joelbarmettleruzh/ultrainit-test:latest. No version tag — always :latest.

6. Verify the next CI run uses the new image

Trigger a test run (push any change) and verify test.yml pulls successfully:

gh run list --workflow=test.yml

Verify

make test-image && make test-all

Common Mistakes

  1. No concurrency control — docker-test-image.yml has no concurrency group. Two simultaneous pushes to main with Dockerfile.test changes race to push :latest. If this becomes a problem, add concurrency: { group: docker-build, cancel-in-progress: true } to the workflow.
  2. GHCR image doesn't exist yet on a fresh fork — test.yml will hang or fail on image pull. Run make test-image and push first.
  3. Editing Dockerfile.test on a branch, not main — docker-test-image.yml only fires on main. A branch change won't rebuild the GHCR image. Test locally with make test-image and verify before merging.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.