How Codex finds and reads skills

Where Codex looks for SKILL.md files, the frontmatter it reads, and how the indexed skills do on the rules built from its docs.

Where Codex looks for skills

From the Codex docs: Build skills, as of 2026-11-26. See what changed in these docs.

FolderLoads in
$CWD/.agents/skills

Repository: the folder where you launch Codex

$REPO_ROOT/.agents/skills

Repository: the root, for every subfolder

$HOME/.agents/skills

User: every repository you work in

/etc/codex/skills

Admin: every user on the machine

Monorepos. Codex scans .agents/skills in every folder from where you launch it up to the repository root.

What Codex reads, and when

Skills load in three steps, so a skill costs little until it runs. From the Codex docs: Build skills, as of 2026-11-26; token counts are medians across the index.

1 · listing

name and description

Codex keeps these in context for every installed skill, so it can tell which one fits the task.

~68 tokens per skill

2 · SKILL.md body

the instructions

Loaded only when the skill is picked, or called by name.

~1,651 tokens

3 · bundled files

references/, scripts/, assets/

Read only when the body points to them, so a skill can carry long references at little cost.

55% of skills have them

Frontmatter fields Codex reads

FieldWhat it does
namerequired

The skill's name.

descriptionrequired

Codex starts with the name and description and loads the rest when it picks the skill.

  • Call it by name. Type $skill-name. Codex also picks a skill on its own when your prompt matches it.
  • Keep it manual. Add agents/openai.yaml with policy.allow_implicit_invocation: false. It is not a SKILL.md field.
  • Description length. The list of skills Codex starts with uses at most 2% of the context window, or 8,000 characters when the window size is unknown. With many skills installed, Codex shortens descriptions first.

Lines from the Codex docs the validator checks against

4 lines, quoted word for word and re-checked every week.

"The SKILL.md file must include name and description."
OpenAI: build skills
"Write imperative steps with explicit inputs and outputs."
OpenAI: build skills, best practices
"Because implicit matching depends on description, write concise descriptions with clear scope and boundaries. Front-load the key use case and trigger words so a host can still match the skill if descriptions are shortened."
OpenAI: build skills
"allow_implicit_invocation (default: true): When false, Codex won't implicitly invoke the skill based on user prompt; explicit $skill invocation still works."
OpenAI: build skills, optional metadata

How the indexed skills do on Codex's rules

3,185 of 4,462 scored skills pass all 5 rules based on the Codex docs.

Most installed skills, with the Codex command

Browse all 4,462 skills
npx skills add <owner/repo> --skill <name> -a codex

The skills CLI copies a skill into .agents/skills/, or ~/.agents/skills/ with -g. Agent ids and paths come from the skills CLI docs.