Skip to content

Installation

OpenAI Codex

In a repository, Codex walks from the working directory up to the repo root and loads .agents/skills along that path. User skills live in the home folder at ~/.agents/skills. A skill needs name and description frontmatter. Do not put long procedures in AGENTS.md; that file is sent on every turn.

Project path .agents/skills/<name>/SKILL.md

Last verified 2026-11-15

Install on OpenAI Codex — macOS

Last verified 2026-11-15 against OpenAI's Codex skills documentation: https://developers.openai.com/codex/skills

AGENTS.md is not a skill. Codex includes AGENTS.md as standing instructions on the turn. A long procedure belongs in a skill so it is loaded only when needed.

Prerequisites

  • Codex CLI or the Codex app, signed in.
  • A SKILL.md file with name and description frontmatter.

Repository skill

Codex scans .agents/skills from the current working directory up to the repository root. A skill checked in at the repo root is available throughout the repo. A skill next to a service is available when you launch Codex from that service or a child directory.

mkdir -p .agents/skills/<skill-name>

Save SKILL.md in that folder. If two skills share a name, Codex does not merge them; both can appear.

User skill

~/.agents/skills/<skill-name>/SKILL.md

OpenAI documents the user location as $HOME/.agents/skills. Use that path. Do not invent a second global folder and assume the official docs promised it.

Reload and verify

Start a new Codex session from the directory that should see the skill. Ask for the task in the words the description uses, or select the skill if the UI lists it.

Confirm the file is inside the repository you opened, not a different clone.

Troubleshooting

  • You launched Codex outside the repo, so the project skill is not on the walk from that directory to a root.
  • The procedure was pasted into AGENTS.md and now costs tokens on every turn. Move it into a skill and leave AGENTS.md short.
  • Frontmatter is missing description, so the skill is a poor match for automatic use.
  • Windows path was created in the wrong profile directory. The folder must be under the account that runs Codex.

Official reference: https://developers.openai.com/codex/skills AGENTS.md discovery, which is separate: https://developers.openai.com/codex/guides/agents-md

Official reference: developers.openai.com/codex/skills