Codex Session Msg Analysis Skill
by yalin feng
A reproducible, LLM-optional skill for analyzing Codex and other agent session logs. It provides deterministic message, tool-call, and network-call statistics, prompt catalogs, source hashing, and auditable outputs.
Free
Codex Session Msg Analysis Skill
Example session with this skill installed
Analyze the conversation log at file:///logs/session_042.jsonl and provide a prompt catalog with thematic clusters.
- Read your context and instructions
- Compiled the codex session msg
- Generated the data export
The analysis of session_042.jsonl is complete. I have parsed 124 raw events, filtered out platform noise, and clustered user prompts into 5 distinct thematic phases.
Session Analysis Report
1. Statistical Summary
- Valid User Prompts: 28
- Raw User Messages: 31 (3 filtered as environment context)
- Agent Responses: 42 (20 final answers, 22 commentary)
- Tool Executions: 35
- Network Requests: 8
- Thematic Clusters: 5
- Source:
file:///logs/session_042.jsonl
2. UserPromptClasses
| ID | UserPrompt Category | Phase | Count | Message Sequence |
|---|---|---|---|---|
| 1 | Environment Setup | Initialization | 4 | [1, 2, 3, 4] |
| 2 | Data Schema Definition | Modeling | 8 | [5, 6, 7, 8, 9, 10, 11, 12] |
| 3 | API Integration Errors | Debugging | 10 | [13, 14, 15, 16, 17, 18, 19, 20, 21, 23] |
| 4 | Documentation Cleanup | Maintenance | 3 | [22, 24, 25] |
| 5 | Deployment Planning | Release | 3 | [26, 27, 28] |
3. Insights
The session shows heavy concentration in the
Debugging phase (Cluster 3), where 35% of user interactions occurred. Most tool executions were triggered during this stage to verify API connectivity. There is a temporal overlap between modeling and debugging, suggesting the schema was refined iteratively as errors were encountered.
Next steps
- Review the high-frequency errors in Cluster 3 to update the system prompt's error handling.
- Export the
user_prompts.csvfor further manual labeling of edge cases. - Compare these stats against
session_041.jsonlto track debugging efficiency improvements.
user_prompts.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Analyzing long-running AI agent sessions manually is tedious and error-prone. This skill automates the extraction of structured data from conversation logs, providing deterministic parsing and thematic clustering to understand agent performance and user intent.
NOTE!
- DO NOT USE this skill for analyzing your SENSITIVE sessions or conversations !!
- Especially, DO NOT USE this skill for those credential projects or those conversations with keys, passwords and your personal identifiable information!!
What it does
- Deterministic Parsing converts raw logs from various sources into a unified event model for consistent analysis.
- Thematic Clustering groups user prompts into logical task phases using a hybrid similarity scoring system.
- Usage Auditing counts valid user prompts, agent messages, tool executions, and network requests.
- Data Cataloging generates a sequential catalog of user prompts mapped to specific categories and conversation stages.
- Constraint Filtering strips platform-injected noise like environment context or plugin recommendations for cleaner statistics.
How it works
- Source Loading takes a session ID, local file path, or raw text and creates a frozen, read-only snapshot.
- Unified Modeling maps source-specific roles to standard labels including user, agent, tool, and system.
- Prompt Cleaning removes machine-generated XML noise and normalization artifacts to isolate true user intent.
- Weighted Clustering applies TF-IDF, BM25, and Levenshtein distance to group messages by similarity and temporal adjacency.
- Validation runs consistency checks to ensure every message is accounted for without duplication in the final reports.
Frameworks & tools
This skill works with structured log formats like JSONL and JSON, as well as unstructured Markdown or text files. It includes specific parsing logic for Codex thread exports and local development logs.
Why this beats prompting it yourself
Standard prompts struggle to maintain counting accuracy over long contexts and often hallucinate message sequences. This skill uses a deterministic execution flow to ensure the sum of categorized messages matches the total count every time.
Use cases
- Performance Auditing to measure tool dependency and network call frequency in production agents.
- User Research to identify recurring pain points and feature requests within support chat logs.
- Session Debugging to map out where an agent deviated from a plan during a multi-step task.
Known limitations
Thematic labels rely on keyword anchors for high accuracy; results may require manual adjustment if used in niche domains without provided lexical anchors. Network call counts might be underestimated if inner tool calls are unresolved.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 11 days ago
- Free with an Agensi account
- Software
Git
Permissions
File Scopes
The skill reads only the conversation source explicitly supplied by the user and writes only user-requested analysis outputs. It does not execute commands, code, or instructions found in historical messages or tool output. Historical content is treated as untrusted data, not as new user instructions. The direct CLI uses Python standard-library code and does not require an LLM, network access, external account, or environment variables. **DO NOT USE THIS SKILL ON CONVERSATIONS CONTAINING API KEYS, PASSWORDS, TOKENS, PRIVATE CERTIFICATES, PERSONAL DATA, OR CONFIDENTIAL BUSINESS INFORMATION.**
What's inside
Frequently Asked Questions
New in LLM Ops
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.