Agent skill

Codex 1m Context Window Setup

by daymade in daymade/claude-code-skills

Configures and verifies an expanded, model-aware context window for OpenAI Codex CLI and Desktop.

MITAuto-check passedAgent Workflows

Install Codex 1m Context Window Setup

skills CLI
$ npx skills add daymade/claude-code-skills --skill codex-1m-context-window-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install daymade/claude-code-skills codex-1m-context-window-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/daymade/claude-code-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/daymade-codex/codex-1m-context-window-setup .claude/skills/codex-1m-context-window-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
codex-1m-context-window-setup
GitHub stars
1.4k
Token cost
~1.2k tokens
SKILL.md length
512 words
Files
4 (incl. scripts, references)
Skills in repo
102
Repo updated
First seen
Licence
MIT

At a glance

Configures and verifies an expanded, model-aware context window for OpenAI Codex CLI and Desktop.

  • Works in 6 steps: Re-reads the live model contract. → Changes only the top-level… → Creates a content-addressed backup only… → …
  • Codex shows ~258K context
  • SKILL.md covers Route the request, Run the workflow, Report the outcome and Refuse scope expansion
  • Runs Python scripts from its folder; calls uv

What it does

Codex 1m Context Window Setup is an agent skill from daymade/claude-code-skills. Configures and verifies an expanded, model-aware context window for OpenAI Codex CLI and Desktop. Use when Codex shows ~258K context, you want 500K or 1M tokens, auto-compaction fires too often, or modelcontextwindow/modelautocompacttokenlimit needs repair. Not for changing the selected model or other Codex settings.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/context_window_contract.md`, `scripts/codex_context_window.py` and `tests/test_codex_context_window.py`).

It sits in Agent Workflows, covering Context engineering. The repository describes itself as: Professional Claude Code skills marketplace featuring production-ready skills for enhanced development workflows. The licence is MIT.

When your agent uses it

  • Codex shows ~258K context
  • Auto-compaction fires too often
  • Modelcontextwindow/modelautocompacttokenlimit needs repair

Example prompts

  • “Use the codex-1m-context-window-setup skill to configure and verifies an expanded, model-aware context window for OpenAI Codex CLI and Desktop”
  • “/codex-1m-context-window-setup”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Re-reads the live model contract.
  2. Changes only the top-level model_context_window and
  3. Creates a content-addressed backup only when bytes will change.
  4. Uses an atomic same-directory replace and refuses to overwrite a concurrently
  5. Runs Codex strict-config diagnostics; a failure restores the exact prior bytes.
  6. Reads the written file back and reports the values that future sessions will use.

What it can do on your machine

Read from SKILL.md and the folder at commit 3c268d6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codex 1m Context Window Setup loads about 1.2k tokens when it runs, and up to ~2k if it reads all its reference files. Until then it costs about 89 tokens; SKILL.md has 512 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~89
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from daymade/claude-code-skills at commit 3c268d6, republished under its MIT licence (© daymade). 512 words, ~1,174 tokens.

Download SKILL.mdSave it as .claude/skills/codex-1m-context-window-setup/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
codex-1m-context-window-setup
description
Configures and verifies an expanded, model-aware context window for OpenAI Codex CLI and Desktop. Use when Codex shows ~258K context, you want 500K or 1M tokens, auto-compaction fires too often, or model_context_window/model_auto_compact_token_limit needs repair. Not for changing the selected model or other Codex settings.
argument-hint
[doctor|apply|verify]

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 intentAction
Inspect the current limit, explain 258K, or preview the recommendationRun doctor
Configure/fix/raise the context windowRun apply
Confirm a prior setup is still correct after an update or model switchRun 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:

bash
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:

powershell
$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:

  • selected model resolved by Codex;
  • catalog default, model maximum, and usable percentage;
  • requested raw window (up to 1,000,000), usable window, and 60% compaction point;
  • current base-config values and whether apply is needed;
  • exact $CODEX_HOME/config.toml target.

If Codex cannot return a live model catalog, stop. Do not substitute remembered model limits, API marketing numbers, or a bundled default.

Show full SKILL.md (247 more words)Show less
apply

Run only after doctor succeeds. The script:

  1. Re-reads the live model contract.
  2. Changes only the top-level model_context_window and model_auto_compact_token_limit keys.
  3. Creates a content-addressed backup only when bytes will change.
  4. Uses an atomic same-directory replace and refuses to overwrite a concurrently changed config.
  5. Runs Codex strict-config diagnostics; a failure restores the exact prior bytes.
  6. Reads the written file back and reports the values that future sessions will use.

Existing sessions do not grow in place. After success, tell the user to start a new CLI thread or restart/open a new Codex Desktop thread.

verify

Run after Codex upgrades, default-model changes, or on a newly configured machine. It exits non-zero when the current base config no longer equals the model-aware recommendation. Report the mismatch; do not call it configured.

Report the outcome

Copy exact values from script output. Include:

  • model slug;
  • configured raw window;
  • usable window shown to the session;
  • automatic compaction threshold;
  • whether the model capped the 1M request;
  • config and backup paths;
  • restart_required: true after a changed apply.

Refuse scope expansion

This Skill does not:

  • change the selected model, reasoning effort, service tier, sandbox, approvals, plugins, MCP servers, browser/computer-use settings, or shell aliases;
  • edit profile-specific config files or override per-command -c flags;
  • claim the current running thread was expanded;
  • force 1M when the selected model declares a smaller maximum;
  • fall back to stale or guessed model metadata.

Read references/context_window_contract.md when diagnosing model caps, the 95% usable-window display, or compaction semantics.

© daymade, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in daymade-codex/codex-1m-context-window-setup of daymade/claude-code-skills.

  • SKILL.md
  • references/context_window_contract.md
  • scripts/codex_context_window.py
  • tests/test_codex_context_window.py

Open the folder on GitHubat commit 3c268d6

Compare with similar skills

Codex 1m Context Window Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codex 1m Context Window Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codex 1m Context Window Setup this skilldaymade/claude-code-skills1.4k—~1.2kAutomated safety check: PassMIT
Context Mode Output Sandboxmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence
Memori Long-Term MemoryMemoriLabs/Memori17k—~2kAutomated safety check: NotesCustom licence
Picoclaw Skill Creatorsipeed/picoclaw30k—~4.4kAutomated safety check: PassMIT
ccc Semantic Code Searchcocoindex-io/cocoindex-code2.7k—~938Automated safety check: PassApache-2.0
Context Mode for Antigravity CLImksglu/context-mode26k—~850Automated safety check: PassCustom licence

Similar skills

  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Memori Long-Term Memory

    MemoriLabs/Memori

    Connects Claude Code to Memori Cloud for long-term memory, recalling stored context before substantive replies and saving new context afterward.

    17k GitHub stars~2k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check: notes
  • Picoclaw Skill Creator

    sipeed/picoclaw

    Guidance for creating, updating and reviewing Picoclaw skills, from the SKILL.md structure to organizing bundled scripts, references and assets.

    30k GitHub stars~4.4k tokensUpdated 12 days ago
    Agent WorkflowsAuto-check passed
  • ccc Semantic Code Search

    cocoindex-io/cocoindex-code

    Semantic code search and index management with the ccc CLI: the agent initializes, indexes and queries the project by concept, filtering by language or path.

    2.7k GitHub stars~938 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Routing rules for using context-mode MCP tools in Antigravity CLI: sandboxed code runs, file analysis, indexed search and web fetches that keep large output out of the conversation.

    26k GitHub stars~850 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Token Optimizer

    alexgreensh/token-optimizer

    Audit a Claude Code or Codex setup for context-window waste, then fix it and measure the savings.

    2.5k GitHub stars~3.6k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed

More from daymade/claude-code-skills

All 102 skills in this repo
  • Video Comparer

    daymade/claude-code-skills

    This skill should be used when comparing two videos to analyze compression results or quality differences.

    1.4k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check: notes
  • CLI Demo Generator

    daymade/claude-code-skills

    Generates professional animated CLI demos as GIFs using VHS terminal recordings.

    1.4k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Doc To Markdown

    daymade/claude-code-skills

    Converts DOCX/PDF/PPTX and saved HTML/HTM to high-quality Markdown with automatic post-processing.

    1.4k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Interaction Design Board

    daymade/claude-code-skills

    Generates several distinct, clickable HTML interaction prototypes for one product surface into a Design Board and collects selection/remix feedback before implementation.

    1.4k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Auto Repo Setup

    daymade/claude-code-skills

    Diagnoses and repairs repository setup and guarded Git workflows for Claude Code or Codex — environment repair, startup sync, hook auditing, collaborator handoff.

    1.4k GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Bigdata Skill

    daymade/claude-code-skills

    Pulls Bigdata.com (RavenPack) financial and news data via the official bigdata-client SDK and /v1/ REST endpoints — structured financials, prices, analyst estimates, entity-sentiment series…

    1.4k GitHub stars~3.7k tokensUpdated today
    Auto-check passed

Categories

Questions about Codex 1m Context Window Setup

What does Codex 1m Context Window Setup do?

Configures and verifies an expanded, model-aware context window for OpenAI Codex CLI and Desktop. Codex 1m Context Window Setup is an agent skill from daymade/claude-code-skills. Configures and verifies an expanded, model-aware context window for OpenAI Codex CLI and Desktop.

When should I use Codex 1m Context Window Setup?

Codex 1m Context Window Setup fits situations like: Codex shows ~258K context; auto-compaction fires too often; modelcontextwindow/modelautocompacttokenlimit needs repair.

How do I install Codex 1m Context Window Setup in Claude Code?

Run `npx skills add daymade/claude-code-skills --skill codex-1m-context-window-setup -a claude-code`. Or copy the skill folder (daymade-codex/codex-1m-context-window-setup in daymade/claude-code-skills) into .claude/skills/codex-1m-context-window-setup in your project. Claude Code loads it when a task matches its description.

How do I install Codex 1m Context Window Setup in Codex?

Run `npx skills add daymade/claude-code-skills --skill codex-1m-context-window-setup -a codex`. Or copy the skill folder (daymade-codex/codex-1m-context-window-setup in daymade/claude-code-skills) into .agents/skills/codex-1m-context-window-setup in your project. Codex loads it when a task matches its description.

Can I use Codex 1m Context Window Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add daymade/claude-code-skills --skill codex-1m-context-window-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codex-1m-context-window-setup, .gemini/skills/codex-1m-context-window-setup, .github/skills/codex-1m-context-window-setup and .opencode/skills/codex-1m-context-window-setup in your project.

What does Codex 1m Context Window Setup need to run?

Going by SKILL.md and its folder, Codex 1m Context Window Setup needs Python for the scripts in its folder and the command-line tools its instructions call (uv). Our summary lists: Python 3.

Does Codex 1m Context Window Setup access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Codex 1m Context Window Setup safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Codex 1m Context Window Setup use?

Codex 1m Context Window Setup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codex 1m Context Window Setup use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 828 tokens, read only when the agent opens those files.

What are the alternatives to Codex 1m Context Window Setup?

Skills that share tags, products or a category with Codex 1m Context Window Setup: Context Mode Output Sandbox (mksglu/context-mode, 26k stars), Memori Long-Term Memory (MemoriLabs/Memori, 17k stars), Picoclaw Skill Creator (sipeed/picoclaw, 30k stars) and ccc Semantic Code Search (cocoindex-io/cocoindex-code, 2.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codex 1m Context Window Setup?

daymade (a GitHub user) maintains it in daymade/claude-code-skills, which has 1,443 GitHub stars. The repository holds 102 skills in this directory. The repository was last updated on October 7, 2026.

Source: daymade/claude-code-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.