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.
npx skills add zjp1997720/zhijian-skills --skill codex-external-handoffgit clone --depth 1 https://github.com/zjp1997720/zhijian-skillsWrote 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.
[](https://agentmods.dev/skills/zjp1997720/zhijian-skills/codex-external-handoff)<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.
<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>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once 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 |
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.
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.
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 原生团队能力,不经外部交接。
执行
- 形成最小任务包,明确目标、允许读取的范围、禁止事项、证据要求和验收标准。正文较长时写入临时或项目登记的任务文件。
- 默认以
read-only + approvalPolicy=never创建 Thread。只有任务包明确授权写入并列出目标路径时,才传--sandbox workspace-write;本 Skill 不提供danger-full-access。 - 创建并立即返回
job_id、thread_id和打开地址:
python3 "$HANDOFF" ask \
--title "架构设计与方案审查" \
--task-file /absolute/path/to/task.md \
--cwd "$PWD" \
--model gpt-5.6-sol \
--effort high
- 后台任务用以下命令管理:
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。
- 读取
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/ 验证。
What ships with it
11 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- agents/interface.yaml 776 B
- agents/openai.yaml 314 B
- evals/semantic_config.json 3.8 KB
- evals/trigger_cases.json 1.4 KB
- manifest.json 1.0 KB
- references/app-server-contract.md 1.7 KB
- references/task-package.md 1.9 KB
- requirements.txt 24 B
- scripts/codex_external_handoff.py 27 KB runs code
- security/permission_policy.json 3.1 KB
- tests/test_codex_external_handoff.py 5.6 KB runs code
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.
- 12d ago First seen · 71 lines · 110 tokens per session scan A 22617436b38d
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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
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…
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…
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…
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…
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…