{"data":{"slug":"discovered-dce7c8d49d6709fd1ce2b556f42064fb7870c3f86ad9305d","title":"Handoff","summary":"Prepare a self-contained prompt or handoff file that transfers selected work and its necessary context to another chat or agent. Use when the user asks to continue elsewhere, brief another agent, update a handoff, or prepare a next-stage, scoped parallel, or review task for another recipient when it depends on accumulated work.","url":"https:\/\/skillshunter.net\/skills\/discovered-dce7c8d49d6709fd1ce2b556f42064fb7870c3f86ad9305d","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-dce7c8d49d6709fd1ce2b556f42064fb7870c3f86ad9305d","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-dce7c8d49d6709fd1ce2b556f42064fb7870c3f86ad9305d.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-dce7c8d49d6709fd1ce2b556f42064fb7870c3f86ad9305d\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Confirm that a transfer is being requested by checking if the user asks to prepare work for another chat or agent and if the recipient needs context from the current work. Determine the receiving task and scope, including what the recipient must do, which task is being transferred, and what accumulated context is necessary. Choose the output form based on the user's request, such as a self-contained prompt or a handoff file.","instructions":"---\nname: handoff\ndescription: >-\n  Prepare a self-contained prompt or handoff file that transfers selected work\n  and its necessary context to another chat or agent. Use when the user asks\n  to continue elsewhere, brief another agent, update a handoff, or prepare a\n  next-stage, scoped parallel, or review task for another recipient when it\n  depends on accumulated work.\n  Do not use for discussing or editing this skill, executing an incoming\n  handoff, standalone prompts unrelated to accumulated work, ordinary summaries\n  or status updates, TODO capture, transcript exports, implementation design,\n  or native thread operations alone.\n---\n\n# Handoff\n\nTransfer the minimum working state another chat or agent needs to perform the\nselected task correctly. Return the form the user asked for: a self-contained\nprompt, a handoff file with a short continuation prompt, or an update to an\nexisting handoff. Do not produce a chronological conversation summary.\n\nA transfer request authorizes preparing the requested final output and, when\nnecessary, temporarily recovering relevant Codex or Antigravity history with the bundled\nexport script. It does not authorize transferring the whole conversation,\nbroadening the recipient's task, or expanding either agent's permissions.\n\n## Confirm That A Transfer Is Being Requested\n\nApply this skill implicitly only when both are true:\n\n1. the user asks to prepare work for another chat or agent, including\n   continuation elsewhere, a next stage, a scoped parallel task, a review, or\n   an updated handoff;\n2. that recipient needs decisions, results, constraints, state, or other\n   context accumulated in the current work.\n\nThe user does not need to say \"handoff.\" A clear request such as \"continue this\nin a new chat\" is sufficient when the current work has one identifiable scope.\nAn observation that the chat is long, slow, or nearing its context limit is not\nby itself a request to prepare a transfer.\n\nDo not activate the transfer workflow merely because the user mentions this\nskill, asks to inspect or edit it, wants an ordinary summary or standalone\nprompt, or asks to continue from an incoming handoff. A native request to open,\nresume, fork, move, or navigate to a Codex thread belongs to the corresponding\nthread operation unless the user also asks for a prepared transfer. Follow an\nexplicit instruction to work without this skill.\n\n## Establish The Receiving Task And Scope\n\nDetermine first:\n\n- what the recipient must do and what result should count as done;\n- which selected task, project, stage, branch, or review is being transferred;\n- what accumulated context is necessary for that task;\n- which output form the user requested.\n\nUse the focus named by the user. Otherwise infer it only when the current work\nhas one clear contour. If several plausible scopes would give the recipient\nmaterially different tasks, ask one short question about what to transfer.\n\nSelect context according to the receiving task:\n\n- for continuation of the same task, preserve current state, decisions,\n  completed work, remaining work, and the correct resumption point;\n- for a separated or parallel task, preserve its boundary, required grounds,\n  dependencies, and expected return without importing unrelated project work;\n- for a next stage, preserve the accepted output of the previous stage and the\n  conditions that govern the new one;\n- for an independent or blind review, preserve the subject, requirements, raw\n  evidence, and authority boundary while withholding prior judgments, expected\n  verdicts, and proposed fixes that would bias the requested independence;\n- for delayed resumption, distinguish preserved state from facts that may need\n  freshness verification;\n- for another workspace, host, product, or person, include only sources the\n  recipient can access and make unavailable dependencies explicit.\n\nDo not use handoff preparation to design an unresolved implementation. When an\napproved plan, design, specification, or durable source already exists, point\nthe recipient to it and preserve only the context needed to use it correctly.\nPreparing a task for another agent does not launch that agent or send the task.\n\n## Choose The Output Form\n\nFollow the user's requested form before considering where files can be written:\n\n- If the user asks for a prompt to copy, a result in chat, or no separate file,\n  return one self-contained continuation prompt in chat. Do not create a final\n  handoff file merely because a writable project root exists.\n- If the user asks to save, create, or prepare a handoff file, create the file\n  and return a short continuation prompt that points to it.\n- If the user supplies an existing handoff and asks to update it, read it first\n  and update that file in place.\n- If the user asks generally to prepare a transfer without choosing a form,\n  prefer a handoff file when the recipient can access it; otherwise return a\n  self-contained prompt.\n\nIf the recipient cannot access local files, do not present a local path as a\nusable source. Put the necessary context in the prompt or state which source\nmaterial the user must make available to the recipient.\n\nAn instruction not to create the final handoff file does not prohibit a\ntemporary recovery export. An explicit instruction not to write any files\ndoes: in that case, use visible context and state any material coverage limit.\n\n## Select The Best Available History\n\nUse visible context when it is sufficient to recover the selected scope.\n\nUse the bundled export when earlier relevant state may be missing\nbecause of compaction, truncation, a long conversation, a visible mid-task\nstart, or a user request to recover an older part of the current thread or conversation.\n\nRun the export only when all of these are true:\n\n- the environment is Codex or Antigravity;\n- `CODEX_THREAD_ID`, `ANTIGRAVITY_CONVERSATION_ID`, or a user-supplied current thread ID is available;\n- Python can run the bundled script;\n- matching session logs or rollout journals can be verified;\n- the user has not prohibited all file writes.\n\nRun from this skill directory:\n\n```powershell\npython .\\scripts\\export_current_thread.py --temporary --json\n```\n\nIf `python` is unavailable but `py` exists:\n\n```powershell\npy .\\scripts\\export_current_thread.py --temporary --json\n```\n\nThe script writes a temporary UTF-8 recovery transcript and returns its exact\n`output_path`, size, estimated token count, `coverage_status`, temporal boundaries, `message_count`, and\ncoverage warning. The transcript header lists every source log or journal used. It\npreserves supported user, assistant, and subagent messages,\ncontext-compaction markers, and short confirmed file\/URL-read markers at the points\nwhere those reads occurred.\nRepeated chunk reads are collapsed within one interval between messages. Other\ntool calls and all tool results are omitted. It deterministically excludes\nsystem\/developer messages, known platform-injected user-content blocks, hidden\nreasoning, unknown internal records, and typed binary content. It does not use\na model to summarize, clean, select relevant fragments, or rewrite text.\n\nInterpret coverage before drafting the handoff:\n\n- `complete_thread` or `complete_conversation` means the verified history of the\n  current thread or conversation was assembled into one chronology.\n- `partial_thread` means at least one candidate journal could not be included.\n  Inspect `candidate_failures`; do not present the handoff as based on the full\n  thread. If the missing portion could materially affect the transfer, stop and\n  ask whether to continue from the identified partial history or use another\n  source.\n- `single_rollout` means the export intentionally covers only one explicitly\n  selected journal. Never describe it as the complete thread.\n\nIf the export can responsibly fit in the available context, read it as evidence\nfor the already selected transfer scope. Do not add a preliminary model pass\nfor relevance selection. If it cannot fit, ask the user whether to narrow the\nscope, read the file in chunks with the additional context cost, or continue\nfrom visible context.\n\nDo not infer omitted tool details. Prefer current files, Git state, and other\nauthoritative artifacts. If exact historical tool activity remains material\nand cannot be established from current evidence, ask separately for permission\nto create a full technical export:\n\n```powershell\npython .\\scripts\\export_current_thread.py --full --temporary --json\n```\n\nApply the same coverage check to a full technical export; `--full` changes the\nincluded technical detail, not the thread coverage. After the handoff is\ncomplete, delete every temporary export with:\n\n```powershell\npython .\\scripts\\export_current_thread.py --cleanup \"<output_path>\" --json\n```\n\nDo not copy an export into `.handoffs`, attach it to the continuation prompt,\nor present it as a source for the recipient. If cleanup fails, report the exact\nremaining path. A file-read marker records only a supported confirmed content\nread; it does not prove that the whole file was read. Inspect important current\nartifacts directly when feasible.\n\nDo not run this Codex script in ChatGPT, Claude, Gemini, or another environment\nunless that environment's compatible history mechanism has been implemented\nand verified independently. If reliable export is unavailable, use visible\ncontext and label its coverage honestly. Do not reconstruct missing history\nfrom vague memory.\n\n## Establish Current Evidence\n\nInspect only the state that can change the receiving task. When relevant,\nestablish the project root, current Git branch and commit, modified and\nuntracked files, created artifacts, checks actually run, unfinished processes,\nmaterial errors, and exact paths or URLs of primary sources of truth.\n\nReference large plans, specifications, logs, diffs, research, and other durable\nartifacts instead of copying them when the recipient can access those sources.\nState briefly why each important artifact matters.\n\nTreat the handoff as a compact snapshot. Current user messages and current\nauthoritative artifacts override stale handoff details.\n\n## Preserve The Authorization Boundary\n\nState the actual authority that applies to the receiving task: analysis,\ndesign, drafting, in-scope local changes, a confirmation-gated action, or\nanother clearly established boundary.\n\nDo not convert an earlier approval into reusable permission for external,\ndestructive, costly, privileged, or scope-expanding action. Do not treat an\nassistant proposal as a user decision.\n\n## Build Proportional Transfer Content\n\nMake this meaning recoverable in either output form when it affects the task:\n\n- the receiving task and observable done condition;\n- the selected transfer scope and authority boundary;\n- current state, completed work, and remaining work;\n- accepted decisions, active constraints, and material rejected approaches;\n- accessible sources of truth and relevant workspace state;\n- facts, assumptions, unknowns, blockers, failed attempts, or risks that change\n  the recipient's next action;\n- the first required action or dependency when the evidence determines one.\n\nUse only the sections needed for the transfer. Do not manufacture empty\nheadings, duplicate source documents, or include context merely because it is\navailable. Redact keys, passwords, tokens, credentials, and unnecessary\nprivate data. Do not add a generic recommendation to use other skills.\n\nGive the recipient enough freedom to perform the task. Preserve required order,\ndependencies, verification, and stop conditions, but do not invent a detailed\nimplementation route or turn the transfer into step-by-step micromanagement.\n\n## Write A Handoff File When Requested\n\nWhen a project handoff file is the selected form, create:\n\n```text\n<project-root>\/.handoffs\/handoff-<topic>.md\n```\n\nCreate `.handoffs` lazily on the first real file-based handoff. Do not edit\n`AGENTS.md`, `.gitignore`, or another project file. Derive a short lowercase\nkebab-case topic. For a new handoff, never overwrite an existing file; use\n`-2`, `-3`, and so on. When work is not project-based, save a requested handoff\nfile in the operating system's temporary directory unless the user names a\ndifferent location.\n\nA file may use this structure, omitting or combining sections whose meaning is\nnot needed:\n\n```markdown\n# Handoff: <topic>\n\nContext coverage: <verified Codex history or visible context and its limit>\n\n## Goal and done condition\n## Transfer scope and authorization\n## Current state\n## Decisions and constraints\n## Sources of truth\n## Completed and remaining work\n## First action\n```\n\nAdd facts and assumptions, blockers, material failed attempts, or risks only\nwhen they affect continuation.\n\n## Generate The Continuation Prompt\n\nFor a file-based handoff, return a short, fully localized prompt that points to\nthe file without duplicating it:\n\n```markdown\nContinue the work from @<absolute-handoff-path>.\n\nCurrent task: <concrete task>.\nDone when: <verifiable completion condition>.\n\nRead the handoff and its sources of truth first, then inspect the current\nstate. Continue only within the recorded authorization boundary. Do not repeat\ncompleted work. If the handoff conflicts with my newer messages or current\nauthoritative artifacts, identify the conflict and use the current evidence.\n```\n\nTranslate the entire prompt into the user's language. Do not mention a model\nversion. Do not activate Codex planning or goal modes. Do not tell the\nrecipient to execute when the recorded authorization is analysis-only,\ndesign-only, draft-only, or confirmation-gated.\n\nFor an inline handoff, return one self-contained prompt containing the\nproportional transfer content directly. It may point to durable sources the\nrecipient can access, but must not depend on a newly created handoff file.\n\n## Return To The User\n\nFor a created or updated file, return its absolute path and the complete short\ncontinuation prompt. For an inline handoff, return only the complete\nself-contained prompt plus any material note about unavailable sources or\ncoverage.\n\nBefore finishing, verify that a fresh recipient can identify the selected task,\nunderstand current state and authority, find or receive the necessary sources,\navoid repeated work, and begin the correct work without invented\nmicromanagement. Also verify that any temporary export was deleted or report\nits exact remaining path.\n","use_cases":["Continuing a task in a new chat or agent","Briefing another agent with accumulated context","Updating an existing handoff with new information","Preparing a next-stage or parallel task for another recipient"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/dezvin\/codex-skills\/blob\/2bcf7bdd315075d974b93115f4b19e6910d41ba8\/skills\/handoff\/SKILL.md","source_commit":"2bcf7bdd315075d974b93115f4b19e6910d41ba8","license":null,"version":null,"listing_approved_at":"2026-11-28","created_at":"2026-11-28T07:58:48.000000Z","updated_at":"2026-11-28T18:37:41.000000Z","seo_title":"Handoff - Transfer Work and Context to Another Agent","seo_description":"Prepare a self-contained prompt or handoff file to transfer selected work and its necessary context to another chat or agent. Ideal for continuing tasks elsewhere, briefs","seo_keywords":["handoff","transfer work","agent briefing","context transfer","task continuation"]}}