Codex Session Msg Analysis Skill

    by yalin feng

    1

    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

    Security scanned

    Works with the AI Agents you already use

    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

    IDUserPrompt CategoryPhaseCountMessage Sequence
    1Environment SetupInitialization4[1, 2, 3, 4]
    2Data Schema DefinitionModeling8[5, 6, 7, 8, 9, 10, 11, 12]
    3API Integration ErrorsDebugging10[13, 14, 15, 16, 17, 18, 19, 20, 21, 23]
    4Documentation CleanupMaintenance3[22, 24, 25]
    5Deployment PlanningRelease3[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

    1. Review the high-frequency errors in Cluster 3 to update the system prompt's error handling.
    2. Export the user_prompts.csv for further manual labeling of edge cases.
    3. Compare these stats against session_041.jsonl to track debugging efficiency improvements.

    user_prompts.csv

    CSV · data export

    Generated

    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

    1. Source Loading takes a session ID, local file path, or raw text and creates a frozen, read-only snapshot.
    2. Unified Modeling maps source-specific roles to standard labels including user, agent, tool, and system.
    3. Prompt Cleaning removes machine-generated XML noise and normalization artifacts to isolate true user intent.
    4. Weighted Clustering applies TF-IDF, BM25, and Levenshtein distance to group messages by similarity and temporal adjacency.
    5. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Read Files
    Write Files

    File Scopes

    **/*.jsonl
    **/*.json
    **/*.md
    **/*.txt
    **/*.csv
    **/*.doc
    **/*.docx

    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.**

    Listed11 days ago

    What's inside

    Frequently Asked Questions

    This skill solves the issue of manual log auditing by providing a deterministic way to count tool executions, strip out system noise, and cluster user intents without the hallucinations common in standard LLM prompting.

    The skill is framework-agnostic and supports any agent that exports logs in JSON, JSONL, Markdown, or raw text, including specific parsing logic for Codex thread exports.

    You receive the full session analysis logic, the deterministic parsing engine, and documentation on how to map your specific log schema to the skill's unified event model.

    The skill is designed to handle long-running sessions; however, for extremely large datasets, it utilizes a frozen snapshot method to ensure data consistency and prevent memory overhead during the clustering process.

    While the clustering is automated, you can improve accuracy in niche industries by providing custom lexical anchors (keywords) to help the skill better categorize domain-specific user intents.

    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.

    Free