session handoff skill

    1

    Compresses active coding sessions into structured Markdown handoff documents to preserve context for future sessions.

    Free

    1 useSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    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

    1. Copy the block above if you need to paste it into a separate documentation tool.
    2. Use the handoff-auth.md file as the first input for your next session.
    3. 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 status and git diff to 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

    1. Use a trigger phrase like session handoff when you are ready to wrap up your current work.
    2. The skill scans your session history and runs read-only git commands to verify the current repository status.
    3. It generates a 10-section Markdown document following a strict template, filtering out chit-chat and low-value exploration.
    4. The output is delivered as a fenced code block in chat or saved to a .md file 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed29 days ago

    What's inside

    Frequently Asked Questions

    This skill prevents 'context drift' by distilling hours of chat history into a dense, structured Markdown file that focuses on technical decisions, rejected paths, and verified code states rather than generic summaries.

    The skill works in any AI environment, but it provides the most value in tools with terminal access (like Claude Code or Cursor) where it can use git commands to cross-reference your actual code changes.

    No, the skill performs read-only git commands (`status` and `diff`) to verify the repository state against the chat history, ensuring the handoff document accurately reflects your local files.

    You will receive the optimized handoff template and the system instructions required to execute the 10-point compression logic across your preferred AI platforms.

    Yes, by explicitly defining 'Out of Scope' tasks and 'Unverified Assumptions,' the skill prevents the next AI agent from hallucinating progress or starting unauthorized refactors.

    New in Prompt & Skill Engineering