| name | stack-update |
| description | Apply a pending claude-code-setup update — fetches upstream, shows what changed, three-way-diffs CLAUDE.md against your local edits, and re-runs install.sh. Invoke on "update the stack", "upgrade the kit", "update claude-code-setup", "is there an update", or the SessionStart hook's update notice. |
Stack update
This kit installs by copying files into ~/.claude — once copied, an installed file has
no link back to the repo. This skill is the manual apply step for the update the SessionStart
hook noticed: fetch upstream, show what changed, gate on approval, and (critically) reconcile
CLAUDE.md, which install.sh's default ("auto") mode never overwrites once it exists — a
--claude-md=replace run (not used by this skill's step 6) does.
State dir: ${CLAUDE_HOME:-$HOME/.claude}/.claude-code-setup/ — installed (SHA that
skills, agents, and settings are at), claude-md-installed (SHA whose global/CLAUDE.md the
user actually accepted — written only when they applied the upstream hunks or confirmed a
completed hand-merge, never on a plain skip; if absent, there is no known base — install.sh
only writes it when it copied CLAUDE.md for a user who had none, so anyone with a pre-existing
personal CLAUDE.md has no stamp at all; never fall back to installed, see step 5),
claude-md-skipped (SHA of upstream's global/CLAUDE.md at the point the user last declined to
reconcile it — suppresses re-showing an identical comparison in step 5; never used as a diff
base and never implies acceptance), last-check (epoch of last poll), disabled (presence
silences the SessionStart check entirely; touch it to opt out).
Repo: https://github.com/TurboKach/claude-code-setup.git, default branch master (not
main).
Procedure
Steps 1–3 are read-only reconnaissance — nothing outside the scratchpad clone is touched, and
no state-dir file is written, until the approval gate in step 4 passes.
-
Read state. Read installed from the state dir — this is the SHA to diff against. Do
not modify any state file yet.
-
Clone. Full git clone (not --depth) of the repo into the session scratchpad. Full
history, because step 3 needs <installed> reachable to diff against; the repo is ~20
files, so a shallow clone buys nothing here. The clone is read-only reconnaissance — nothing
is copied out of it until approval.
-
Summarize what's new, grouped by surface. First check history shape with
git merge-base --is-ancestor <installed> HEAD:
- Ancestor (normal case) — derive the summary from
git log --oneline <installed>..HEAD
and git diff --stat <installed>..HEAD; raw commit subjects are not the deliverable, a
"what changes for me" bullet list is.
- Reachable but not an ancestor — upstream rewrote history (force-push). Label the
summary as divergent history, not "what changed since you installed":
<installed>..HEAD
is a set difference, not a lineage, and would misrepresent it. Base the bullets on
git diff <installed>..HEAD instead (endpoint comparison — stays correct regardless of
rewritten history).
<installed> empty, unknown, or unreachable at all — say plainly that a change summary
is unavailable because there's no base to diff against. Show only the current HEAD SHA and
short subject, and the last ~10 commit subjects (git log --oneline -10) as context — and
label that list explicitly as not a diff against what the user has installed.
Group bullets by the surfaces the user actually has installed, each stated in user-facing
terms (not a hash dump):
global/CLAUDE.md → their always-on rules — what changed, in a sentence.
skills/* → which skills are new or changed.
agents/* → which role agents changed.
global/rules/* → which path-scoped user rules are new or changed.
install.sh / settings.example.json → what the installer will now do differently.
Omit a group with no changes.
-
Approval gate #1 — apply the update at all? AskUserQuestion: "Apply this update?" with
options / / .
Opt-out
touch ~/.claude/.claude-code-setup/disabled silences the SessionStart update check
permanently (delete the file to re-enable).