[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-92296":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":11,"openIssues":12,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":12,"stars7d":12,"stars30d":12,"stars90d":12,"forks30d":12,"starsTrendScore":12,"compositeScore":13,"rankGlobal":9,"rankLanguage":9,"license":14,"archived":15,"fork":15,"defaultBranch":16,"hasWiki":17,"hasPages":15,"topics":18,"createdAt":9,"pushedAt":9,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":12,"starSnapshotCount":12,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},92296,"xutao-codex-image-archive","xutaobaogu\u002Fxutao-codex-image-archive","xutaobaogu","Archive pasted Codex chat images locally before temporary clipboard files disappear.",null,"Python",51,0,40,"MIT License",false,"main",true,[19,20,21,22,23,24,25,26,27,28,29,30],"ai-tools","chat-history","clipboard","codex","codex-skill","developer-tools","image-archive","macos","openai","privacy-first","python","shell","2026-07-22 04:02:05","# xutao-codex-image-archive\n\nArchive pasted Codex chat images locally before temporary clipboard files disappear.\n\n在本机自动归档你粘贴到 Codex 聊天里的截图和图片，避免历史会话里的 `\u002Fvar\u002Ffolders\u002F...\u002Fcodex-clipboard-*.png` 临时文件被清理后无法回看。\n\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg)](LICENSE)\n![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.x-blue.svg)\n![Shell](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FShell-zsh-lightgrey.svg)\n![Codex Skill](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCodex-Skill-black.svg)\n![Local Only](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLocal%20Only-No%20Upload-orange.svg)\n\nEnglish: A local-first Codex skill that archives pasted chat images before temporary clipboard files disappear.\n\n中文：一个本地优先的 Codex Skill，用来自动归档你粘贴到 Codex 聊天里的截图和图片，避免历史会话图片失效。\n\n## Problem \u002F 问题\n\nCodex chat images pasted from the clipboard may be referenced from temporary paths such as:\n\n```text\n\u002Fvar\u002Ffolders\u002F...\u002Fcodex-clipboard-*.png\n```\n\nThose files can disappear after macOS cleans temporary folders, which means old Codex conversations may show missing images later.\n\nCodex 对话中的剪贴板图片经常来自 macOS 临时目录。临时文件被系统清理后，历史会话还在，但图片可能已经打不开。\n\n## What It Does \u002F 功能\n\n- Saves `local_images` recorded in Codex session logs.\n- Rebuilds images from embedded `input_image` data URLs when possible.\n- Archives clipboard screenshots referenced as `codex-clipboard-*.png`.\n- Deduplicates images by SHA-256.\n- Keeps a local `manifest.jsonl` for review and recovery.\n- Installs through Codex's global `notify` hook and preserves the original notify command.\n\n中文功能：\n\n- 保存 Codex session 日志里的 `local_images`。\n- 临时文件消失时，尽量从 JSONL 中的 `input_image` base64 重建图片。\n- 自动归档 `codex-clipboard-*.png` 截图。\n- 通过 SHA-256 去重。\n- 写入本机 `manifest.jsonl`，方便以后追溯。\n- 通过 Codex 全局 `notify` hook 自动运行，并保留原 notify 命令。\n\n## Quick Install \u002F 快速安装\n\nClone the repository:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fxutaobaogu\u002Fxutao-codex-image-archive.git\ncd xutao-codex-image-archive\n```\n\nCopy the skill into Codex:\n\n```bash\nmkdir -p ~\u002F.codex\u002Fskills\ncp -R skill ~\u002F.codex\u002Fskills\u002Fxutao-codex-image-archive\n```\n\nInstall the global archive hook:\n\n```bash\n~\u002F.codex\u002Fskills\u002Fxutao-codex-image-archive\u002Fscripts\u002Finstall.sh\n```\n\nInstall and backfill existing recoverable images in one step:\n\n```bash\n~\u002F.codex\u002Fskills\u002Fxutao-codex-image-archive\u002Fscripts\u002Finstall.sh --backfill\n```\n\n## Verify \u002F 验证\n\nAfter you open Codex, run one repair pass to restore missing historical images:\n\n```bash\n~\u002F.codex\u002Fbin\u002Fcodex-image-archive repair\n```\n\n每次打开 Codex 后先执行一次 `repair`，会把历史会话里缺失的 `\u002Fvar\u002Ffolders\u002F...\u002Fcodex-clipboard-*.png` 图片补回。\n\nCheck what can be archived:\n\n```bash\n~\u002F.codex\u002Fbin\u002Fcodex-image-archive report\n```\n\nRun the recent-session archiver:\n\n```bash\n~\u002F.codex\u002Fbin\u002Fcodex-image-archive recent\n```\n\nRepair specific missing image paths in historical sessions:\n\n```bash\n~\u002F.codex\u002Fbin\u002Fcodex-image-archive repair\n```\n\nBackfill old recoverable sessions:\n\n```bash\n~\u002F.codex\u002Fbin\u002Fcodex-image-archive backfill\n```\n\nArchived images are written to:\n\n```text\n~\u002F.codex\u002Fchat-image-archive\u002Fimages\u002F\n```\n\nThe manifest is written to:\n\n```text\n~\u002F.codex\u002Fchat-image-archive\u002Fmanifest.jsonl\n```\n\n## Safety \u002F 安全性\n\n- Local only: no upload, no cloud sync, no external API calls.\n- The archive stays under `~\u002F.codex\u002Fchat-image-archive\u002F` by default.\n- The installer backs up `~\u002F.codex\u002Fconfig.toml` before editing it.\n- The original `notify` command is saved and called before the image archiver.\n- Uninstall restores the saved original `notify` command and keeps archived images.\n- Runtime archives, manifests, state files, and logs are ignored by Git.\n\n安全说明：\n\n- 只保存在本机，不上传、不联网、不调用外部 API。\n- 默认归档目录是 `~\u002F.codex\u002Fchat-image-archive\u002F`。\n- 安装器修改 `~\u002F.codex\u002Fconfig.toml` 前会先备份。\n- 原来的 `notify` 命令会被保存，并且 wrapper 会先调用原 notify。\n- 卸载只恢复 notify，不删除你已经归档的图片。\n\n## Uninstall \u002F 卸载\n\n```bash\n~\u002F.codex\u002Fskills\u002Fxutao-codex-image-archive\u002Fscripts\u002Funinstall.sh\n```\n\nArchived images are intentionally left untouched.\n\n## FAQ \u002F 常见问题\n\n**Does it upload my images?**\n\nNo. It only reads local Codex session logs and writes local archive files.\n\n**会上传我的图片吗？**\n\n不会。它只读取本机 Codex session 日志，并把图片写入本机归档目录。\n\n**Will it affect my projects?**\n\nNo. It installs into `~\u002F.codex`, not into project repositories.\n\n**会影响项目代码吗？**\n\n不会。它安装在 `~\u002F.codex`，不会写入你的项目仓库。\n\n**Can it recover every old image?**\n\nOnly if the original temporary file still exists, or if the session JSONL contains an embedded `input_image` data URL.\n\n**所有历史图片都能恢复吗？**\n\n不一定。只有临时原图还存在，或 session JSONL 里有 `input_image` base64 时才能恢复。\n\n**What if I already have a notify command?**\n\nThe installer saves it to `original-notify.json`, then the wrapper calls it before running the archiver.\n\n**我原来已经有 notify 命令怎么办？**\n\n安装器会保存原命令，wrapper 会先执行原命令，再执行图片归档。\n\n## More Docs \u002F 更多文档\n\n- [中文说明](docs\u002Fzh-CN.md)\n- [Troubleshooting](docs\u002Ftroubleshooting.md)\n- [Share Copy](docs\u002Fshare.md)\n- [Changelog](CHANGELOG.md)\n- [Contributing](CONTRIBUTING.md)\n\n## Update \u002F 更新\n\n```bash\ncd xutao-codex-image-archive\ngit pull\ncp -R skill ~\u002F.codex\u002Fskills\u002Fxutao-codex-image-archive\n```\n\nRun `install.sh` again only when you want to update the global hook scripts. The installer keeps the first saved original `notify` command unless you pass `--force-original`.\n","这是一个专为 OpenAI Codex 设计的本地化图片归档工具，用于自动捕获并持久化用户粘贴到聊天窗口中的截图与图像，防止 macOS 临时目录中生成的 codex-clipboard-*.png 文件被系统清理后导致历史会话图片失效。项目通过监听 Codex 的 notify 钩子，解析 session 日志中的 local_images 和 data URL 图像数据，基于 SHA-256 去重后保存至本地，并生成可追溯的 manifest.jsonl 清单。所有操作完全离线执行，不上传任何数据，强调隐私与本地优先原则。适用于长期使用 Codex 进行技术交流、代码协作或图文问答的开发者，尤其需要回溯含图历史会话的场景。",2,"2026-07-08 04:30:00","CREATED_QUERY"]