- Home
- Skills
- Agents & Orchestration
- Session Handoff: Never Lose Context Between Sessions
Works with the AI Agents you already use
Session Handoff: Never Lose Context Between Sessions
Context windows fill up, sessions end, and the next agent re-asks everything, retries the approaches that already failed and forgets why decisions were made.
Free
Session Handoff: Never Lose Context Between Sessions
Example session with this skill installed
My context is almost full and I'm stopping for today. Save a handoff so tomorrow a new session can continue the Stripe webhooks work.
- Read your context and instructions
- Compiled the session handoff
**Checked state:** branch `feat/stripe-webhooks`, 6 commits ahead of main, 2 files uncommitted, tests 212 passed / 1 failed. Wrote `HANDOFF.md`: ```markdown # Handoff: Stripe webhooks for subscriptions Updated: 2026-11-07 19:40 · Branch: `feat/stripe-webhooks` · Last commit: `a41c9e2 feat(billing): verify webhook signature` ## Goal Keep subscription status in sync with Stripe. Done when created/updated/deleted and invoice.payment_failed events update `subscriptions` and are idempotent. ## State - ✅ Endpoint + signature verification - `src/billing/webhook.ts` - ✅ `customer.subscription.created|updated` - `src/billing/handlers/subscription.ts` - 🔄 `invoice.payment_failed` - handler written, test `payment-failed.spec.ts:31` fails (expects `past_due`, gets `active`) - ⬜ `customer.subscription.deleted` - ⬜ Idempotency table Tests: `pnpm test billing` -> 212 passed / 1 failed (above) ## Decisions | Decision | Why | Rejected | |---|---|---| | Raw body via `express.raw` only on `/webhooks/stripe` | signature needs raw bytes | global raw parser (breaks JSON routes) | | Store `event.id` for idempotency | Stripe retries up to 3 days | relying on updated_at | ## Dead ends - `stripe listen --forward-to localhost` failed behind company VPN -> use `stripe trigger` with VPN off. ## Gotchas - Needs `STRIPE_WEBHOOK_SECRET` (test mode secret differs from CLI secret). - Status mapping lives in `src/billing/status-map.ts`; `past_due` was missing -> cause of the failing test. ## Next step Add `past_due` to `status-map.ts` and make `payment-failed.spec.ts:31` pass. Then: 1. deleted handler 2. idempotency table + migration 3. PR ## Read first 1. `src/billing/webhook.ts` 2. `src/billing/handlers/subscription.ts` 3. `src/billing/status-map.ts` ## Commands Dev: `pnpm dev` · Test: `pnpm test billing` · Events: `stripe trigger invoice.payment_failed` ## Open questions - [ ] Downgrade access immediately on `past_due` or after grace period? (blocking for step 1: no) ``` No secrets included. Want me to commit the 2 uncommitted files as `wip(billing): payment_failed handler` and add HANDOFF.md to the branch? **Tomorrow, paste:** `Read HANDOFF.md, verify it against git and the test suite, summarise in 5 lines, then continue from "Next step".`
Connects securely to your tools. The creator never sees your data.
About this skill
## Your next agent session starts with zero memory. Fix that. Context windows fill up, sessions end, and the next agent re-asks everything, retries the approaches that already failed and forgets why decisions were made. Session Handoff makes every session end with a clean, verified hand-over. ## What it does - **Write mode**: gathers facts instead of recalling them (`git status`, diff, log, test run), then writes `HANDOFF.md`: - goal and definition of done - state: done / in progress / not started, with file paths - decisions with the *why* and rejected alternatives - dead ends tried and why they failed - gotchas (env quirks, flaky tests, API limits) - one concrete next step + remaining plan - files to read first (max 7) and exact commands - open questions for you - **Verifies** every path and command, and never writes secrets (only variable names). - **Resume mode**: reads only the handoff, checks it against git and the test suite, flags drift ("handoff says tests green; 2 now fail"), summarises in 5 lines and continues from the next step. - **Person mode**: hand-over to a teammate with context, links and how to verify, in your language. - **Parallel work**: one handoff per stream in `.handoff/` with owner and files touched. - Keeps the file current instead of appending a diary. Perfect before `/clear`, compaction, end of day, switching agents (Claude Code <-> Codex <-> Cursor) or handing work to a colleague. ## Includes - SKILL.md workflow - references/template.md - HANDOFF.md template, resume prompt, multi-stream setup Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI and any SKILL.md-compatible agent.
Requires git for state tracking. Limited to ~400 lines to keep context clean. Does not store sensitive credentials or .env contents.
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
This skill has been used 12 times.
Trust & safety
Security scan
Security scan passed 10 days ago
- Free with an Agensi account
Requires