explaingit

chenkumi/codex-prompt-analysis

Analysis updated 2026-05-18

3PythonAudience · developerComplexity · 2/5Setup · easy

TLDR

A Codex skill and CLI script that measures how many tokens tools, skills, and MCP servers are using in a session's hidden prompt.

Mindmap

mindmap
  root((Codex Prompt Analysis))
    What it does
      Measures prompt token usage
      Breaks down tools and skills
      Flags large MCP schemas
    Tech stack
      Python
      Codex skill
    Use cases
      Find biggest token sources
      Generate HTML dashboard
      Suggest footprint fixes
    Audience
      Developers
      Codex power users
    Setup
      Install skill folder
      Run analyze script
      View JSON or HTML report

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Check which tools, skills, or MCP servers are using the most prompt tokens in a Codex session.

USE CASE 2

Generate an HTML dashboard to visualize the prompt token breakdown.

USE CASE 3

Get suggestions for what to disable to reduce prompt footprint.

USE CASE 4

Compare a saved report against what the current live session shows.

What is it built with?

Python

How does it compare?

chenkumi/codex-prompt-analysis0marildo/imago0xdfi/glm-5.2-1m-4x-dgx-spark
Stars333
LanguagePythonPythonPython
Setup difficultyeasyeasyhard
Complexity2/52/55/5
Audiencedevelopergeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

In plain English

Codex Prompt Analysis is a small tool that looks inside a Codex coding assistant session and tells you what is eating up its prompt space before your own conversation even starts. Codex, like other AI coding tools, loads a lot of hidden context before it reads anything you type: built in tools, connected MCP servers, Codex Apps connectors, the list of available skills, and any AGENTS.md files in your project. This project measures how many tokens each of those pieces is using. It ships as a Codex skill, so you can ask Codex directly to analyze its own current prompt using a short command. You can ask it which tools or skills are taking up the most tokens, whether an MCP server or a connector is quietly adding a large schema, whether your list of available skills has grown too big, what might be safe to turn off, and whether the reported breakdown matches what your live session is actually showing. For people who prefer running things by hand, there is also a command line script you can call directly from a project that has the skill installed. It can print a plain text report, output the same data as JSON, generate a static HTML dashboard you can open in a browser, or open that dashboard automatically. You can also feed it an existing JSON report file to turn into an HTML page later. There is an optimization mode that suggests conservative ways to shrink your prompt footprint, and a relaxed mode that considers more options if the conservative pass finds nothing to trim. Overall this is a diagnostic and housekeeping tool for people running Codex sessions with many tools, skills, and MCP servers connected, meant to help you understand and control how much of the model's attention hidden context is using before your own words are read.

Copy-paste prompts

Prompt 1
Use codex-analysis to show me which tools and skills are using the most tokens in this session.
Prompt 2
Run the prompt analysis script and generate an HTML dashboard.
Prompt 3
Suggest conservative ways to reduce my Codex prompt footprint.
Prompt 4
Compare this saved report to what's visible in my current session.

Frequently asked questions

What is codex-prompt-analysis?

A Codex skill and CLI script that measures how many tokens tools, skills, and MCP servers are using in a session's hidden prompt.

What language is codex-prompt-analysis written in?

Mainly Python. The stack also includes Python.

How hard is codex-prompt-analysis to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is codex-prompt-analysis for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.