Skills Explorer Add Skills

codex-1m-context-window-setup

An agent skill by daymade, from daymade/claude-code-skills. Tags: cli, cloud, performance, setup, validation.

What it does

Configures and verifies an expanded, model-aware context window for OpenAI Codex CLI and Codex Desktop by safely updating the shared base config. Use whenever Codex shows about 258K context, the user asks for 500K or 1M context, auto-compaction happens too often, model_context_window or model_auto_compact_token_limit needs repair, or a workstation/classroom needs the same long-context setup across macOS and Windows. Detects the selected model's live maximum, requests up to 1M tokens, sets compaction to 60% of the attainable window, preserves unrelated TOML, backs up changes, and fails rather than guessing when the model contract cannot be verified.

Install

With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:

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

Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):

git clone --depth 1 https://github.com/daymade/claude-code-skills
cp -r claude-code-skills/daymade-codex/codex-1m-context-window-setup ~/.claude/skills/codex-1m-context-window-setup

Safety box score

Grade B, low risk: 23 of 100 risk points, rated 2026-10-16. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.

This skill uses the installed `codex` CLI to read the live model catalog and then edits the user's base Codex config at `CODEX_HOME/config.toml`, with backups written under `CODEX_HOME/backups/...`. The main risks are local command execution and modifying user-level configuration; it does not attempt sudo, system-wide installs, or secret harvesting.

Category levels, from 0 (none) to 3 (high)
CategoryLevelWhy
Code & shell execution2 (moderate)`scripts/codex_context_window.py` shells out to the local `codex` binary with `subprocess.run` for `doctor`, `debug models`, and `--strict-config doctor`, so installing the skill grants local command execution of whatever `codex` executable is present.
Network access1 (low)The workflow depends on a live model catalog (`codex debug models`) and Codex diagnostics (`codex doctor --json`), so it can reach Codex services using the user's existing CLI identity, but it does not fetch arbitrary URLs or send data to third-party hosts.
Filesystem reach2 (moderate)`apply` reads and writes the base `$CODEX_HOME/config.toml` and creates timestamped backups under `$CODEX_HOME/backups/codex-1m-context-window-setup/`, which changes user-level files outside the repository.
Secrets & credentials0 (none)The shipped files do not read `.env`, keychains, browser sessions, or token stores; they only ask Codex for model metadata and config status.
Privilege & persistence0 (none)There is no `sudo`, global package install, service registration, shell-startup editing, or OS-level setting change in the skill.
Instruction hijack surface1 (low)`SKILL.md` directs the agent to "Do not ask the user for raw token numbers" and to stop if the installed path is not exposed; this is a strong behavior constraint, but it is not a hidden prompt or an external instruction fetch.
Irreversible actions0 (none)The skill only configures local Codex settings and reports results; it does not send messages, deploy, pay, book, or delete external resources.
Transparency0 (none)All shipped files are plain-text Markdown and Python; there are no binaries, minified blobs, or runtime-downloaded code.

Before installing

Rated 2026-10-16 by an automated review of 4 files from the skill's repository.

Source

Repository
daymade/claude-code-skills (all skills from this repository)
Path
daymade-codex/codex-1m-context-window-setup/SKILL.md
Branch
main
Updated
2026-09-20