agentleFS
alvaroofernaandezalvaroofernaandez/aval/skills/kiri-health/SKILL.md

kiri-health

Skill5 starsChanged 5 days agoMITView on GitHub

Trigger: docker no funciona, revisa kiri, health check docker, kiri setup, docker context, builder multiarch, restos de orbstack/colima. Diagnose Kiri, Docker context, daemon, builders and leftover runtimes.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-only by default: diagnose and report.

    line 15
  2. Distinctive:

    Never touch Docker state while diagnosing: no prune, rm, or context changes.

    line 16
  3. Very specific:

    If OrbStack/Colima/Lima traces are found, NEVER remove them automatically: show the exact removal plan (commands, paths, sizes) and wait …

    line 17
  4. Very specific:

    Run: docker context ls, docker context show, docker info, docker buildx ls, docker system df, kiri --version, df -h /.

    line 43
  5. Very specific:

    Run: ls -l ~/.kiri/run/docker.sock /var/run/docker.sock, launchctl list | rg dev.kiri, kiri diag logs -n 50 --errors.

    line 44
  6. Very specific:

    Run: ps aux | rg -i 'colima|lima|orbstack' | rg -v ' rg ', command -v colima limactl, ls -d /Applications/OrbStack.app, rg -n -i …

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Activation Contract

Load when Docker fails, the user asks for a Docker/Kiri health check, a build produces the wrong architecture, or there is any suspicion of a second runtime (OrbStack, Colima, Lima, Docker Desktop) on the machine.

Hard Rules

  • Read-only by default: diagnose and report; change nothing without approval, except the recovery commands below once the user agrees.
  • Never touch Docker state while diagnosing: no prune, rm, or context changes.
  • If OrbStack/Colima/Lima traces are found, NEVER remove them automatically: show the exact removal plan (commands, paths, sizes) and wait for confirmation.
  • A sleeping VM (idle > 60 s) is normal; it wakes in ~0.15 s on the next command.
  • Report only measured values; a check that was not run is reported as "not run".

Decision Gates

CheckHealthyRecommended action if not
docker context showkiridocker context use kiri; if absent, kiri setup
echo $DOCKER_HOSTemptyremove it from shell rc files (ask)
ls -l ~/.kiri/run/docker.sock /var/run/docker.socksocket exists, /var/run links to itkiri setup
ls /Library/LaunchDaemons | rg com.dockernothingDocker Desktop's com.docker.socket helper re-links /var/run/docker.sock to the dead ~/.docker/run/docker.sock on every boot, and Kiri's dev.kiri.docker-socket only links when the path is absent, so Docker's wins. With the user's sudo: launchctl bootout system/com.docker.socket, remove /Library/LaunchDaemons/com.docker.{socket,vmnetd}.plist and /Library/PrivilegedHelperTools/com.docker.*, then ln -sfn ~/.kiri/run/docker.sock /var/run/docker.sock
launchctl list | rg dev.kiri.daemonlistedkiri setup (re-creates the agent)
docker infosucceedskiri diag logs --errors, then kiri setup
kiri diag logs -n 50 --errorsno recent errorsquote the errors; kiri diag report for a bundle
docker buildx lsbuilder multiarch presentdocker buildx create --name multiarch --driver docker-container --driver-opt default-load=true --bootstrap kiri
echo $BUILDX_BUILDERmultiarchexport it in ~/.zprofile / ~/.zshrc
command -v kiriresolves (~/.kiri/bin)add ~/.kiri/bin to PATH
command -v colima limactl, ls -d /Applications/OrbStack.appnoneremoval plan (ask)
OrbStack.app, ~/.orbstack, ~/.colima, ~/.lima, login itemsabsentremoval plan with du -sh sizes (ask)
Contexts other than kiri/default in docker context lsabsentdocker context rm <name> (ask)
df -h / free> 20 GiBload docker-space-optimizer
du -sh ~/Library/Application\ Support/Kirimeasured and reportedload docker-space-optimizer if large

Execution Steps

  1. Run: docker context ls, docker context show, docker info, docker buildx ls, docker system df, kiri --version, df -h /.
  2. Run: ls -l ~/.kiri/run/docker.sock /var/run/docker.sock, launchctl list | rg dev.kiri, kiri diag logs -n 50 --errors.
  3. Run: ps aux | rg -i 'colima|lima|orbstack' | rg -v ' rg ', command -v colima limactl, ls -d /Applications/OrbStack.app, rg -n -i 'colima|orbstack|DOCKER_HOST|BUILDX_BUILDER' ~/.zshrc ~/.zprofile ~/.bashrc ~/.profile.
  4. Evaluate every row of the decision table.
  5. Recovery, only after approval: kiri setup (re-creates context, agent and builder; kiri setup --uninstall removes them), then recreate multiarch if missing, then prove it with docker run --rm hello-world and a native vs --platform linux/amd64 build checked with docker image inspect -f '{{.Architecture}}'.

Output Contract

Return one table: Check | Status (OK / WARN / FAIL / not run) | Measured value | Recommended action. Then, if any OrbStack/Colima trace exists, the removal plan awaiting confirmation.

References

  • ../kiri-docker/SKILL.md — daily use and the multiarch build rule.
  • ../docker-space-optimizer/SKILL.md — when space checks fail.

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.