codex-rehome

codex-rehome is a skill for Codex from CalebYcj/codex-rehome-skill. It costs 54 tokens per session (1,616 once invoked), scanned A, original, MIT.

A guide for moving or backing up Codex Desktop data between Mac and Windows computers, or before reinstalling a system. It covers conversations, project indexes, skills, plugins, generated files, and selected project folders.

In plain words
What is it for?
It helps package data into a ZIP, transfer it privately, restore it on the new computer, reconnect project paths, and check that the migration worked.
Why use it?
It helps prevent losing Codex history and setup during a computer change, handover, or system reinstall, while keeping sensitive login data out by default.

Skill for Codex

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

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is bash ./scripts/create_mac_codex_migration_package.sh \.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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-rehome

README.md
[![agentmods](https://agentmods.dev/badge/skills/calebycj/codex-rehome-skill/redskill.svg)](https://agentmods.dev/skills/calebycj/codex-rehome-skill/redskill)
Your own site
<a href="https://agentmods.dev/skills/calebycj/codex-rehome-skill/redskill"><img src="https://agentmods.dev/badge/skills/calebycj/codex-rehome-skill/redskill.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,616 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00054 $0.01616
Opus 5 $0.00027 $0.00808
Sonnet 5 $0.00011 $0.00323
Haiku 4.5 $0.00005 $0.00162

Measured 6d ago against content hash 566aa4256dcc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

codex-rehome 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 6d 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.

redskill/SKILL.md · 165 lines

How it starts

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

Codex Rehome

帮助普通用户把 Codex Desktop 的历史对话、索引、skills、plugins、生成物和指定项目文件夹迁移到另一台电脑,或在重装系统前备份并在重装后恢复。

支持:

  • Mac -> Windows
  • Windows -> Mac
  • Windows -> Windows
  • Mac -> Mac
  • 同一台 Windows 电脑重装系统前备份、重装后恢复

第一原则

先判断用户现在处于哪个阶段,再行动。不要一上来丢一串命令。

  1. 原电脑:盘点、选择项目与对话、打包、验证 ZIP。
  2. 传输中:让用户把 ZIP 私下传到新电脑。
  3. 新电脑:安装并登录 Codex、解压、合并恢复、映射路径、注册项目、验证。
  4. 重装系统:重装前把 ZIP 放到不会被清空的非系统盘或移动硬盘;重装后按新电脑阶段恢复。

每次先用一句人话告诉用户:现在在哪个阶段、接下来需要做什么。

开始前只确认这些

  • 源系统和目标系统是什么。
  • 是换电脑、离职交接,还是同机重装系统。
  • 哪些项目文件夹需要带走。项目文件夹不会因为复制 Codex 数据而自动包含。
  • 是否要重点选择某些对话;不确定时默认迁移全部标准 Codex 数据。
  • ZIP 准备通过飞书、网盘、局域网、移动硬盘还是其他私密方式传输。

默认使用 standard 模式。除非用户明确要求并理解风险,不要迁移 auth token、浏览器登录态、Cookies、.env、API key、私钥或其他 secrets。

原电脑:打包

先定位本 Skill 的目录,然后调用其中的脚本。可以让用户选择多个项目和重点对话。

Windows 原电脑

.\scripts\create_windows_codex_migration_package.ps1 `
  -Project "C:\path\to\project-one" `
  -Project "C:\path\to\project-two"

重点对话可以重复添加:

  -SelectedChat "C:\Users\<user>\.codex\sessions\...\rollout-....jsonl"

同机重装 Windows 时,必须指定非系统盘或移动硬盘:

.\scripts\create_windows_codex_migration_package.ps1 `
  -Project "C:\path\to\project" `
  -Out "D:\Codex-Rehome-Backup"

不要把重装备份只放在 Desktop、Downloads、%USERPROFILE% 或任何会随 C: 被清空的位置。

Mac 原电脑

bash ./scripts/create_mac_codex_migration_package.sh \
  --project "/path/to/project-one" \
  --project "/path/to/project-two"

重点对话可以重复添加:

  --selected-chat "$HOME/.codex/sessions/.../rollout-....jsonl"

打包后必须报告

  • ZIP 的完整路径和大小。
  • 使用的模式。
  • 包含了哪些项目。
  • sessions、skills、plugin manifests、generated images、SQLite 文件数量。
  • manifest、checksum 是否存在并通过。
  • 敏感文件排除结果。
  • 目标电脑应该运行哪条恢复命令。

传输

ZIP 可能包含私人对话、记忆、日志、生成图片和本地路径,只能私下传输,不要上传到公开 GitHub 仓库或公开帖子。

同机重装系统时,“传输”指把 ZIP、manifest、checksum 和恢复说明保存在重装后仍存在的非系统盘或移动硬盘,并在重装前确认文件真实存在。

新电脑:恢复

先让用户安装并登录 Codex。恢复前关闭 Codex Desktop;需要重新登录属于正常情况。

默认使用 merge restore,不要整体替换目标 .codex。保留目标电脑的 auth.jsonconfig.tomlinstallation_idmodels_cache.jsonchrome-native-hosts-v2.json

Read the full file on GitHub · 165 lines

Files

What ships with it

2 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.

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. 6d ago First seen · 165 lines · 54 tokens per session scan A 566aa4256dcc

Subscribe to this mod's changes

codex-rehome is a skill published in the GitHub repository CalebYcj/codex-rehome-skill (11 stars, last pushed 25d ago), licensed MIT. It adds 54 tokens to every session and 1,616 once invoked, about $0.0003 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.