codex-external-handoff

codex-external-handoff is a skill for Codex from zjp1997720/zhijian-skills. It costs 110 tokens per session (1,058 once invoked), scanned A, original, MIT.

A method for handing a substantial task from another local coding agent to Codex while keeping a named, persistent conversation for follow-up and supervision. Codex is OpenAI's coding agent.

In plain words
What is it for?
Use it for cross-project searches, research, architecture reviews, code reviews, important decisions, and other tasks that may need follow-up. It can also run short-lived formatting or extraction jobs when no persistent conversation is needed.
Why use it?
It keeps complex work available for status checks, continued questions, result retrieval, cancellation, or human takeover. It also separates small one-off tasks from work that needs an ongoing record.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it for cross-project searches, research, architecture reviews, code reviews, important decisions, and other tasks that may need follow-up. It can also run short-lived formatting or extraction jobs when no persistent conversation is needed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zjp1997720/zhijian-skills/codex-external-handoff
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add zjp1997720/zhijian-skills --skill codex-external-handoff
Clone the repo
git clone --depth 1 https://github.com/zjp1997720/zhijian-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-external-handoff

README.md
[![agentmods](https://agentmods.dev/badge/skills/zjp1997720/zhijian-skills/codex-external-handoff/github.svg)](https://agentmods.dev/skills/zjp1997720/zhijian-skills/codex-external-handoff)
Your own site
<a href="https://agentmods.dev/skills/zjp1997720/zhijian-skills/codex-external-handoff"><img src="https://agentmods.dev/badge/skills/zjp1997720/zhijian-skills/codex-external-handoff/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codex-external-handoff

Your own site · 80×15
<a href="https://agentmods.dev/skills/zjp1997720/zhijian-skills/codex-external-handoff"><img src="https://agentmods.dev/badge/skills/zjp1997720/zhijian-skills/codex-external-handoff.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,058 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00110 $0.01058
Opus 5 $0.00055 $0.00529
Sonnet 5 $0.00022 $0.00212
Haiku 4.5 $0.00011 $0.00106

Measured 12d ago against content hash 22617436b38d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

codex-external-handoff scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/codex_external_handoff.py, tests/test_codex_external_handoff.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/codex-external-handoff/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codex External Handoff

目标

让外部 Agent 把正式任务交给本地 Codex,同时保留后台执行的顺畅和可见 Thread 的监督、恢复与人工接管能力。

运行入口

从已安装 Skill 目录调用脚本:

HANDOFF="skills/codex-external-handoff/scripts/codex_external_handoff.py"
python3 "$HANDOFF" doctor

首次使用、Codex 升级或调用失败时先运行 doctor。正式任务先读取 task-package.md;排查协议或兼容问题时读取 app-server-contract.md

路由

  • 需要跨项目检索、复杂研究、架构设计、代码审校、确定性工程、重要判断、继续追问或人工接管:使用本 Skill 创建持久 Thread。
  • 输出用完即丢、无需监督、无需追问的格式检查或简单提取:直接使用 codex exec --ephemeral
  • Codex 已经是当前宿主且任务只涉及内部多 Agent 分工:使用 Codex 原生团队能力,不经外部交接。

执行

  1. 形成最小任务包,明确目标、允许读取的范围、禁止事项、证据要求和验收标准。正文较长时写入临时或项目登记的任务文件。
  2. 默认以 read-only + approvalPolicy=never 创建 Thread。只有任务包明确授权写入并列出目标路径时,才传 --sandbox workspace-write;本 Skill 不提供 danger-full-access
  3. 创建并立即返回 job_idthread_id 和打开地址:
python3 "$HANDOFF" ask \
  --title "架构设计与方案审查" \
  --task-file /absolute/path/to/task.md \
  --cwd "$PWD" \
  --model gpt-5.6-sol \
  --effort high
  1. 后台任务用以下命令管理:
python3 "$HANDOFF" status <JOB_ID_OR_THREAD_ID>
python3 "$HANDOFF" result <JOB_ID_OR_THREAD_ID>
python3 "$HANDOFF" continue <JOB_ID_OR_THREAD_ID> --task-file /path/to/follow-up.md
python3 "$HANDOFF" cancel <JOB_ID_OR_THREAD_ID>
python3 "$HANDOFF" open <JOB_ID_OR_THREAD_ID>

ask 默认后台运行;本轮必须等结果时增加 --wait。复杂规划、全库只读取材和重要审校可用 max,普通执行和草稿检查用 high

  1. 读取 result 的结构化结论、证据、风险、产物和建议状态增量。外部 Agent 负责核验和决定是否采纳;Codex Thread 不直接修改项目权威状态或绕过人工确认。

交接合同

  • job_id 是本地后台运行回执,thread_id 是可继续、可恢复、可在 Codex App 打开的权威会话标识。
  • 任务正文只在启动前暂存,Worker 读取后删除;运行回执保存在本机 Codex 状态目录,不进入项目 Git。
  • 默认线程工作目录是当前项目根。跨项目检索仍保持项目根 cwd,在任务包中声明只读来源范围。
  • 同一 Thread 同一时刻只运行一个外部任务;需要并行判断时创建多个新 Thread,不并发续问同一 Thread。
  • 外部 Agent 或最终集成者是 canonical 文件和状态的唯一写入者。Codex 只返回证据、产物和建议增量,除非任务包明确授权写入并满足项目安全边界。

完成标准

交接只有在以下信息齐全时完成:job_idthread_id、Thread 标题、运行状态、结构化结果或明确错误、证据、风险、产物路径、建议状态增量,以及可用的 codex://threads/<threadId>codex resume <threadId>

路由用例位于 evals/;运行实现由 scripts/codex_external_handoff.pytests/ 验证。

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 71 lines · 110 tokens per session scan A 22617436b38d

Subscribe to this mod's changes

codex-external-handoff is a skill published in the GitHub repository zjp1997720/zhijian-skills (595 stars, last pushed 6d ago), licensed MIT. It adds 110 tokens to every session and 1,058 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens