codex-history-sync

Synchronize Codex history between .codex directories with dry-run validation.

7|1|Updated May 9, 2026
One-click install
npx skills add https://github.com/black-yt/skills --skill codex-history-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-history-sync
Source: https://github.com/black-yt/skills/tree/main/codex-history-sync
Command: npx skills add https://github.com/black-yt/skills --skill codex-history-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you move Codex session history between .codex directories while avoiding accidental loss of configuration, credentials, or existing target data.

Core Features & Use Cases

  • One-way history sync: Copies selected Codex history files and session folders from a trusted source to a destination directory.
  • Safety-first defaults: Excludes sensitive files and cache-like folders by default, with dry-run and force controls to manage risk.
  • Metadata repair: Syncs thread title and name metadata across JSON, JSONL, and SQLite records after copying.
  • Use case: Use it when migrating Codex history to another machine, backing up sessions, or filtering records for a specific project before sharing.

Quick Start

Ask the assistant to dry-run a safe Codex history sync from one .codex directory to another and report what would be copied, skipped, or renamed.

Frequently Asked Questions about codex-history-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Codex history to another machine without losing existing sessions?

Codex history migration uses conservative one-way copying between .codex directories, preserving session files and thread title metadata. It excludes sensitive files by default and supports dry-run validation to prevent overwriting existing target data.

Can I preview a Codex history sync before committing changes?

Yes, Codex history sync supports dry-run validation, which reports what files would be copied, skipped, or renamed without modifying the destination. This prevents accidental overwrites of existing target data or credentials.

Does syncing .codex directories preserve SQLite and JSONL thread metadata?

Yes, Codex history sync repairs and preserves thread title and name metadata across SQLite, JSONL, and JSON records. The process ensures metadata consistency across session files after copying to the destination directory.

What is the best way to back up Codex session files without copying sensitive credentials?

Using safety-first defaults during Codex history sync automatically excludes sensitive files and cache-like folders from the backup. This ensures you copy session files without risking credentials or configuration data.

How do I filter Codex history records for a specific project before sharing?

You can filter Codex history records for a specific project by applying regex filtering during the directory sync. This selectively copies relevant session files while excluding unrelated history, enabling targeted project-scoped sharing.

When should I use force overwrite when synchronizing Codex history?

Use the optional force overwrite control when replacing existing files in the destination .codex directory. Apply force only after dry-run validation confirms no critical configuration or credentials will be lost during the sync.