/ctx:ctx-handoverfrom ctx
Writes per-session handover artifacts (.context/handovers/) with --summary and --next. Used as final step of /ctx-wrap-up; optionally invoked mid-session with --no-fold. Folds postdated closeouts when .context/kb/ exists.
Ships in ctx. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Capture the session's narrative thread so the next session (a fresh agent, a different operator, a cold restart the next morning) can resume without re-deriving context probabilistically from canonical files plus journal.
This skill is the sole authoritative recall artifact writer
(per KB-RULES.md §Four inviolable rules: "the handover is
the sole authoritative recall artifact"). SESSION_LOG.md
entries, closeouts, and journal entries are mid-flight surfaces;
the handover is what /ctx-remember reads on session start.
Authoritative background reading:
.context/ingest/KB-RULES.md §Four inviolable rules;
specs/kb-editorial-pipeline.md §Interface.
/ctx-wrap-up owns the user-facing trigger for session-end
("let's wrap up", "save state", "leave a handover", "before I
go", "stepping away") and delegates to this skill as its final
step. Do not advertise this skill as a direct user trigger.
/ctx-wrap-up. Every /ctx-wrap-up
run ends with this skill.--no-fold). This is the one case
where direct invocation is appropriate./ctx-handover recently in this session
and nothing has changed since./ctx-task-add,
/ctx-decision-add, etc.); those write to canonical files,
not to a handover artifact./ctx-handover: writes
.context/handovers/<TS>-<slug>.md; folds postdated
closeouts from .context/ingest/closeouts/ into the
handover's ## Folded closeouts section; archives folded
closeouts to .context/archive/closeouts/. Single writer of
this artifact./ctx-wrap-up: owns the user-facing session-end
trigger. Drives the broader capture ceremony (learnings,
decisions, conventions, tasks) and always delegates to
/ctx-handover as its final step./ctx-remember: reads the latest handover plus any
closeouts whose generated-at postdates the handover; the
read-side counterpart to this skill's write surface./ctx-task-add, /ctx-decision-add,
/ctx-learning-add, /ctx-convention-add): write to the
five canonical files. This skill never modifies those files;
the handover narrative references them, it does not author
them./ctx-handover "kb editorial pipeline phase KB skills drafted"
/ctx-handover "rev2 spec landed; tomorrow start the writer package"
/ctx-handover "research session on cursor hooks"
/ctx-handover --no-fold "mid-session checkpoint before lunch"
The skill wraps ctx handover write, which enforces required
flags via MarkFlagRequired and rejects placeholder bodies via
the Phase SK validation pattern. Empty TBD, see chat,
whitespace-only values are rejected by the CLI, not just by the
skill text.
| Flag | Type | Default | Description |
|---|---|---|---|
--summary | string | (required) | Past tense; what happened this session. |
--next | string | (required) | Future tense; what the next agent should do FIRST. Specific, not vague. |
--highlights | string | "" | Notable artifacts produced this session. |
--open-questions | string | "" | Things that remain undecided. |
--no-fold | bool | false | Skip closeout consumption (mid-session checkpoint). |
--commit | string | (resolved) | Override resolved git HEAD for Provenance line (CI replay). |
Positional argument: handover title (becomes filename slug).
Two distinct refusals, each leaves zero residue:
.context/ missing → suggest ctx init and stop..context/handovers/ missing → suggest ctx init --upgrade
and stop..context/kb/ is not required for handover; the artifact
exists for code-dev sessions as well. KB-state folding is
conditional on the directory's existence (see §Process).
Verify pre-write gates. Refuse cleanly if any gate fails. Zero residue on refusal.
Gather signal silently (mirror /ctx-wrap-up Phase 1
when invoked standalone):
git status --short
git diff --stat
git log --oneline @{upstream}..HEAD 2>/dev/null || git log --oneline -5
Scan the conversation history for:
Draft --summary and --next. Both are required, both
are validated non-placeholder by the CLI:
--summary: past tense. One paragraph. Names what
was done, not what was attempted. Concrete: "drafted six
Phase KB skill files; reconciled rev2 spec changes;
deferred CLI wiring to next session", not "made
progress on KB stuff".--next: future tense. One paragraph. Names the
specific first action the next agent should take.
Concrete: "start internal/cli/handover/cmd/write/cmd.go
using Phase SK validation pattern", not "continue
work" or "look at the kb".Surface the drafts to the user for confirmation before running the CLI. The user is the final authority on what the handover says.
Run ctx handover write with the confirmed values:
ctx handover write "<title>" \
--summary "<one-paragraph past tense>" \
--next "<one-paragraph future tense>" \
[--highlights "<bullet list>"] \
[--open-questions "<bullet list>"] \
[--no-fold] \
[--commit <sha>]
The CLI:
gitmeta.ResolveHead (honors
CTX_TASK_COMMIT and GITHUB_SHA for CI replay).LatestHandoverCursor to find the postdated
closeout window.UnconsumedCloseouts (closeouts whose
generated-at postdates the cursor).## Folded closeouts section. Malformed
closeouts (missing generated-at, malformed frontmatter)
are skipped with a warning.ArchiveCloseouts to move folded closeouts to
.context/archive/closeouts/. Archived closeouts are
immutable..context/handovers/<TS>-<slug>.md.When --no-fold is set, the fold + archive steps are
skipped; closeouts stay in place. Use for mid-session
checkpoints where the user wants the handover artifact but
intends to keep ingesting before the next session boundary.
Report the result. Surface:
The fold mechanism is the integration point between the
editorial pipeline (/ctx-kb-* closeouts) and session continuity
(handover artifacts). Mechanically:
LatestHandoverCursor reads .context/handovers/ and returns
the generated-at of the newest handover (or zero time if
none exists).UnconsumedCloseouts walks .context/ingest/closeouts/ and
returns every closeout whose generated-at postdates the
cursor.## Folded closeouts in the new handover, in generated-at
order. The frontmatter is preserved verbatim so the audit
trail survives the fold.ArchiveCloseouts moves the source files to
.context/archive/closeouts/. Archived closeouts are
immutable; subsequent passes never re-fold them.A handover with no postdated closeouts to fold writes a
## Folded closeouts section with the body "none"; never
omit the section, so the audit trail is explicit.
| Case | Expected behavior |
|---|---|
.context/ missing | Refuse; suggest ctx init. No residue. |
.context/handovers/ missing | Refuse; suggest ctx init --upgrade. No residue. |
Empty --summary or --next | The CLI rejects with the placeholder-rejection message; surface verbatim. |
Placeholder values (TBD, see chat, whitespace-only) for --summary or --next | The CLI rejects; surface verbatim and ask the user to redraft. |
| No postdated closeouts to fold | Write the handover with ## Folded closeouts body "none". Never omit the section. |
| Postdated closeout has malformed frontmatter | The CLI skips the file with a warning naming it. Report the warning to the user so they can fix or delete. |
--no-fold set | Skip the fold + archive steps; the handover stands alone; closeouts stay in .context/ingest/closeouts/ for the next invocation. |
| Mid-session re-invocation | Each invocation writes a new handover file. The newest one is what /ctx-remember reads next session. Multiple per session are fine. |
| Session aborted before wrap-up | Closeouts stay in place; next session's /ctx-remember reads canonical files + the last handover + any postdated unfolded closeouts. Editorial work survives. |
User runs /ctx-wrap-up without .context/kb/ present | /ctx-wrap-up still drives /ctx-handover as its final step; kb-presence affects what gets folded, not whether the handover is written. |
gitmeta.ResolveHead returns an error (no git, detached HEAD with no fallback) | The CLI surfaces the typed MissingGitError; relay verbatim. Phase RG owns the recovery path; this skill does not invent one. |
CTX_TASK_COMMIT or GITHUB_SHA set | Honoured for the Provenance line per gitmeta.ResolveHead's precedence rules; no special handling here. |
--summary "TBD" or --next "see chat". The CLI rejects these; do not work around the
rejection by inventing prose that technically passes the
placeholder check but is still vague.--no-fold explicitly when the user wants the checkpoint
behavior; do not infer it.KB-RULES.md §Closeout shape.--highlights or --open-questions content the
session did not actually produce. Light compression for
clarity is allowed; new facts are not.For pre-write refusals, return only the specified refusal text and stop.
For successful handover writes, end with this structured summary:
none).sha=<short> branch=<name> as resolved by
the CLI.--next value, verbatim, so the
operator sees what the next agent will read first.Before reporting completion, verify:
--summary is past tense and concrete (no placeholder).--next is future tense and specific (no placeholder).--no-fold was explicitly
requested)..context/archive/closeouts/.What SKILL.md sets; muted values are Claude Code's defaults
54 skills in this plugin
/ctx-agentLoad full context packet. Use at session start or when context seems stale or incomplete./ctx-architectureBuild and maintain architecture maps. Use to create or refresh ARCHITECTURE.md and DETAILED_DESIGN.md. Supports principal mode for deeper analysis: vision, future direction, bottlenecks, implementation alternatives, gaps, upstream proposals, and intervention points./ctx-architecture-enrichEnrich architecture artifacts with code intelligence data. Takes existing /ctx-architecture output as baseline, verifies and quantifies with GitNexus MCP (blast radius, execution flows, domain clustering, registration sites). Run after /ctx-architecture, not instead of it./ctx-architecture-failure-analysisAdversarial failure analysis for codebases. Generates falsifiable incident hypotheses: race conditions, ordering assumptions, cache staleness, error swallowing, ownership gaps, idempotency failures, and scaling cliffs. Produces DANGER-ZONES.md with evidence-backed, ranked findings./ctx-archiveArchive completed tasks. Use when TASKS.md has many completed items cluttering the view./ctx-blogGenerate blog post draft. Use when documenting project progress, sharing learnings, or writing about development experience.npx claudepluginhub activememory/ctx --plugin ctxOther plugins' skills for the same job