session-handoff
它能做什么
这个工具会为你当前的工作生成一份条理清晰的摘要。它会记录你完成了什么、做了哪些决定以及还有哪些事情要做,这样你或其他人就能接着继续,而不会丢失信息。
适用场景
- ✓当你准备停止某个项目的工作时。
- ✓在清空或重启工作会话之前。
- ✓当你切换任务,或者由别人接手这项工作时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/session-handoff/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“生成一份工作摘要,方便我之后接着做。”
每周 5 个新技能,1 分钟读完。
工作原理
该工具会分析项目的当前状态,记录重要决定和待办步骤,并把这些整理成一份清晰的文档,供下一阶段使用。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Session Handoff Skill
Purpose
Large context windows degrade in instruction adherence, reasoning precision, and tool accuracy as token counts accumulate. Long sessions fill with superseded plans, aborted scratchpads, and repetitive error traces. Resetting to a fresh session restores performance, but discarding context blindly introduces state loss, hallucinated progress, and repeated mistakes.
The session-handoff skill standardizes how an agent snapshots active state. It translates ephemeral working memory into an actionable, verifiable bridge document for the next session.
When to Use This Skill
- Context usage approaches capacity (roughly >60%) and a reset is coming.
- Before running
/clearor/compactin Claude Code, Cursor, or Codex. - When switching tasks mid-session, or ending a coding session that another session (or agent) will continue.
Workflow: Ending a Session (6 Steps)
Run this sequence when an agent session reaches operational limits or when halting work:
Audit Git and Workspace State Run
git status -sandgit diff --statto establish grounded reality. Never rely on chat memory for what was modified. Identify modified, untracked, and staged files.Capture Goal State vs. Implemented Reality Define the original objective in one sentence. Document precisely what has been verified as working (with passing test commands or runtime checks) versus what remains partial or unverified.
Record Decisions Made and Discarded Paths List architectural and design choices committed during the session, along with the concrete rationale. Explicitly record negative decisions (approaches tried and discarded) to prevent the next agent from re-attempting failed solutions.
Catalog Files Touched and Relevant Symbols List key file paths, functions, classes, and schema definitions modified or referenced. Include line references where relevant.
Isolate Open Loops with Owners and Checks List all unaddressed edge cases, failing tests, deferred tasks, and environment constraints. Every open loop must specify who resolves it (Human or Agent) and how completion is verified.
Specify the Immediate Next Action Draft a single, atomic, unambiguous instruction for the next agent to execute on turn one. Do not provide a broad list; specify the exact command to run or file to edit first.
Operating Rules
- Separate Facts from Speculation: A test that passed is a fact; assuming code works because it compiled is speculation. Label untested assumptions explicitly as
[UNVERIFIED]. - Mandate Owners and Verifications for Open Loops: Every open loop must state an owner (
HumanorAgent) and a deterministic verification criteria (e.g.,pytest tests/auth/test_token.py:test_refresh_rotation passes). - Ban Vague Continuations: Never write "continue working on auth" or "finish frontend components." State the exact symbol, file, and failure mode.
- Reference Real Workspace Identifiers: All references to code must use exact file paths and symbol names. Do not use generalized pseudocode descriptions.
Worked Example: Session Handoff Note
# Session Handoff: JWT Rotation Implementation
### Goal & Current State
- **Target Goal**: Implement refresh token rotation and revocation in the FastAPI auth service.
- **Current State**: Refresh token database migration applied and rotation endpoint created. Token generation and database persistence work. Revocation blacklist cache is not yet wired into the dependency validator.
- **Verification**: `pytest tests/test_auth_tokens.py` passes (4/4 tests).
### Decisions Made (With Reasons)
- **Used Redis for Token Revocation List**: Selected Redis over Postgres lookups for revoked JTI tokens to keep latency under 5ms on protected routes.
- **Rejected Stateless Refresh Tokens**: We initially evaluated sliding expiration in JWT claims without persistence, but discarded it because compromised tokens could not be revoked before natural expiry.
- **Token Format**: Chose UUIDv4 for `jti` claim to maintain compatibility with existing session storage schemas.
### Files Changed
- `src/services/auth.py`: Added `rotate_refresh_token(old_token: str)` function and Redis invalidation call.
- `src/models/tokens.py`: Added `RefreshTokenRecord` SQLModel table for tracking token families.
- `alembic/versions/20261005_add_token_families.py`: Migration creating `token_records` table.
…
常见问题
如果我接着做就行,为什么还需要这个?
会话过长时,AI 可能会混淆,忘记重要细节或重复之前的错误。这份摘要能保证进度不丢失,让后续工作更高效。
如果我在清空会话前不使用它,会怎样?
你可能会丢失进度,AI 可能忘记已经完成的工作,你就得重做,或者修复那些本已解决的错误。
摘要会包含我写的所有代码吗?
不会。它主要关注最重要的部分:整体目标、哪些部分能正常工作、哪些不能、关键决定以及明确的下一步,而不是完整的日志。
详情
作者的原始描述
Use when context approaches capacity, before /clear or /compact, when switching tasks, or when ending a coding session: produces a structured handoff artifact for the next session.
热度
- GitHub 星标
- 48k
- 排名
- #5764
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。