Codex External Handoff logo

Codex External Handoff

Community
zjp1997720
codex-external-handoff

从 WorkBuddy、Claude Code 或其他本地 Agent 无头调用 Codex App Server,创建可见、命名、持久的 Codex Thread,并执行继续追问、状态查询、结果取回、取消和打开。用于复杂研究、跨项目取材、章节审校、确定性工程或重要决策;一次性格式检查和无需保留上下文的小提取继续用 codex exec --ephemeral,Codex 内部组队不走本 Skill。

Overview

Publisherzjp1997720
Repositoryzhijian-skills
Skill namecodex-external-handoff
Stars
780
Forks
99
Bundled files
11
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 11 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by zjp1997720 on GitHub. Read the source before you install it.

Installation

Install the Codex External Handoff AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/zjp1997720/zhijian-skills/tree/main/skills/codex-external-handoff
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zjp1997720/zhijian-skills.git /tmp/zhijian-skills
mkdir -p .claude/skills
cp -r /tmp/zhijian-skills/skills/codex-external-handoff .claude/skills/codex-external-handoff
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Codex External Handoff in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Codex External Handoff on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Codex External Handoff is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Codex External Handoff

目标

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

运行入口

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

bash
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_id、thread_id 和打开地址:
bash
python3 "$HANDOFF" ask \
  --title "架构设计与方案审查" \
  --task-file /absolute/path/to/task.md \
  --cwd "$PWD" \
  --model gpt-5.6-sol \
  --effort high
  1. 后台任务用以下命令管理:
bash
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_id、thread_id、Thread 标题、运行状态、结构化结果或明确错误、证据、风险、产物路径、建议状态增量,以及可用的 codex://threads/<threadId> 或 codex resume <threadId>。

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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Codex External Handoff AI skill do?

从 WorkBuddy、Claude Code 或其他本地 Agent 无头调用 Codex App Server,创建可见、命名、持久的 Codex Thread,并执行继续追问、状态查询、结果取回、取消和打开。用于复杂研究、跨项目取材、章节审校、确定性工程或重要决策;一次性格式检查和无需保留上下文的小提取继续用 codex exec --ephemeral,Codex 内部组队不走本 Skill。

Why use Codex External Handoff on TypingMind?

Because you install it once and use it with any model. Codex External Handoff is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Codex External Handoff in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/zjp1997720/zhijian-skills/tree/main/skills/codex-external-handoff. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Codex External Handoff?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Codex External Handoff?

As many as you like. As long as a model supports skills, you can use Codex External Handoff with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Codex External Handoff AI skill free?

Yes. It is published on GitHub by zjp1997720 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇