Sandbox
@club-cog/devin-handoff

Devin handoff plugin for Claude Code, Codex, and Cursor

This repo packages Devin handoff flows as a plugin, skill, and shell script. It gathers git context, opens a Devin session, prints the session URL, and can poll until the work is finished.

65 stars6 forksShellUpdated 2mo ago
Who it's for

Builders who use Claude Code, Codex, or Cursor and want to hand tasks off to Devin.

What it delivers

You can move a task, its context, and its branch state into a Devin session without re-explaining the work.

What it does

Session creation

Creates a Devin session with a task, repo slug, branch, and diff context.

Polling and archiving

Checks session status on a timer and can archive the session when it finishes.

Plugin and skill setup

Works as a Claude Code plugin, a Codex plugin, and an agent skill copied into a skills folder.

Context capture

Includes git remote, branch, uncommitted changes, and extra `--context` notes in the session prompt.

Setup guides

Provides per-platform examples for Claude Code, Codex, and Cursor.

How to get it

  1. 1Add the marketplace and install the plugin from inside Claude Code
    /plugin marketplace add club-cog/devin-handoff
    /plugin install devin-handoff@cognition
  2. 2Then set your API key (get one at https://app.devin.ai/settings/api-keys)
    export DEVIN_API_KEY="your-key-here"
  3. 3Same idea, from your terminal
    codex plugin marketplace add club-cog/devin-handoff
    codex plugin add devin-handoff@cognition
    export DEVIN_API_KEY="your-key-here"
  4. 4Install it into your coding agent's skills folder so the agent can hand off tasks to…
    git clone https://github.com/club-cog/devin-handoff.git
    
    # Copy into your agent's skills directory — adjust the path for your agent
    mkdir -p .your-agent/skills
    cp -r devin-handoff/.agents/skills/devin-handoff/ .your-agent/skills/devin-handoff/
    
    # Set your API key (get one at https://app.devin.ai/settings/api-keys)
    export DEVIN_API_KEY="your-key-here"
  5. 5For agents that use AGENTS.md, append the guide
    cat devin-handoff/AGENTS.md >> your-repo/AGENTS.md

README

Devin Handoff

Built by Devin

Hand off tasks to Devin from any coding agent or the command line. Set it up as a plugin or skill in Claude Code, Codex, Cursor, and more.

Create a Devin session, get a URL, optionally poll until it's done, archive when finished.

Demo: a coding agent hands three tasks off to three cloud Devin sessions, which open PRs that get merged

Quick Start

As a Claude Code plugin (1-click install)

Add the marketplace and install the plugin from inside Claude Code:

/plugin marketplace add club-cog/devin-handoff
/plugin install devin-handoff@cognition

Then set your API key (get one at https://app.devin.ai/settings/api-keys):

export DEVIN_API_KEY="your-key-here"

Run /devin-handoff:setup to verify everything is ready.

That's it — ask Claude Code to "hand this off to Devin."

As a Codex plugin

Same idea, from your terminal:

codex plugin marketplace add club-cog/devin-handoff
codex plugin add devin-handoff@cognition
export DEVIN_API_KEY="your-key-here"

Then ask Codex to "hand this off to Devin."

As an agent skill

Install it into your coding agent's skills folder so the agent can hand off tasks to Devin on its own:

git clone https://github.com/club-cog/devin-handoff.git

# Copy into your agent's skills directory — adjust the path for your agent
mkdir -p .your-agent/skills
cp -r devin-handoff/.agents/skills/devin-handoff/ .your-agent/skills/devin-handoff/

# Set your API key (get one at https://app.devin.ai/settings/api-keys)
export DEVIN_API_KEY="your-key-here"

Then ask your agent to "hand this off to Devin." See examples/ for per-platform setup guides (Claude Code, Cursor, Codex).

For agents that use AGENTS.md, append the guide:

cat devin-handoff/AGENTS.md >> your-repo/AGENTS.md

From the command line

# 1. Set your API key
export DEVIN_API_KEY="your-key-here"  # Get one at https://app.devin.ai/settings/api-keys

# 2. Create a session from any git repo
./devin-handoff/scripts/devin-handoff.sh create --task "Fix the flaky auth test in CI"
# → https://app.devin.ai/sessions/abc123

# 3. (Optional) Poll until it's done
./devin-handoff/scripts/devin-handoff.sh poll devin-abc123 --interval 15

How It Works

  1. Gathers git context — repo slug, branch, uncommitted diff (truncated to 100KB)
  2. Creates a Devin sessionPOST /sessions with your task + context
  3. Prints the session URL — share it with the user
  4. (Optional) PollsGET /sessions/{id} every N seconds until Devin finishes

Devin gets its own VM with shell, browser, and full repo access. It clones the repo, checks out the branch, and starts working. All sessions are tagged with handoff.

How Context Reaches the Cloud Session

Devin starts in a fresh VM, so the script packages up what your local agent already knows and includes it in the session prompt:

  • Repo and branch — detected from git remote and git rev-parse, so Devin clones the right repo and checks out the branch you're on
  • Uncommitted changes — the output of git diff HEAD (truncated to 100KB) is included, so your work-in-progress carries over instead of being lost on the way to the cloud. If you have local edits you don't want sent, commit or stash them before creating the session.
  • --context — whatever the calling agent has learned so far: files it examined, root-cause hypotheses, partial fixes
scripts/devin-handoff.sh create \
  --task "Fix the authentication timeout bug" \
  --context "Investigated src/auth/session.py and src/auth/middleware.py.
Timeout is hardcoded at 30m in session.py:42. Middleware doesn't check
the configured timeout, always uses the hardcoded value."

Script Reference

Usage:
  devin-handoff.sh create --task TASK [OPTIONS]
  devin-handoff.sh poll SESSION_ID [OPTIONS]
  devin-handoff.sh archive SESSION_ID [OPTIONS]

Commands:
  create    Create a Devin session and print the session URL
  poll      Poll a session until it finishes or is waiting on a message from you
  archive   Archive a completed session

create options:
  --task      Task description for Devin (required)
  --context   Additional context (files examined, findings, partial fixes)
  --tag       Extra tag (in addition to the default "handoff" tag)
  --api-url   Devin API base URL (default: https://api.devin.ai)
  --org-id    Organization ID (required for service keys)
  --user-id   Create session as this user (service keys only)

poll options:
  --interval  Polling interval in seconds (default: 30)
  --archive   Archive the session when it finishes
  --api-url   Devin API base URL (default: https://api.devin.ai)
  --org-id    Organization ID (required for service keys)

archive options:
  --api-url   Devin API base URL (default: https://api.devin.ai)
  --org-id    Organization ID (required for service keys)

Environment:
  DEVIN_API_KEY   Required. Personal (apk_*) or service (cog_*) key.
  DEVIN_ORG_ID    Optional. Organization ID for service keys.
  DEVIN_USER_ID   Optional. User ID for service keys.
  DEVIN_API_URL   Optional. Override the API base URL.

API Key Types

  • Personal keys (apk_*): Uses v1 API. Sessions appear in your sidebar.
  • Service keys (cog_*): Uses v3 API. Requires --org-id. Use --user-id to make sessions appear in a specific user's sidebar.

Requirements

  • curl and jq
  • git (optional — for automatic repo/branch/diff detection)
  • A Devin API key

License

MIT — see LICENSE.

Files in the repo

Repository payload11 top-level entries
  • .agents
  • .claude-plugin
  • .codex-plugin
  • assets
  • commands
  • examples
  • tests
  • AGENTS.md
  • LICENSE
  • README.md
  • scripts

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More plugins

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

138k
1 add

Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.

82k
code-yeongyu/
oh-my-openagent

OmO: Just type "mass ulw" keyword with your prompt. Now you are the master of graph engineering.

69k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

94k

Opinionated Oxlint rules for rejecting low-evidence TypeScript and JavaScript patterns

4.3k