The work may be done. The next agent still needs to know what actually happened.
An Agent Skill that verifies the real end state of a meaningful work session and leaves one portable resume contract for the next human or AI agent.
It captures outcomes, evidence, artifacts, decisions, blockers, lifecycle boundaries, active background work, one recovery entry, and one next safe action—without turning “wrap up” into permission to push, deploy, send, archive, delete, or invent a memory system.
Saving context is no longer a new idea. Strong public tools already preserve coding context, create handoff files, or restore prior sessions.
The failure this Skill focuses on happens one step earlier: the session ends with a confident summary that does not match reality.
- A package exists, so the handoff says it was released.
- A local test passed, so the handoff says the feature works in production.
- A report was created, so the handoff says the customer received it.
- A background agent is still running, but the next session starts from “complete”.
- Ten files are listed, but no one knows which one to open first.
- “Wrap up” silently becomes archive, close, publish, or write-to-every-memory-system.
Agent Session Wrap-Up treats closeout as a small verification transaction:
- inspect what actually happened;
- bind claims to evidence;
- stop at the real lifecycle stage;
- expose unfinished and active work;
- leave one portable resume contract.
Install the tagged release with the open-source skills CLI:
npx skills add \
https://github.com/zltstl888/agent-session-wrap-up/tree/v0.1.0 \
--skill agent-session-wrap-upOr install from the repository shorthand:
npx skills add zltstl888/agent-session-wrap-upOr clone the fixed tag into a project-local Agent Skills directory:
mkdir -p .agents/skills
git clone --branch v0.1.0 --depth 1 \
https://github.com/zltstl888/agent-session-wrap-up.git \
.agents/skills/agent-session-wrap-upThe required entry point is SKILL.md. Pin a tagged release for reproducible use; main is the development channel.
To verify the packaged release asset:
gh release download v0.1.0 \
--repo zltstl888/agent-session-wrap-up \
--pattern 'agent-session-wrap-up-v0.1.0.skill' \
--pattern 'SHA256SUMS'
sha256sum --check SHA256SUMS # Linux
# shasum -a 256 -c SHA256SUMS # macOSRequest
We fixed the export bug and packaged a candidate. The affected tests passed, but do not deploy it. Wrap up so another agent can continue tomorrow.
Closeout shape
Status: partial
Lifecycle: packaged candidate; not deployed, sent, or accepted
Background work: none observed
Safe to close: yes — no active work observed
Evidence: focused regression + affected caller + package inspection
Preserve: nine previously accepted export formats
Open: production smoke remains outside current authority
Resume: docs/handoff.md
Next: inspect the candidate diff and deployment plan, then request authorization
The full example is in examples/example-handoff.md.
- requested outcome versus observed outcome;
- current branch or worktree and dirty state when relevant;
- current artifacts versus archives and temporary evidence;
- completed, partial, blocked, and still-running work;
- checks that support each claim and the limits of those checks;
- lifecycle stages such as local, validated, packaged, committed, pushed, published, deployed, sent, received, and accepted;
- active processes, subagents, renders, uploads, deployments, or waits;
- secrets, personal data, customer data, and private-path leakage;
- the exact authority boundary for any persistent or external update.
The Skill chooses the smallest useful mode:
| Mode | Default behavior | When it writes |
|---|---|---|
| Chat-only | Return a compact resume packet | No durable destination or write authority exists |
| Project handoff | Update an existing session log, current-state file, or handoff | The destination is canonical and in scope |
| Adapter handoff | Update a task tracker, knowledge base, or team outbox | The exact adapter and external-write authority are explicit |
It does not invent a storage hierarchy just to look complete.
A good handoff answers seven questions without replaying the transcript:
- What outcome was requested?
- What is the observed state now?
- What evidence supports that state?
- Which artifacts are current?
- What decisions and constraints remain in force?
- What is unfinished, risky, or still running?
- What single entry should the next agent open, and what should it do next?
Templates are available in references/handoff-template.md.
“Wrap up” requests state capture. It does not authorize:
git push, release publication, deployment, sending, purchasing, or permission changes;- archiving, closing, deleting, resetting, moving, or terminating tasks, files, sessions, branches, or processes;
- copying credentials, private keys, cookies, personal data, customer data, or confidential material into the handoff;
- claiming that local creation, testing, packaging, or previewing proves an external lifecycle stage;
- writing to every memory, tracker, or integration the agent can access.
See references/integration-boundaries.md for the adapter contract.
Public projects such as gstack's context-save and Matt Pocock's handoff demonstrate valuable ways to preserve coding context and create compact handoffs.
This project does not claim to invent cross-session persistence. Its narrower contribution is a lifecycle-aware closeout step before persistence: verify what happened, record what the evidence proves, expose background work, prevent unauthorized side effects, and leave one resume contract that can travel across agent runtimes.
No source code or instruction text from those projects is bundled here. See PROVENANCE.md and THIRD_PARTY_NOTICES.md.
Use the Skill when someone says:
- “wrap up”, “handoff”, or “save the state”;
- “continue tomorrow” or “move this to a fresh session”;
- “finish this checkpoint and tell the next agent where to resume”;
- “record what changed before we switch branches, agents, or tools”.
Also use it after a major delivery, decision, configuration change, recovery, or long-running checkpoint that would be expensive to reconstruct.
Do not use the full protocol for ordinary progress updates, commit messages, or routine task completion with no durable recovery need.
SKILL.md Runtime instructions
README.md Public overview and installation
EVALUATION.md Usage history and public behavior fixtures
examples/example-handoff.md Synthetic lifecycle-aware example
references/handoff-template.md Compact and durable templates
references/integration-boundaries.md
Persistent and external-write contract
evals/evals.json Behavior fixtures
evals/trigger-evals.json Trigger and near-miss queries
scripts/validate_skill.py Structure and public-boundary linter
tests/test_validate_skill.py Validator regression tests
PROVENANCE.md Origin and clean-room rewrite record
THIRD_PARTY_NOTICES.md External names and bundled-material boundary
SOCIAL_PREVIEW.md Preview asset origin and release hash
This is not a concept-only Skill. The internal workflow from which the public edition was generalized has been used across software, research, document, operations, tool-evaluation, incident-recovery, and controlled-project sessions. A conservative local audit confirmed use in at least 36 distinct task groups across 50 sessions.
That repeated use produced the rules that separate lifecycle stages, protect unrelated work, expose background jobs, prevent “wrap up” from silently becoming archive or send, and leave one reliable recovery entry. The public repository includes behavior fixtures and trigger-boundary queries that encode those lessons for repeatable evaluation. Read EVALUATION.md.
The most useful contribution is a concrete failure story:
- the handoff said “done” but the lifecycle was earlier;
- the next agent opened the wrong artifact;
- active background work disappeared from the summary;
- a wrap-up leaked a secret or private path;
- an adapter wrote to the wrong system;
- the protocol added more ceremony than recovery value.
Share a fictional or fully anonymized case in Discussions, add a behavior fixture, challenge an unnecessary rule, or propose a bounded adapter. See CONTRIBUTING.md.
很多 Agent 任务不是做不完,而是下一次接不上:文件已经生成却被写成已经发布,本地测试通过却被写成生产可用,后台任务还在运行却被写成全部完成,交接列出十个路径却没有唯一入口。
agent-session-wrap-up 在保存上下文之前先核验真实状态,再输出一个可恢复的交接契约:实际结果、证据、当前生命周期、有效产物、未完成事项、后台任务、唯一恢复入口和下一步安全动作。
它默认不会因为“收工”就自动 push、部署、发送、归档、删除或写入外部系统。
npx skills add zltstl888/agent-session-wrap-upValidation requires Python 3.12 or later.
python3 -m pip install \
"git+https://github.com/agentskills/agentskills.git@69ef37e9424c0a7ea9dd2293b559e43ec8176379#subdirectory=skills-ref"
skills-ref validate "$PWD"
python3 scripts/validate_skill.py
python3 -B -m unittest discover -s tests -vThe linter detects a bounded set of structural and accidental-publication risks. It is not a complete secret scanner or privacy audit.
Published by @zltstl888 under the APEX AI project name.
Apache License 2.0. See LICENSE.