How To Shrink The System Prompt For Codex — Development skill for Claude Code
Article about how minimize the system prompt of Codex and turn off skills and MCP servers.
How to install How To Shrink The System Prompt For Codex
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open abraxarion/How-to-shrink-the-system-prompt-for-Codex and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What How To Shrink The System Prompt For Codex does
Article about how minimize the system prompt of Codex and turn off skills and MCP servers.
Alternatives in Development
- MCP Builder — Guide for creating high-quality MCP servers to integrate external APIs and services 94.1k ★
- MCP Python SDK — Python SDK for building MCP servers 22.3k ★
- Claude Code Everything You Need To Know — Ultimate all-in-one guide to mastering Claude Code 1.3k ★
README
How to shrink the built-in system-prompt in Codex
Codex can carry substantially more fixed context than you may expect.
The effective prompt seen by the model can include:
- Codex's bundled base instructions
- global
AGENTS.md - repository-level
AGENTS.md - directory-specific
AGENTS.md developer_instructions- skill instructions
- plugin/app instructions
- MCP tool definitions
- built-in tool schemas
- your actual conversation
For ordinary usage this may be fine. But if your goal is a **lean coding harness**, **lower token throughput**, **better prompt-cache behavior**, or a **minimal bootstrap environment**, reducing this fixed context can be worthwhile.
The most important trick is not to shorten Codex's built-in prompt manually.
Instead, **replace it**.
1. Replace Codex's bundled base instructions
Current Codex versions support:
model_instructions_file = "/path/to/minimal-codex-prompt.md"
Add this to:
~/.codex/config.toml
The referenced file can contain a much smaller base prompt.
For example:
You are a coding agent operating in a repository.
Use the available tools to inspect and modify files as needed.
Rules:
- Follow the user's request precisely.
- Inspect relevant code before editing.
- Preserve existing behavior unless change is requested.
- Make minimal, coherent edits.
- Do not modify unrelated files.
- Run relevant tests when practical.
- Report changes and unresolved issues concisely.
This can reduce a fairly large bundled instruction set to only a few hundred tokens.
A minimal configuration might therefore begin with:
model_instructions_file = "/home/user/.codex/minimal-instructions.md"
On Windows:
model_instructions_file = "C:\\Users\\USERNAME\\.codex\\minimal-instructions.md"
[!IMPORTANT] Do not duplicate tool descriptions in the replacement prompt. Tool schemas are supplied separately by the harness. Repeating shell, editor, patch, or MCP tool instr
Related Skills
Agent Extensions Manager
One list for the skills, plugins and MCP servers behind Claude Code, OpenCode and Codex. Turn any of them on o
Anime X Cover Skill
Claude Code / Codex skill — turn an article into a paste-and-go cover prompt or image. Two cover families: ani
Haptic Bridge
Local daemon that turns Claude Code / Codex lifecycle events (permission prompt, waiting for input, turn done)
Token Consumer
Measure and shrink the token cost of Claude Code skills, tier by tier: the always-on system-prompt tax, the pe
Bridge MCP
Mirror MCP servers from .mcp.json into Codex and Antigravity workspace configs
Quiver CLI
Compose skills, slash commands & MCP servers from a central catalog into any repo as native configs for openco
Related Agents
Worker Review
Reviews an existing PR. Runs /review (plus /cso if security-adjacent); /codex review is opt-in (OFF by default
Omd Persona Tester
Adversarial synthetic user that walks through generated UI under a strict persona prompt with hard turn budget
AI Architect
Specializes in architecting AI-powered applications on Vercel — choosing between AI SDK patterns, configuring