DevPilot – Switch Agents, Keep the Context

    1

    Moving to another coding agent? Carry over decisions, changed files, Git state, and next steps in one Markdown handoff.

    Free

    1 useSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    DevPilot – Switch Agents, Keep the Context

    Example session with this skill installed

    Hand off this session to Gemini. Capture the OAuth refactor decisions, changed files, Git state, open questions, and remaining documentation and integration-test tasks.

    • Read your context and instructions
    • Compiled the devpilot

    Illustrative handoff adapted from the example bundled with DevPilot; project paths, commits, test results, and CI status below are example data, not a newly verified session.

    Context Handoff: Claude Code -> Gemini CLI

    Generated: 2026-04-07 14:32 UTC
    Source Agent: Claude Code
    Target Agent: Gemini CLI
    Project: /Users/dev/acme-api


    Session Summary

    Claude Code session focused on implementing the OAuth2 authentication flow for the web application. The core auth middleware, JWT handling, and provider configuration are complete and all unit tests pass. The remaining work involves updating API documentation and writing integration tests — tasks well-suited for Gemini CLI's large context window.

    Project Context

    • Stack: Node.js 20, Express.js 4.19, TypeScript 5.4, PostgreSQL 16 via Prisma 5.x
    • Package Manager: pnpm
    • Test Runner: Vitest

    Git State

    • Branch: feature/oauth2-login (3 commits ahead of main)
    • Last commit: a1b2c3d — "add OAuth2 provider abstraction with Google and GitHub support"
    • Uncommitted changes: none
    • CI status: all checks passing

    Files Changed in This Session

    FileStatusDescription
    src/middleware/auth.tsModifiedRewrote JWT validation — switched from HS256 to RS256
    src/middleware/rate-limit.tsCreatedNew rate limiting middleware (100/min user, 1000/min IP)
    src/services/oauth.tsCreatedOAuth2 provider abstraction (Google, GitHub supported)
    src/types/auth.d.tsModifiedAdded OAuthProvider, TokenPair, RefreshToken types
    src/routes/auth.tsModifiedAdded /auth/oauth/callback and /auth/refresh endpoints
    tests/unit/auth.test.tsModifiedUpdated tests for RS256, added OAuth flow tests
    prisma/migrations/20260407_add_oauth/CreatedAdded oauth_accounts table, refresh_tokens table

    Decisions Made

    RS256 over HS256: Switched to asymmetric JWT signing for better security in distributed environments. Public key is served at /.well-known/jwks.json.

    Rate limiting strategy: Per-user (100 req/min) and per-IP (1000 req/min) using sliding window algorithm. Counters stored in-memory for now (Redis migration is a TODO).

    Refresh token storage: Refresh tokens are stored in httpOnly, secure, sameSite=strict cookies. NOT in localStorage. Access tokens are returned in response body only.

    OAuth provider pattern: Used strategy pattern — each provider implements OAuthProvider interface. Adding a new provider requires only a new class in src/services/oauth/providers/.

    Token lifetimes: Access tokens expire after 15 minutes. Refresh tokens expire after 7 days. Refresh token rotation is enabled (old token invalidated on use).

    Architecture Notes

    Client Request
    
        |
    
        v
    rate-limit.ts (check IP + user limits)
    
        |
    
        v
    auth.ts (verify JWT with RS256 public key)
    
        |
    
        v
    Route Handler
    
        |
    
        v
    oauth.ts (for OAuth routes only)
    
        |-- providers/google.ts
    
        +-- providers/github.ts
    

    Key Code Snippets

    OAuthProvider Interface (src/types/auth.d.ts)

    interface OAuthProvider {
      name: string;
      authorizeUrl(state: string): string;
      exchangeCode(code: string): Promise<OAuthTokens>;
      getUserInfo(accessToken: string): Promise<OAuthUserInfo>;
    }
    

    Rate Limit Configuration (src/middleware/rate-limit.ts)

    const RATE_LIMITS = {
      perUser: { windowMs: 60_000, max: 100 },
      perIP: { windowMs: 60_000, max: 1000 },
    };
    

    Remaining Tasks

    These are the tasks recommended for Gemini CLI, leveraging its large context window:

    • Update API documentation (docs/api-reference.md)

      • Document the new /auth/oauth/:provider endpoint
      • Document the /auth/refresh endpoint
      • Document the /.well-known/jwks.json endpoint
      • Add OAuth flow sequence diagram
      • Update authentication section with RS256 details
    • Review full codebase for breaking changes

      • The JWT validation change from HS256 -> RS256 may affect other services
      • Check if any existing middleware assumes symmetric JWT
      • Review src/routes/*.ts for any hardcoded auth assumptions
    • Write integration tests (tests/integration/oauth.test.ts)

      • Full OAuth flow with mocked providers
      • Refresh token rotation
      • Rate limiting under concurrent requests
      • Token expiration edge cases

    Open Questions

    These need decisions before the integration tests can be finalized:

    Redis for rate limiting? — Currently using in-memory store. Works fine for single-instance deployments, but will need Redis for horizontal scaling. Should this be done now or deferred?

    OAuth provider scope — Currently supporting Google and GitHub. Should we add Microsoft/Apple before v1 launch, or defer to post-launch?

    Error message i18n — Auth error messages are currently English-only. The frontend team wants i18n support. Should error codes be returned instead of human-readable messages?

    Continue in the target agent

    Review this handoff, open the same project in Gemini CLI, and provide the document using the file-input method supported by your installed version. Ask: “Continue from this handoff. Review the remaining tasks and begin with the API documentation update.”

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Pick up where you left off

    Switching coding agents often means explaining the project again. DevPilot helps your agent capture the current task, decisions, changed files, Git state, and unfinished work in a structured Markdown handoff for Claude Code, Gemini CLI, or Codex CLI.

    What you get

    • Context handoff: project background, decisions, changed files, open questions, and next steps in one document.
    • Git snapshot: branch, recent commits, and change summaries when Git is available.
    • Session overview: inspect supported local session records; availability depends on installed agent versions and file formats.
    • Task planning: suggest a sequence of work across agents, with handoff documents between steps you perform.

    How to use

    Ask “hand off this session to Gemini” or “generate a context handoff for Codex.” Review the document, then give it to the target agent with access to the same project. You start and operate each agent yourself.

    Good for

    Continuing a refactor in another agent, resuming work after a break, or sharing project context with a teammate.

    Requirements and limits

    Requires an agent that can read local project files, run shell commands, and save Markdown documents. Bash and Git are used by the helper workflow. Session parsing may also use Python 3, jq, or sqlite3 depending on the agent and available tools. Session paths and database schemas vary by version. Usage estimation is experimental and is not a billing source.

    Open source (MIT): https://github.com/Layton2617/devpilot-tui

    Handoffs summarize available context and may omit details; the target agent still needs the project files. You launch and operate each agent yourself. Session parsing depends on local paths, database schemas, installed tools, and agent versions; current compatibility has not been tested. Usage estimation is experimental, is not real-time billing, and may be unavailable. The demo uses bundled illustrative data rather than a newly verified project session.

    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 10 days ago

    • Free with an Agensi account

    Requires

    Bash
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Reads local project and selected agent session files, runs Git and helper commands, and writes Markdown handoffs under ~/.devpilot/handoffs/. Session listing may inspect ~/.claude/projects/, ~/.gemini/tmp/, and supported ~/.codex/ state databases. Review a handoff before sharing it with another agent or person. Core handoff generation does not require network access or new API keys.

    Listed10 days ago

    What's inside

    Frequently Asked Questions

    A structured Markdown summary of the task, project context, Git state, changed files, decisions, open questions, and remaining work, based on the context available to your agent. Review it before sharing.

    The workflow is designed around Claude Code, Gemini CLI, and Codex CLI. Give the target agent the Markdown document and access to the same project. Automatic session listing depends on local formats and versions.

    No additional API keys are needed for local handoff generation. Your coding agents retain their own authentication and usage costs.

    Review the handoff, start the target agent in the project, and provide the Markdown document using the file-input method supported by your installed version. DevPilot does not automatically transfer a live session or operate the target agent.

    The SKILL.md instructions, Bash handoff and session-listing helpers, README, MIT license, and example handoff and daily-report documents. This package does not include a compiled TUI binary or a promise of lifetime updates.

    Usage estimation is experimental and is not a billing source. Access to stored usage fields depends on supported local formats; estimates or unavailable data must be identified as such. Check your provider billing records for charges.