Agent skill

Codex Thread Reader

by huangruiteng in huangruiteng/CS-Notes

Locate and read a Codex thread by a codex thread link, thread id, or rollout path across all local CODEXHOME directories (~/.codex, ~/.codex-gpt, ...).

MITAuto-check passed

Install Codex Thread Reader

skills CLI
$ npx skills add huangruiteng/CS-Notes --skill codex-thread-reader -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install huangruiteng/CS-Notes codex-thread-reader --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/huangruiteng/CS-Notes.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/codex-thread-reader .claude/skills/codex-thread-reader && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
codex-thread-reader
GitHub stars
4k
Token cost
~1.4k tokens
SKILL.md length
578 words
Files
3 (incl. scripts)
Skills in repo
38
Repo updated
First seen
Licence
MIT

At a glance

Locate and read a Codex thread by a codex thread link, thread id, or rollout path across all local CODEXHOME directories (~/.codex, ~/.codex-gpt, ...).

  • Works in 5 steps: locate + summary: confirm the right… → turns over the whole thread: skim… → messages --turn ... --full for those… → …
  • The user pastes a codex:// link
  • SKILL.md covers Use this skill when, Where threads live, Quick start and Recommended reading workflow…, plus 2 more sections
  • Runs Python scripts from its folder; calls python3

What it does

Codex Thread Reader is an agent skill from huangruiteng/CS-Notes. Locate and read a Codex thread by a codex thread link, thread id, or rollout path across all local CODEXHOME directories (~/.codex, ~/.codex-gpt, ...). Use when the user pastes a codex:// link, asks to understand the 前因后果 of a Codex session, wants a timeline of what a long-running main thread did, or needs to search / export a past Codex conversation.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `agents/openai.yaml` and `scripts/codex_thread.py`).

The licence is MIT.

When your agent uses it

  • The user pastes a codex:// link
  • Asks to understand the 前因后果 of a Codex session
  • Wants a timeline of what a long-running main thread did
  • Needs to search / export a past Codex conversation

Example prompts

  • “/codex-thread-reader”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. locate + summary: confirm the right home/file, cwd, time span, model, number of turns and compactions.
  2. turns over the whole thread: skim first-line prompts and final answers to build a timeline; note turn numbers of pivotal moments…
  3. messages --turn ... --full for those pivotal turns; add --commentary only when you need the agent's intermediate reasoning notes.
  4. search for the specific entities you care about (PR numbers, file paths, people, project names, error strings). Use --tools when you need…
  5. If the thread will be referenced again, export it once into .local/codex-thread-dumps/ and read the Markdown; never copy the dump into…

What it can do on your machine

Read from SKILL.md and the folder at commit d01d8f8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codex Thread Reader loads about 1.4k tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 578 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from huangruiteng/CS-Notes at commit d01d8f8, republished under its MIT licence (© huangruiteng). 578 words, ~1,445 tokens.

Download SKILL.mdSave it as .claude/skills/codex-thread-reader/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
codex-thread-reader
description
Locate and read a Codex thread by a codex thread link, thread id, or rollout path across all local CODEX_HOME directories (~/.codex, ~/.codex-gpt, ...). Use when the user pastes a codex:// link, asks to understand the 前因后果 of a Codex session, wants a timeline of what a long-running main thread did, or needs to search / export a past Codex conversation.

Codex Thread Reader

Use this skill when

  • The user gives a codex://threads/<uuid> link, a bare thread uuid, or asks about "那个 codex 线程 / 主控线程 / session".
  • You need the context of a previous Codex run (what was asked, what was decided, what got merged) before continuing work.
  • You need to grep a huge rollout (hundreds of MB) without loading it into context.

Do not cat, head, or rg the rollout file directly: main threads are 100–500 MB JSONL with encrypted reasoning blobs and full tool outputs. Always go through the script.

Where threads live

  • Codex Desktop / CLI can run with several CODEX_HOMEs on this machine: ~/.codex, ~/.codex-work, ~/.codex-personal, ... A codex://threads/<id> link does not say which home owns it; the script searches all of them.
  • Each home stores a thread as sessions/YYYY/MM/DD/rollout-<local-ts>-<thread-id>.jsonl (archived: archived_sessions/), and indexes it in state_*.sqlite table threads (id, rollout_path, title, cwd, model, archived, ...).
  • Thread ids are UUIDv7: the first 12 hex chars are a unix-ms timestamp, so the date directory can be derived even when the sqlite index is stale.
  • Rollout record types: session_meta, turn_context, event_msg (task_started, item_completed, task_complete, turn_aborted, token_count), response_item (message with role + phase = commentary|final_answer, custom_tool_call, function_call, reasoning), compacted, world_state, token_usage_record. Real user prompts are item_completed → UserMessage; the app wraps them in ambient blocks (<in-app-browser-context>, <environment_context>, ## My request:) that the script strips. The final answer of a turn is task_complete.last_agent_message (also message with phase=final_answer).

Quick start

bash
S="{baseDir}/scripts/codex_thread.py"
THREAD_REF="codex://threads/<thread-id>"  # replace with the target thread link
python3 "$S" locate  "$THREAD_REF"   # which home / file / size / title
python3 "$S" summary "$THREAD_REF"                   # cwd, models, span, turns, compactions, tools
python3 "$S" turns   "$THREAD_REF" --width 160                                    # one block per turn: time, prompt, final answer
python3 "$S" turns   "$THREAD_REF" --since 2026-09-20 --last 15
python3 "$S" messages "$THREAD_REF" --turn 104,185 --full                         # full prompt + final answer of chosen turns
python3 "$S" messages "$THREAD_REF" --since 2026-09-24 --role user --full         # what the user asked recently
python3 "$S" search  "$THREAD_REF" 'PR #?\d+|self-?merge' --max 50                # regex over prompts/answers
python3 "$S" search  "$THREAD_REF" 'git status' --tools                          # also tool inputs/outputs (slower)
python3 "$S" tools   "$THREAD_REF" --commands --turn 185 --width 240              # every exec input in a turn
python3 "$S" export  "$THREAD_REF" --repo /path/to/repo               # Markdown transcript -> .local/codex-thread-dumps/<id>.md

A uuid prefix is enough as long as it is unique. --since/--until/--last/--turn share the turn numbering printed by turns. All commands stream the file; a 420 MB rollout takes ~1–3 s.

  1. locate + summary: confirm the right home/file, cwd, time span, model, number of turns and compactions.
  2. turns over the whole thread: skim first-line prompts and final answers to build a timeline; note turn numbers of pivotal moments (decisions, merges, incidents, changes of direction).
  3. messages --turn ... --full for those pivotal turns; add --commentary only when you need the agent's intermediate reasoning notes.
  4. search for the specific entities you care about (PR numbers, file paths, people, project names, error strings). Use --tools when you need to know what commands actually ran.
  5. If the thread will be referenced again, export it once into .local/codex-thread-dumps/ and read the Markdown; never copy the dump into Notes/ or any tracked file.
Show full SKILL.md (193 more words)Show less

Privacy and boundaries

  • Main threads usually contain career, company, legal, and personal content. Treat everything read as .local-only material: summarize into tracked files only after 脱敏, following AGENTS.md §4.A.10 and §5.
  • Default export location is <repo>/.local/codex-thread-dumps/, which is git-ignored. Do not pass --out to a tracked path.
  • Reasoning blobs are encrypted and are not decoded; tool outputs may contain tokens or internal URLs, so keep search --tools output out of tracked files.
  • Never modify rollout files or the sqlite indexes; the script opens sqlite read-only.

Troubleshooting

  • not found: the thread may belong to a home not under ~/.codex* (set CODEX_HOME=...), or the id may be a remote/cloud thread with no local rollout. The error prints the UUIDv7 timestamp so you can check that day's sessions/ directory manually.
  • Multiple candidates: the sqlite hit is preferred over glob hits; a thread forked/moved between homes can appear twice. Check size and title.
  • Turn without a user prompt: automation / heartbeat runs or turns whose prompt was only an attachment; use messages --commentary to see what happened.
  • Stale numbers after the thread keeps running: turn indices are recomputed on every call, so re-run turns before citing a number.

© huangruiteng, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in .codex/skills/codex-thread-reader of huangruiteng/CS-Notes.

  • SKILL.md
  • agents/openai.yaml
  • scripts/codex_thread.py

Open the folder on GitHubat commit d01d8f8

Compare with similar skills

Codex Thread Reader next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codex Thread Reader compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codex Thread Reader this skillhuangruiteng/CS-Notes4k—~1.4kAutomated safety check: PassMIT
Internal Linksthedaviddias/Front-End-Checklist74k—~770Automated safety check: PassMIT
External Linksthedaviddias/Front-End-Checklist74k—~773Automated safety check: PassMIT
Invalid Linksthedaviddias/Front-End-Checklist74k—~806Automated safety check: PassMIT
Web Page ReaderHKUDS/Vibe-Trading35k—~627Automated safety check: PassMIT
SEO Aeo Internal Linkingsickn33/agentic-awesome-skills47k1 repos~2.3kAutomated safety check: PassMIT

Similar skills

  • Internal Links

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing a site's internal link structure, identifying pages that need more incoming links, generating contextual linking opportunities between related content, or…

    74k GitHub stars~770 tokensUpdated yesterday
    Marketing & SEOAuto-check passed
  • External Links

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing content pages for citation quality, suggesting authoritative sources to link for factual claims, or reviewing whether a page's external link attributes…

    74k GitHub stars~773 tokensUpdated yesterday
    Research & ScienceAuto-check passed
  • Invalid Links

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing a page's link elements for crawlability, reviewing JavaScript-heavy SPAs where navigation may not use <a href tags, or checking that dynamically generated links…

    74k GitHub stars~806 tokensUpdated yesterday
    Marketing & SEOAuto-check passed
  • Web Page Reader

    HKUDS/Vibe-Trading

    Converts web pages, articles and documentation links into clean Markdown through the read_url tool, which sends the full URL to the third-party Jina Reader service.

    35k GitHub stars~627 tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • SEO Aeo Internal Linking

    sickn33/agentic-awesome-skills

    Maps internal link opportunities between pages with relevant anchor text, placement instructions, orphan-page detection, and cannibalisation checks.

    47k GitHub starsUsed in 1 repo~2.3k tokens
    Marketing & SEOAuto-check passed
  • Link Checker

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing templates, rendered HTML, or shared components related to Check for broken links.

    74k GitHub stars~408 tokensUpdated yesterday
    Auto-check passed

More from huangruiteng/CS-Notes

All 38 skills in this repo
  • CLI Creator

    huangruiteng/CS-Notes

    Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script.

    4k GitHub starsUsed in 2 repos~2.7k tokens
    Auto-check passed
  • Slack

    huangruiteng/CS-Notes

    A skill your agent uses when you need to control Slack from Clawdbot via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.

    4k GitHub starsUsed in 10 repos~578 tokens
    Auto-check passed
  • Codex Thread Heartbeat

    huangruiteng/CS-Notes

    Inspect and manage guarded Codex App-native or launchd heartbeats for Codex main control threads.

    4k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Research Material Scout

    huangruiteng/CS-Notes

    A skill your agent uses when the user asks Codex to research, find learning materials, process "素材:" links, "请你读" / "精读" a material, build a material radar, or use SenSight-like broad information…

    4k GitHub stars~8.6k tokensUpdated yesterday
    Auto-check passed
  • GitHub

    huangruiteng/CS-Notes

    Interact with GitHub using the gh CLI. An agent skill from huangruiteng/CS-Notes.

    4k GitHub starsUsed in 27 repos~279 tokens
    Auto-check passed
  • AI Hotspots

    huangruiteng/CS-Notes

    Track and synthesize current AI hotspots into a bilingual HTML daily report.

    4k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Questions about Codex Thread Reader

What does Codex Thread Reader do?

Locate and read a Codex thread by a codex thread link, thread id, or rollout path across all local CODEXHOME directories (~/.codex, ~/.codex-gpt, ...). Codex Thread Reader is an agent skill from huangruiteng/CS-Notes.).

When should I use Codex Thread Reader?

Codex Thread Reader fits situations like: the user pastes a codex:// link; asks to understand the 前因后果 of a Codex session; wants a timeline of what a long-running main thread did; needs to search / export a past Codex conversation.

How do I install Codex Thread Reader in Claude Code?

Run `npx skills add huangruiteng/CS-Notes --skill codex-thread-reader -a claude-code`. Or copy the skill folder (.codex/skills/codex-thread-reader in huangruiteng/CS-Notes) into .claude/skills/codex-thread-reader in your project. Claude Code loads it when a task matches its description.

How do I install Codex Thread Reader in Codex?

Run `npx skills add huangruiteng/CS-Notes --skill codex-thread-reader -a codex`. Or copy the skill folder (.codex/skills/codex-thread-reader in huangruiteng/CS-Notes) into .agents/skills/codex-thread-reader in your project. Codex loads it when a task matches its description.

Can I use Codex Thread Reader in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add huangruiteng/CS-Notes --skill codex-thread-reader -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codex-thread-reader, .gemini/skills/codex-thread-reader, .github/skills/codex-thread-reader and .opencode/skills/codex-thread-reader in your project.

What does Codex Thread Reader need to run?

Going by SKILL.md and its folder, Codex Thread Reader needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Codex Thread Reader access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Codex Thread Reader safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Codex Thread Reader use?

Codex Thread Reader is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codex Thread Reader use?

About 1.4k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codex Thread Reader?

Skills that share tags, products or a category with Codex Thread Reader: Internal Links (thedaviddias/Front-End-Checklist, 74k stars), External Links (thedaviddias/Front-End-Checklist, 74k stars), Invalid Links (thedaviddias/Front-End-Checklist, 74k stars) and Web Page Reader (HKUDS/Vibe-Trading, 35k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codex Thread Reader?

huangruiteng (a GitHub user) maintains it in huangruiteng/CS-Notes, which has 4,000 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on October 6, 2026.

Source: huangruiteng/CS-Notes on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.