codex-1m-context-window-setup

codex-1m-context-window-setup is a skill for Claude Code, Codex from daymade/claude-code-skills. It costs 151 tokens per session (1,141 once invoked), scanned A, original, MIT.

A setup and verification guide for enlarging the context window in OpenAI Codex, the amount of project and conversation text it can consider at once. It adjusts settings according to the selected model's actual limit.

In plain words
What is it for?
Use it to inspect current limits, apply a supported configuration, or verify the setup after a model or software update.
Why use it?
It reduces frequent automatic compaction while avoiding settings that exceed what the model supports.

Skill for Claude CodeCodex

Part of the daymade-codex plugin — 5 skills shipped together

About the project

Claude Code Skills Marketplace is a collection and marketplace of skills, plugins, agents, and instructions that extend Claude Code with specialized development workflows. It is for developers who want to install existing workflows or create, validate, and package their own Claude Code skills.

daymade/claude-code-skills · 1,375 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/daymade/claude-code-skills/codex-1m-context-window-setup
Any agent
npx skills add daymade/claude-code-skills --skill codex-1m-context-window-setup
Clone the repo
git clone --depth 1 https://github.com/daymade/claude-code-skills

Made for: Claude Code, Codex.

Or install daymade-codex, the plugin that ships this one along with the rest of its 5 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-1m-context-window-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/daymade/claude-code-skills/codex-1m-context-window-setup.svg)](https://agentmods.dev/skills/daymade/claude-code-skills/codex-1m-context-window-setup)
Your own site
<a href="https://agentmods.dev/skills/daymade/claude-code-skills/codex-1m-context-window-setup"><img src="https://agentmods.dev/badge/skills/daymade/claude-code-skills/codex-1m-context-window-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,141 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00151 $0.01141
Opus 5 $0.00076 $0.00571
Sonnet 5 $0.00030 $0.00228
Haiku 4.5 $0.00015 $0.00114

Measured 5d ago against content hash cbbef49eded2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex-1m-context-window-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/codex_context_window.py, tests/test_codex_context_window.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

daymade-codex/codex-1m-context-window-setup/SKILL.md · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codex 1m Context Window Setup

Expand future Codex sessions without pretending every model supports one million tokens. The bundled script reads Codex's current model catalog, caps the request at the selected model's declared maximum, and applies the user's established 60% auto-compaction policy.

Route the request

User intent Action
Inspect the current limit, explain 258K, or preview the recommendation Run doctor
Configure/fix/raise the context window Run apply
Confirm a prior setup is still correct after an update or model switch Run verify

Do not ask the user for raw token numbers. The model catalog is the authority and the script derives the attainable values.

Run the workflow

When this Skill loads, the host exposes its installed path. Resolve it explicitly:

  • In Codex, take the directory containing SKILL.md from this Skill's file: entry in the current Available skills catalog.
  • In Claude Code, use the Base directory for this skill shown by the Skill load result.

Do not search a home directory for another copy. If the host did not expose an installed path, stop with installed Skill path not exposed rather than guessing.

On macOS/Linux, set that exact directory and run:

SKILL_DIR="/absolute/path/from-the-loaded-skill-metadata"
uv run --no-project python "$SKILL_DIR/scripts/codex_context_window.py" doctor
uv run --no-project python "$SKILL_DIR/scripts/codex_context_window.py" apply
uv run --no-project python "$SKILL_DIR/scripts/codex_context_window.py" verify

On Windows PowerShell, use the same exposed directory with forward slashes:

$SkillDir = "C:/absolute/path/from-the-loaded-skill-metadata"
uv run --no-project python "$SkillDir/scripts/codex_context_window.py" doctor
uv run --no-project python "$SkillDir/scripts/codex_context_window.py" apply
uv run --no-project python "$SkillDir/scripts/codex_context_window.py" verify

doctor

Run first. It is read-only and reports:

Read the full file on GitHub · 124 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 124 lines · 151 tokens per session scan A cbbef49eded2

Subscribe to this mod's changes

codex-1m-context-window-setup is a skill published in the GitHub repository daymade/claude-code-skills (1,375 stars, last pushed yesterday), licensed MIT. It adds 151 tokens to every session and 1,141 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens