Skip to content

feat: refresh installed flux skills on flux update - #21

Merged
JoeriDijkstra merged 1 commit into
masterfrom
feat/update-skill
Oct 16, 2026
Merged

JoeriDijkstra merged 1 commit into
masterfrom
feat/update-skill

Conversation

@JoeriDijkstra

@JoeriDijkstra JoeriDijkstra commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Goal

flux update should also update the Flux skill (reuse flux install)

flux update replaced only the binary, so the skill installed by flux install stayed at the old version and agents didn't learn about new commands. With this change, flux update refreshes the skill for every agent that already has one, from the binary it just installed.

Changes

  • After replacing the binary, flux update runs <binary path> install <agent> for each of claude, omp and codex whose <root>/skills/flux/SKILL.md exists, under the same roots and override variables as flux install. The skill therefore comes from the new release, and an edited skill is backed up to SKILL.md.bak-<time> exactly as flux install does.
  • It also refreshes when the binary is already up to date, which fixes skills left stale by brew upgrade or by the first update from v0.5.0 (that update still runs v0.5.0's code).
  • A symlinked skill folder or SKILL.md is skipped with Skipped <agent>: <path> is a symlink. A failed refresh prints a warning to stderr, the other agents still refresh, and the command exits 0, because the binary update succeeded. With no skill installed, it prints one hint to run flux install.
  • --no-skill skips the refresh.
  • The three agents now live in one agents table in cmd/install.go, shared by install and update.
  • README, flux install --help and skill/SKILL.md (Quick Reference) document the refresh.

Verification

  • go vet ./... and go test -race ./... pass. The new table-driven TestRefreshSkills uses a fake flux script and covers: nothing installed, one agent, all three, a folder without SKILL.md, a symlinked folder, a symlinked SKILL.md, and one failing install.
  • Smoke under a temporary HOME with the built binary:
    • built as v0.5.0 (already latest): claude and omp backed up and refreshed, symlinked codex skipped, exit 0; --no-skill left all skills untouched; a read-only claude folder gave the warning, omp still refreshed, exit 0; no skills gave the hint
    • built as v0.4.9: downloaded v0.5.0, and the refreshed skill is byte-identical to v0.5.0's skill/SKILL.md, not this branch's, so the skill comes from the new binary

After replacing the binary, flux update runs "<binary> install <agent>"
for every agent (claude, omp, codex) that already has the skill, so the
skill comes from the new release. It also refreshes when already up to
date. Symlinked skills are skipped; a failed refresh is a warning and the
command still exits 0. --no-skill skips the step.
@JoeriDijkstra
JoeriDijkstra merged commit c47eb4a into master Oct 16, 2026
2 checks passed
@JoeriDijkstra
JoeriDijkstra deleted the feat/update-skill branch October 16, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant