Claude Codex Harness Sync banner
danyuchn danyuchn

Claude Codex Harness Sync

Development community

Description

Codex skill for auditing and migrating Claude Code harnesses to Codex

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Claude Codex Harness Sync

[繁體中文](#繁體中文) | [English](#english)

Public repository: https://github.com/danyuchn/claude-codex-harness-sync

繁體中文

這是一個 Codex skill,用來盤點、初始化、維護 Claude Code harness 到 Codex harness 的遷移。

它不是把 `.claude` 整包複製到 Codex,而是先做 audit,再把能安全同步的內容翻譯成 Codex 端可用的形式。高風險項目會由模型協助人工處理:先說明要改什麼、會碰哪些檔案、風險是什麼、怎麼驗證,再等使用者確認後才改 Codex 端檔案。

功能

  • 盤點全域 Claude / Codex harness 檔案。
  • 找出電腦上曾被 Claude Code 使用過的專案,也就是含 .claude 的資料夾。
  • setup 模式:產生第一次遷移到 Codex 的盤點與計畫。
  • maintain 模式:產生 Claude / Codex 之間的差異報告。
  • 將 hooks、MCP、memory、imports、大型 instruction files 視為模型協助人工處理項目。
  • 永遠不修改 .claude~/.claude
  • 永遠不把 secret values 複製到 Codex。

安裝

Clone 或下載這個 repo,然後複製到 Codex skills 目錄:

git clone https://github.com/danyuchn/claude-codex-harness-sync.git
cd claude-codex-harness-sync
mkdir -p ~/.codex/skills
cp -R claude-codex-harness-sync ~/.codex/skills/

接著在 Codex 裡使用:

/claude-codex-harness-sync setup

或:

/claude-codex-harness-sync maintain

兩種模式

`setup` 用於第一次遷移規劃。它會掃描 `~/.claude`、`~/.codex`、`~/.Codex`,以及所有包含 `.claude` 的專案資料夾。

`maintain` 用於日常維護。它會比較 Claude 和 Codex 已知的 harness surfaces,並分類哪些可以安全套用、哪些需要模型協助翻譯、哪些必須由使用者自己處理。

安全模型

這個 skill 把工作分成三層:

  • auto-apply-after-confirmation:低風險 Codex 端變更,使用者確認後可由模型套用。
  • model-assisted-manual:高風險或語意轉換工作,由模型說明、請求確認、改 Codex 端檔案、立即驗證。
  • user-owned-secret-step:API keys、OAuth tokens、cookies、帳號授權值由使用者自己處理;模型只寫 placeholder 或 env var 名稱。

本機指令

Dry-run inventory:

python3 claude-codex-harness-sync/scripts/inventory.py --mode setup --format markdown

Drift classification:

python3 claude-codex-harness-sync/scripts/inventory.py --mode maintain --format json > /tmp/harness-inventory.json
python3 claude-codex-harness-sync/scripts/classify_drift.py /tmp/harness-inventory.json --format markdown

Validate Codex harness syntax:

python3 claude-codex-harness-sync/scripts/validate_codex.py

授權

MIT

English

Audit, initialize, and maintain mig