Codex skills: where they live, how they load, and how to write one OpenAI's Codex loads skills from a folder containing a required SKILL.md file with name and description frontmatter, following the open agent skills standard so the same folder works in other clients, according to OpenAI's Codex skills documentation. Codex reads only each skill's name, description and file path up front, capped at 2% of the model's context window or 8,000 characters when the window size is unknown, and the skills.max_context_tokens setting can raise that budget to 10,000 tokens. Skills load from .agents/skills in every directory up to the repository root, from ~/.agents/skills for user-level skills shared by Codex, OpenCode, pi and octomind, and from /etc/codex/skills for machine-wide defaults, with same-named skills not merged and a restart required after configuration changes. Codex skills: where they live, how they load, and how to write one Does Codex have skills? Yes: a Codex skill is a folder with a SKILL.md file that packages instructions, resources and optional scripts for a recurring task, and Codex loads it when your request matches. Skills follow the open agent skills standard https://developers.openai.com/codex/skills , so the same folder can serve other clients too. This post covers the format, where Codex loads skills from, the context budget that decides what the model sees, and a worked example. What a skill is A skill is a directory; the only required file is SKILL.md with name and description in its frontmatter: my-skill/ ├── SKILL.md required: instructions + metadata ├── scripts/ optional: executable code ├── references/ optional: documentation └── assets/ optional: templates, resources Skills use progressive disclosure: Codex starts with each skill's name and description — plus its file path — and reads the full SKILL.md only when it decides to use the skill. That initial list has a budget: at most 2% of the model's context window, or 8,000 characters when the window size is unknown. With many skills installed, Codex shortens descriptions first and may omit skills from the list with a warning. The skills.max context tokens setting raises the budget, up to 10,000 tokens; it applies to the list only, not to the full instructions of a selected skill. The practical consequence: the description is the part that always competes for attention. Front-load the trigger words and the scope, because a shortened description still has to match your request. Where Codex loads skills from The Codex skills folder locations form a ladder, per the skills documentation https://developers.openai.com/codex/skills : | Scope | Location | Use | |---|---|---| | Repository | .agents/skills in every directory from the working directory up to the repository root | Skills checked in with the code, per module or for everyone | | User | ~/.agents/skills | Personal skills that apply in any repository | | Admin | /etc/codex/skills | Machine-wide defaults and automation | Two skills with the same name are not merged; both can appear in the selectors. Restart Codex after changing skill configuration. The user-level folder is worth a second look: ~/.agents/skills is the shared location that Codex, OpenCode, pi and octomind all read, so one skill installed there serves every client that reads the standard. Invoking a skill Two ways, both documented: - Explicit : run /skills in the Codex CLI or IDE extension to list them, or type $ to mention a skill directly in your prompt. This is the reliable way to use a Codex CLI skill you know you want. - Implicit : Codex selects a skill when your task matches its description . No command needed — and no guarantee, which is why the description matters. There is also a built-in creator: invoke $skill-creator and it asks what the skill does, when it should trigger, and whether it needs scripts. Instruction-only is the default. A worked example A skill for the task every repository repeats — repairing a failing test run. Create .agents/skills/fix-ci/SKILL.md in the repository: --- name: fix-ci description: Repair a failing test or CI run. Use when tests fail after a change, or when asked to fix the build. Not for writing new tests. --- 1. Run the failing suite and read the full error output. 2. Name the failing assertion and the code path it exercises. 3. Make the smallest change that fixes the cause, not the symptom. 4. Re-run the suite. If it still fails, report what remains instead of editing the test to pass. That is a complete, installable skill — no scripts, no manifest. The documented best practices apply: one job per skill, instructions over scripts unless you need deterministic behavior, imperative steps with explicit inputs and outputs, and a description tested against the prompts you expect to trigger it. To distribute a skill beyond your own machine, package it as a plugin through the directory Codex shares with ChatGPT. Skills are advice, not enforcement A skill tells the agent how to work; nothing in the format makes it obey. Step 4 above — "report what remains instead of editing the test to pass" — is exactly the kind of rule a model can skip under pressure to finish. The decay is measured: in our Codex benchmark https://besydr.com/blog/codex-benchmark-with-and-without-besydr , rules from an earlier session were broken 49 times in 128 requests across five projects, and 3 times with Besydr. Besydr say: besider is a program that runs beside a coding agent and learns from its sessions, and it meets skills where they live. It can compile grounded lessons from your corrections into candidate skills, runs each in a trial before keeping it, and writes a kept skill that applies everywhere to ~/.agents/skills/