- Home
- Skills
- Prompt & Skill Engineering
- session handoff skill
session handoff skill
Compresses active coding sessions into structured Markdown handoff documents to preserve context for future sessions.
Free
Works with the AI Agents you already use
session handoff skill
Example session with this skill installed
Generate a handoff document for the authentication refactor we just finished. Save it to handoff-auth.md.
- Read your context and instructions
- Compiled the session handoff
I have generated the handoff document for the authentication refactor and saved it to handoff-auth.md.
Session Handoff: Authentication Refactor
# Session Handoff: Authentication Refactor
**Date:** 2023-10-27
**Feature/Task:** Refactor JWT middleware to support refresh tokens
## 1. Repository Snapshot
- **Status:** `M src/middleware/auth.ts`, `M src/routes/user.ts`
- **Diff Stat:** 2 files changed, 45 insertions(+), 12 deletions(-)
- **Last Commit:** `a1b2c3d (last session) - Setup initial project structure`
## 2. Context & Objectives
Refactor the existing `auth.ts` middleware to handle token expiration and implement a `/refresh` endpoint. The goal is to move from stateless single-token JWTs to a rotating refresh token strategy.
## 3. Requirements & Constraints
- Refresh tokens must be stored in an HttpOnly cookie.
- Access tokens must expire in 15 minutes.
- Must support horizontal scaling (assumption: session store will be Redis).
## 4. Completed Work
- [x] Refactored `verifyToken` middleware to handle `TokenExpiredError`.
- [x] Created `generateRefreshToken` utility function.
- **Verification:** Ran `npm test src/middleware/auth.test.ts` - All 5 tests passed.
## 5. Decisions Made
- **Decision:** Use `RS256` for signing instead of `HS256`.
- **Reason:** To allow public key verification by microservices without sharing secrets.
## 6. Current Code State
The `src/middleware/auth.ts` now exports `authenticate` and `refresh` handlers. The `User` model has a new optional `refreshToken` field (to verify).
## 7. Conflicts & Risks
- The user requested cookie-based storage, but the current frontend prototype sends tokens in headers.
## 8. Out of Scope
- Implementing OAuth2 social logins.
- Refactoring the frontend login form.
## 9. Next Steps
1. Implement the Redis store for refresh token revocation.
2. Update the frontend `apiClient` to intercept 401 errors and call `/refresh`.
## 10. Source of Truth
If this document conflicts with the current code state, the code is the source of truth.
Next steps
- Copy the block above if you need to paste it into a separate documentation tool.
- Use the
handoff-auth.mdfile as the first input for your next session. - Verify the Redis connection settings before starting the next implementation phase.
Connects securely to your tools. The creator never sees your data.
About this skill
Context loss between coding sessions kills momentum. When you switch tasks or end your day, the next AI instance lacks the nuanced decisions, assumptions, and rejected paths from your current chat. This skill solves that by distilling the active session into a dense, structured Markdown handoff file.
What it does
- State compression summarizes complex sessions into a single, high-density document for the next LLM instance.
- Git integration snapshots the repository state using
git statusandgit diffto verify completed work against the actual file system. - Truth categorization separates confirmed facts, implementation decisions, and unverified assumptions to prevent AI hallucinations in future sessions.
- Conflict detection identifies and flags discrepancies between the code state and user instructions.
- Scope management explicitly defines out-of-scope tasks to prevent the next agent from wandering into unintended refactors or documentation work.
How it works
- Use a trigger phrase like
session handoffwhen you are ready to wrap up your current work. - The skill scans your session history and runs read-only git commands to verify the current repository status.
- It generates a 10-section Markdown document following a strict template, filtering out chit-chat and low-value exploration.
- The output is delivered as a fenced code block in chat or saved to a
.mdfile if requested.
Frameworks & tools
This skill is platform-agnostic but performs best in environments with terminal access (like Claude Code or Cursor) to utilize git for repository snapshots.
Why this beats prompting it yourself
Generic summaries often miss critical "why" decisions or include distracting fluff that eats up the next session's context window. This skill uses a specialized 10-point template and strict "gates" to ensure only high-signal information is preserved, while explicitly marking assumptions that the next agent needs to verify.
Use cases
- Closing a complex feature branch and handing it off to a teammate or a fresh AI session.
- Pausing a debugging session and ensuring the next agent knows exactly which fixes were attempted and failed.
- Documenting architectural decisions made during a long brainstorming session before starting the implementation.
Known limitations
Does not support automatic session syncing or persistent memory databases. It requires an explicit user command to trigger and cannot verify work if git is not initialized in the workspace.
Requires manual trigger. Git features only work if git is installed and initialized. Does not create persistent memory or auto-load context.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
1 use
Times used to date
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 29 days ago
- Free with an Agensi account
Requires