Skip to content

Gate CI on drift

Make a CI job fail when installed skills drift from the lockfile, or when newer skill versions are available. GSKILL is non-interactive by default, so these commands are CI-safe out of the box.

  • A committed skills-lock.json.
  • A CI job that checks out the repo and has gskill available.
Terminal window
gskill install --frozen-lockfile # restore exactly; exit 4 if lock is out of sync
gskill project check --fail-on-drift # exit 7 if installed state drifts from the lock

Expected: both exit 0 on a clean, in-sync project. check --fail-on-drift exits 7 if drift is detected; install --frozen-lockfile exits 4 if the lock cannot be restored exactly as recorded.

Recipe 2 — Fail when updates are available

Section titled “Recipe 2 — Fail when updates are available”
Terminal window
gskill outdated --exit-code # exit 8 if any skill has a newer version

Expected: exit 0 when everything is current; exit 8 when at least one update is available. Use this in a scheduled job to be notified, not in the main build if you don’t want updates to break it.

Terminal window
gskill project check --json # structured status on stdout

Diagnostics go to stderr; the --json result is the only thing on stdout, so it stays parseable.