Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/Morrison-Lab/ai-config --skill handoffコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SKILL.md を表示中
| name | handoff |
| description | Snapshot session state to memory. |
| user-invocable | true |
| allowed-tools | ["Bash","Read","Write","Edit"] |
Capture everything the next session (or a context reset) needs to resume this work cleanly, then persist it as a project memory and — if a PR/MR is in play — a paused-state note on the thread.
This is the manual trigger for the standing "always leave handoff notes
proactively when pausing" policy in memories/preferences.md: always leave
pick-up notes when pausing, especially with long-running jobs in flight. Run it
on demand, or fire it yourself proactively when you're about to pause and
something is still running.
Skip it for a clean stopping point with nothing outstanding (no jobs, no unpushed commits, no open decisions) — there's nothing to hand off.
Gather the facts. Run what's relevant; don't invent values.
TZ=America/Los_Angeles date "+%Y-%m-%d %H:%M %Z" # local-time stamp (Pacific)
git rev-parse --abbrev-ref HEAD # branch
git log --oneline -1 # local HEAD
git log --oneline @{u}..HEAD 2>/dev/null # UNPUSHED commits
git rev-parse --short @{u} 2>/dev/null # pushed HEAD on remote
git status --short # dirty / untracked
squeue -u "$USER" 2>/dev/null # SLURM jobs (if on a cluster)
Also note anything not visible to git: background tasks you launched (IDs + output paths), CI runs you're waiting on, archived/backup directories, and any open decisions the user still has to make.
Write to the project memory directory
(~/.claude/projects/<project-slug>/memory/). Reuse an existing in-flight
handoff file if one already covers this work (update it in place) rather than
creating a duplicate. Frontmatter type: project. Convert relative dates to
absolute. Capture, concretely:
Link related memories with [[name]] (e.g. any runtime-quirk memory the
pick-up steps depend on). Then add a one-line pointer to MEMORY.md (or update
the existing one).
If the work has an open PR/MR and you've claimed it (see claim-pr), post a
short note so the @claude bot and other sessions don't push conflicting
changes — especially when you have unpushed local commits or running jobs.
gh pr comment <N> --body "⏸️ **Local session paused** (<local timestamp>) — still claimed.
<2-4 bullets: in-flight jobs + IDs, unpushed local commits and why held, what runs next>
Please hold off on pushing to this branch in the meantime.
_Posted by Claude Code (AI agent) --- not written by a human._" # COMMENT_PR
If the work is genuinely finished (merged/closed, nothing outstanding), post a
closing/unclaim note instead per claim-pr — don't leave a stale "paused" claim.
Give the user a compact recap: what was snapshotted, where the memory lives, the PR note link, and the one-line pick-up summary. Include a local-time stamp.
A handoff is a snapshot with an expiry, not a durable record. Everything it carries --- a branch, an unpushed commit, a running job, an open decision --- either resolves or is superseded. Once all of it has, the handoff is not merely redundant. It is actively misleading, because a later reader meets it as orientation and cannot tell which parts still hold.
You may clear an out-of-date handoff without asking. Standing permission, given 2026-08-16. The judgment worth exercising is whether it is genuinely stale, not whether you are allowed to remove it.
Staleness is derivable rather than a matter of taste, so derive it. Take every PR, issue, branch, and job id the handoff names, and check each:
grep -oE '#[0-9]+' <handoff> | sort -u | while read -r n; do
printf " %s %s\n" "$n" "$(gh pr view "${n#\#}" --json state -q .state 2>/dev/null \
|| gh issue view "${n#\#}" --json state -q .state 2>/dev/null || echo '?')"
done
grep -oE '`[a-z]+/[a-z0-9-]+`' <handoff> | tr -d '`' | sort -u | while read -r b; do
printf " branch %-40s %s\n" "$b" \
"$(git ls-remote --heads origin "$b" | wc -l | sed 's/^0$/GONE/;s/^1$/EXISTS/')"
done
Every PR merged or closed, every branch gone, every job finished --- clear it. Anything still open or still running --- keep it, and say which item held it.
An open issue it references does not keep it alive. A handoff's value is the in-flight state it captured; an issue is tracked in the tracker, which is where a reader should meet it. Judge on the in-flight items.
The rest of this skill persists the snapshot as a project memory, which is
outside the repo and cannot be committed by accident.
A handoff written instead as a repo-root HANDOFF-*.md is untracked and
usually unignored, which is precisely the combination that lets a bare
git add -A sweep it into a PR.
That is not hypothetical.
It is the shape of ucdavis/bcs's 2026-07-30 incident, where an
untracked-and-unignored directory was staged that way and pushed a credential.
So prefer the project-memory form.
Where a repo-root file already exists, either retire it under the rule above or
add a .gitignore entry --- and read its contents before doing either, since a
stale handoff can carry a rule the project has since reversed, which is
worse than one that is merely out of date.
git add -A hazard, not merely clutter.memories/preferences.md (the "always leave handoff notes proactively"
bullet) — the policy (when to hand off automatically); this skill is the
action.memorize / remember — general fact persistence; handoff is the
specialized "save session state" case.claim-pr — owns the claim/unclaim lifecycle; handoff posts the paused
note within an existing claim.checkpoint — a lighter, deliberate mid-task snapshot for a session
that isn't ending: plan state, decisions, next actions, no branch/job/PR
mechanics. Run handoff when actually stopping; checkpoint when just
banking progress mid-task.compress-session — distills the conversation into auto memory before
the context window fills up, so a compaction (not a session end) doesn't
lose what matters. handoff ends the session; compress-session keeps it
going with a smaller, curated context.