dotfiles/dot_config/opencode/skills/ce-session-inventory/SKILL.md
Discover session files for a repo across Claude Code, Codex, and Cursor, and extract session metadata (timestamps, branch, cwd, size, platform). Invoked by session-research agents — not intended for direct user queries.
npx skillsauth add pkking/dotfiles ce-session-inventoryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Agent-facing primitive. Discover session files and emit session metadata as JSONL across Claude Code, Codex, and Cursor.
This skill exists so that agents researching session history do not need to know the layout of session stores on disk or the JSONL shapes of each platform. The scripts under scripts/ own that knowledge.
Space-separated positional args:
<repo> — repo folder name (e.g., my-project). Used for directory matching in Claude Code and Cursor, and as the CWD filter for Codex sessions.<days> — scan window in days (e.g., 7). Session files older than this are skipped.<platform> (optional) — one of claude, codex, cursor. Omit to search all three.--keyword K1[,K2,...] (optional) — filter to sessions whose full file content matches at least one of the comma-separated keywords (case-insensitive substring). Each emitted session line gains match_count and keyword_matches ({K: N, ...}) fields, and the _meta line gains files_matched. Use this instead of rolling per-file grep -l calls when ranking many sessions by topical relevance.Run the discovery-plus-metadata pipeline from the skill's own scripts/ directory:
bash scripts/discover-sessions.sh <repo> <days> [--platform <platform>] \
| tr '\n' '\0' \
| xargs -0 python3 scripts/extract-metadata.py --cwd-filter <repo>
To filter by keyword, append --keyword K1[,K2,...] to the extract-metadata.py invocation. Keyword scanning reads the full file (not just the head metadata window), so it costs more than a metadata-only run — use it when you need to rank candidates by topic across many sessions, not as a default.
Return the raw stdout verbatim — one JSON object per session, then a final _meta line. Callers parse the JSONL directly, so do not paraphrase, reformat, or summarize.
If discovery finds no files, the pipeline still emits a clean _meta line (files_processed: 0). Return that as-is.
Each session line is a JSON object. Common fields across platforms:
platform — claude, codex, or cursorfile — absolute path to the session JSONLsize — file size in bytests — session start timestamp (ISO 8601)session — session identifierPlatform-specific fields:
branch (git branch) and last_ts (last message timestamp).cwd (working directory), source, cli_version, model, last_ts.ts is derived from file mtime and session from the containing directory name.The final _meta line has files_processed, parse_errors, and optionally filtered_by_cwd (count of Codex sessions dropped by the CWD filter) and files_matched (count of sessions retained by the keyword filter, present only when --keyword was set).
When --keyword is set, each session line additionally carries:
match_count — total occurrences across all keywordskeyword_matches — per-keyword counts, e.g., {"middleware": 4, "auth": 12}Sessions with match_count: 0 are excluded from output.
If the discovery script errors (e.g., unreadable home directory, permission failure), let the error surface to the caller. Do not substitute git log, file listings, or other sources — this skill's contract is session metadata, nothing else.
If _meta reports parse_errors > 0, return the JSONL as-is. The caller decides how to handle partial data.
testing
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
testing
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
data-ai
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
development
Run the full autonomous engineering pipeline end-to-end (plan, work, code review, test, commit, push, open PR, watch CI, fix CI failures until green). Use only when the user explicitly requests hands-off execution of a software task and provides a feature description; do not auto-route casual conversation here.