# update — Refresh the installed Shiplight skill and the selected CLI

Explicit, user-requested refresh. Unlike the automatic check in
`_shared/update-check.md`, this **always** runs regardless of the timestamp — and
it is the **only** path allowed to modify the project's `package.json` and
lockfile (`package-lock.json`, or the Bun lockfile in a Bun project). The two
exceptions any subcommand may make are named in `_shared/package-manager.md`:
recording the package manager as `packageManager`, and deleting a lockfile of
another kind with the user's consent.

Each step gives the npm command first and then its Bun-project form
(`_shared/package-manager.md` says which applies).

## 1. Skills

1. Run `npx -y skills@latest update -y` (in a Bun project,
   `bunx --bun skills@latest update -y`).
2. Update the `.shiplight-agent-skills-last-update` timestamp (even on failure).

## 2. CLI

Use the launcher in [Package manager](./_shared/package-manager.md). Read
`info`, run `update`, then read `info` again to report the selected package
and version change. Updating one package leaves the alternative package's
declaration in place.

If `info` shows a `-partner.<n>` prerelease, keep that build on its distribution
channel and report that the CLI was left in place.

## 3. Report

Briefly: the skill-update result, and the CLI version delta (`0.1.84 → 0.1.93`,
or "already current"). Name failures rather than swallowing them.

When the CLI version changed, say so explicitly: **`package.json` and the
lockfile are now modified and need to be committed** — `package-lock.json` in an
npm project, the Bun lockfile in a Bun project. CI installs straight from the
lockfile, so an uncommitted bump leaves every CI run on the old CLI — the exact
drift this subcommand exists to close.
