← 返回 Skills 市场
sube-py

Codex Session History

作者 Sube · GitHub ↗ · v1.0.0 · MIT-0
darwinlinux ✓ 安全检测通过
102
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install codex-session-history
功能描述
List and inspect local Codex session history by reading `~/.codex/session_index.jsonl`, `~/.codex/sessions/`, and `~/.codex/archived_sessions/`. Default to u...
使用说明 (SKILL.md)

Codex Session History

Overview

Use this skill to enumerate local Codex sessions and map each session to its id, title, project, and workspace path. Prefer the bundled script so the output stays consistent and works even when session_index.jsonl is incomplete.

Workflow

  1. Run the script to collect unarchived sessions by default.
  2. Use session_meta.payload.id as the canonical session id.
  3. Use session_meta.payload.cwd as the workspace anchor.
  4. Derive the project from the Git root when possible; otherwise fall back to cwd.
  5. Use session_index.jsonl only as enrichment for thread_name and updated_at.
  6. Convert stored UTC timestamps into local time before display and time-window filtering.
  7. If no thread_name is available, fall back to the first user message summary.

Commands

List recent sessions:

python3 scripts/list_codex_sessions.py

List active and archived sessions together:

python3 scripts/list_codex_sessions.py --source all

List more rows:

python3 scripts/list_codex_sessions.py --limit 50

Filter by project:

python3 scripts/list_codex_sessions.py --project PlayGround

Filter by a local time window on today's date:

python3 scripts/list_codex_sessions.py --from 11:00 --to 12:00

Filter by a local time window on a specific date:

python3 scripts/list_codex_sessions.py --date 2026-03-19 --from 11:00 --to 12:00

Inspect one session id:

python3 scripts/list_codex_sessions.py --session-id 019ce206-aa11-7c81-a65a-fece3708ecf4 --details

Only show archived sessions:

python3 scripts/list_codex_sessions.py --source archived

Return JSON:

python3 scripts/list_codex_sessions.py --json

Output

Default table columns:

  • id
  • project
  • started_at
  • updated_at
  • source
  • title

With --details, also show:

  • matched_from
  • matched_to
  • cwd
  • project_path
  • started_at
  • session_file
  • first_user_message

Notes

  • Prefer the script over ad hoc rg because session_index.jsonl may be incomplete.
  • Treat the session file itself as the source of truth for id and cwd.
  • started_at and updated_at are displayed in local time, not raw Z time.
  • Time-window filters match actual session events inside the requested interval, not only broad session span coverage.
  • If a workspace no longer exists on disk, still report the recorded cwd.
  • When the user only asks for "有哪些会话、id 是什么、属于哪个项目", the default table is enough.

Script

Use:

python3 scripts/list_codex_sessions.py --help
安全使用建议
This skill appears coherent: it reads only your local Codex session files under ~/.codex and summarizes them. Before installing or allowing the agent to invoke it: review the included script (you already have it) to confirm you're comfortable with the script printing session metadata and snippets (first user messages and paths). Sessions may contain sensitive content or local filesystem paths, so avoid running if you don't want those exposed to the agent or its outputs. If you prefer the agent not to call this autonomously, disable model invocation for the skill or only run it manually.
功能分析
Type: OpenClaw Skill Name: codex-session-history Version: 1.0.0 The skill is a utility for listing and inspecting local Codex session history stored in the `~/.codex` directory. The Python script `scripts/list_codex_sessions.py` strictly performs read-only operations on specific application files, uses only standard libraries, and contains no network activity, obfuscation, or unauthorized data access.
能力评估
Purpose & Capability
Name and description claim local session enumeration; the skill only requires python3 and reads files under ~/.codex (session_index.jsonl, sessions/, archived_sessions/, history.jsonl) and derives project roots via checking for .git. These requirements are proportional to the stated purpose.
Instruction Scope
SKILL.md instructs running the bundled script and describes only reading and parsing local Codex files, converting timestamps, and optional filters. The script (visible) reads only under CODEX_HOME and traverses parent directories to find a .git marker; it does not instruct network calls, reading unrelated system configs, or exfiltration.
Install Mechanism
No install spec is present (instruction-only with bundled script). It needs python3 to run, which is reasonable and low risk; nothing is downloaded or written by an installer.
Credentials
The skill does not request environment variables, credentials, or config paths beyond the local ~/.codex files. That matches its function; no extraneous SECRET/TOKEN/KEY requirements are present.
Persistence & Privilege
always is false and disable-model-invocation is default false (normal). The skill does not request persistent system changes or modify other skills' configs. Its scope is limited to being invoked when used.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install codex-session-history
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /codex-session-history 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of codex-session-history. - Enumerate local Codex sessions and display key details such as id, title, project, workspace, and timestamps. - List, inspect, and filter sessions by project, session id, active/archived status, and local time windows. - Sessions are read from unarchived and archived folders; defaults to unarchived. - Outputs a concise table by default, with additional detail and JSON options available. - Designed to work even when `session_index.jsonl` is incomplete.
元数据
Slug codex-session-history
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Codex Session History 是什么?

List and inspect local Codex session history by reading `~/.codex/session_index.jsonl`, `~/.codex/sessions/`, and `~/.codex/archived_sessions/`. Default to u... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 102 次。

如何安装 Codex Session History?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install codex-session-history」即可一键安装,无需额外配置。

Codex Session History 是免费的吗?

是的,Codex Session History 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Codex Session History 支持哪些平台?

Codex Session History 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux)。

谁开发了 Codex Session History?

由 Sube(@sube-py)开发并维护,当前版本 v1.0.0。

💬 留言讨论