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 Songhonglei/better-agent-skills --skill recover-codex-project-chatsgit clone --depth 1 https://github.com/Songhonglei/better-agent-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/songhonglei/better-agent-skills/recover-codex-project-chats)<a href="https://agentmods.dev/skills/songhonglei/better-agent-skills/recover-codex-project-chats"><img src="https://agentmods.dev/badge/skills/songhonglei/better-agent-skills/recover-codex-project-chats/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/songhonglei/better-agent-skills/recover-codex-project-chats"><img src="https://agentmods.dev/badge/skills/songhonglei/better-agent-skills/recover-codex-project-chats.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00094 | $0.00778 |
| Opus 5 | $0.00047 | $0.00389 |
| Sonnet 5 | $0.00019 | $0.00156 |
| Haiku 4.5 | $0.00009 | $0.00078 |
Grade A, and why
recover-codex-project-chats 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 11d 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 — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Recover Codex project chats
- Version: 1.0.1
- License: MIT
- Author: Evan Song · github.com/Songhonglei
- Repository: https://github.com/Songhonglei/better-agent-skills/tree/main/skills/recover-codex-project-chats
Restore project visibility without overwriting the only copy of a conversation.
Workflow
- Run
scripts/codex_project_recovery.sh diagnose [csv-path]while Codex may remain open. Save the output. - Read
references/incident-patterns.mdand classify the evidence before changing data. - Back up current
~/.codex, the supplied backup, and Codex-related Application Support directories. Exclude only live Unix sockets. - Before any mutation, require Codex Desktop to be fully stopped. Confirm the app-server, renderer, and service processes are absent.
- Run SQLite
PRAGMA integrity_checkon copies first. Inspect.schema; never invent columns. - Apply only the matching repair:
- Provider mismatch: run
scripts/codex_project_recovery.sh repair-provider <old-provider> <current-provider>after explaining the evidence. Repair only when both names refer to the same compatible backend. - Missing assignments: rebuild
thread-project-assignmentsin.codex-global-state.jsonfrom actual thread IDs and cwd values. Preserve existing assignments. Resolve overlapping roots and temporary directories explicitly; do not rely solely on prefix matching. - Moved paths: create and review an old-cwd to current-project mapping before updating assignments or cwd metadata.
- Missing database rows: merge only from a schema-compatible backup after integrity checks and a trial on copies.
- Provider mismatch: run
- Run
scripts/codex_project_recovery.sh verifywhile Codex is stopped, then restart Codex and check each project in the UI. - Report root cause, backup paths, CSV rows, database rows, rollout files found, per-project visible counts, changed rows/files, and unrecovered thread IDs.
Safety rules
- Treat
state_5.sqliteplus WAL/SHM, rollout JSONL,.codex-global-state.json, and project metadata as one recovery set. - Do not edit a live SQLite database.
- Do not replace all of
~/.codexwhen a targeted repair is sufficient. - Preserve archived state unless the user explicitly requests unarchiving.
- Do not change provider metadata merely to make rows visible unless the configured provider is compatible with the original sessions. Prefer restoring the provider configuration when compatibility is uncertain.
- Keep every pre-repair backup until the user verifies the UI and can open representative chats.
What ships with it
6 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.
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.
- 11d ago First seen · 55 lines · 94 tokens per session scan A 6c9339d2b651
recover-codex-project-chats is a skill published in the GitHub repository Songhonglei/better-agent-skills (3 stars, last pushed 4d ago), licensed MIT. It adds 94 tokens to every session and 778 once invoked, about $0.0005 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-31.
Other skills, from other repositories
scheduling-tasks
Schedules reminders and recurring tasks via the letta cron CLI. Use when the user asks to be reminded of something, wants periodic work or check-ins, or needs to list, inspect, replace, or cancel scheduled tasks.
customizing-statusline
Creates, edits, and migrates Letta Code statusline mods. Use when handling the /statusline command or continuing work started by /statusline.
imsg
Use imsg to read and send Messages.app iMessage/SMS on macOS.
kungfu-agent-onboarding
Use when a user asks to understand, start, inspect, extend, or safely operate installed Kungfu; verify the installed pack, select one intent route, personalize the explanation, and propose one smallest safe next action.
daily-report
Compile timestamped conversation logs, agent sessions, IM messages, collaborative documents, meeting notes, task records, and similar OpenViking materials into concise, evidence-grounded daily reports. Use with ov compile when the user asks for a daily work report, end-of-day digest, 日报, or reports for one or more…
reminder
Set reminders and manage todos with natural language. Uses built-in cron scheduling, no external service needed.