ProfessorGPTProfessorGPT
Platform guide

Codex Skills: How to Create an OpenAI Codex SKILL.md

OpenAI Codex skills are folders with one SKILL.md file that teach Codex a repeatable workflow, so it runs the same way every time. This guide covers the format, where Codex looks for skills, four ways to create one, and what to do when one doesn't trigger.

12 min read Updated Oct 15, 2026 Beginner Needs Codex
§1First principles

What are OpenAI Codex skills?

Every team has workflows that live in someone's head: how release notes get written, which checks run before a migration, what a good PR review covers. A Codex skill writes that knowledge down once, as a runbook Codex picks up whenever the task comes around.

Concretely, a skill is a folder with a SKILL.md file: a short frontmatter saying what the skill does and when to use it, followed by the instructions. It can also carry resources and optional scripts, so Codex follows the workflow reliably instead of improvising it.

Fig. 1 — A Codex skill in one picture: folder → SKILL.md → Codex → new capability.

Codex skills use the same open Agent Skills SKILL.md format as Claude, so a well-written skill is largely portable between agents. New to the idea? Read what agent skills are first.

Where do Codex skills work?

Standalone skills work in Codex CLI, the IDE extension, and Codex in the ChatGPT desktop app. Skills bundled in a plugin also reach ChatGPT on the web, desktop, and mobile.

§2The clever part

How Codex decides to use a skill

Codex doesn't read every skill on every task. Up front it loads only each skill's name, description, and file path; the full SKILL.md is read only once Codex selects that skill. That's progressive disclosure, and it's why you can install many skills without slowing Codex down.

Level 1 · Always loaded

name + description — the “book spine”

~100 tokens / skill
your request matches the description

Level 2 · Loaded when relevant

the full SKILL.md body — your instructions

< 5k tokens
the skill points to more detail

Level 3 · Opened only if needed

extra files: reference.md, templates, scripts…

only when used
Fig. 2 — Progressive disclosure, as defined by the open standard: only the spine is always loaded. Token figures are the standard's guidance.

A skill gets selected in one of two ways:

How it happensWhat controls it
ImplicitCodex matches your request against each skill's descriptionThe wording of the description
ExplicitYou type $ and the skill's name, or pick it from /skillsNothing to configure — an explicit call always works

So the description decides whether Codex ever finds your skill on its own. Keep it concise and clearly scoped: say when the skill should trigger, and when it shouldn't.

§3Know your tools

Codex Skills vs AGENTS.md, plugins, and Claude Skills

These overlap just enough to be confusing, so here is what each one is for:

What it isWhen Codex uses itBest for
Skill (SKILL.md)Task-specific instructions, plus optional resources and scriptsWhen the task matches, or when you call it with $Repeatable workflows
AGENTS.mdA guidance file checked into the repoAlways, for work in that projectProject conventions: build commands, code style, review rules
PluginA package of skills, MCP servers, hooks, and moreAfter you install it and start a new sessionDistributing skills beyond one repo
Claude skillThe same open SKILL.md standardIn Claude CodeSharing one skill across agents

Rule of thumb: AGENTS.md says how this repo works; a skill says how a job gets done.

§4The #1 point of confusion

Where Codex skills live: ~/.agents/skills vs .agents/skills

Codex looks for skills in two main places — and the folder is .agents, not .codex:

  • Personal skills live in ~/.agents/skills/, in your home directory. They follow you into every repo on this machine.
  • Repository skills live in .agents/skills/ inside a repo. Codex checks every folder from where you started it up to the repo root, so a package in a monorepo can carry its own skills. Commit them and your team gets them too.

Two more locations exist that you'll rarely touch: admin skills in /etc/codex/skills, and system skills that ship bundled with Codex.

Fig. 3 — Two homes for a Codex skill. A repo can hold AGENTS.md and skills side by side — they do different jobs.

New to ~ and dot-folders?

  • ~ is your home directory: /Users/you on macOS, /home/you on Linux, C:\Users\you on Windows.
  • A leading dot hides the folder. Use ls -a in a terminal, Cmd+Shift+. in Finder, or turn on hidden items in the View menu of Windows File Explorer.
  • .agents/skills/ probably doesn't exist yet. You'll create it in the hands-on section below.

Following an older tutorial?

Older guides use ~/.codex/skills. Codex still reads that folder for backward compatibility, but ~/.agents/skills is the documented location — and the one other agents following the open standard read too.

Personal or repository?

Personal · ~/.agents/skills/Repository · .agents/skills/
Who benefits?Just youEveryone who clones the repo
ScopeEvery repo on your machineThis repo, or one package of it
In version control?NoYes — review skill changes like code
Good forYour own habits: release notes, review checklistsTeam procedures: migrations, deploy runbooks, API conventions
§5The file itself

The Codex SKILL.md format: anatomy of a skill

Codex requires two frontmatter fields, name and description; everything below the closing --- is the instructions. Here's a complete skill you can copy:

SKILL.md
---
name: release-notes
description: Drafts release notes from pull requests merged since the last git tag. Use when the user asks for release notes, a changelog, or a summary of what shipped. Do not use for commit messages.
---

# Release notes

1. Find the latest tag with `git describe --tags --abbrev=0`.
2. List the pull requests merged since that tag.
3. Group them under Features, Fixes, and Chores.
4. Write one user-facing bullet per change and link its PR.
5. Output Markdown ready to paste into a GitHub release.

What each field does

  • name — the skill's ID, and what you type after $. Use lowercase letters, numbers, and hyphens (the open standard caps it at 64 characters) and match the folder name: release-notes/ ↔ name: release-notes.
  • description — how Codex decides to use the skill. Say what it does, when to use it, and when not to. The example rules out commit messages, so it never competes with a commit skill.

Optional: agents/openai.yaml

Put an agents/openai.yaml file inside the skill folder to give it a display name, icon, and default prompt in the app — or to make it explicit-only:

agents/openai.yaml
interface:
  display_name: "Release notes"
  short_description: "Draft notes from merged PRs"
policy:
  allow_implicit_invocation: false

With allow_implicit_invocation: false, Codex never picks the skill on its own, but $release-notes still works.

Common mistakes

  • The path is .agents/skills/<name>/SKILL.md — .agents with an s, and every skill in its own folder.
  • Name the file exactly SKILL.md.
  • Don't skip either field: Codex requires both name and description.
  • One skill, one job. A skill that "handles releases, migrations, and reviews" has a description too vague to trigger reliably.
§6Pick your path

Four ways to create a Codex skill

WayBest whenHow it works
$skill-creatorYou can describe the workflowBuilt into Codex: it asks what the skill does, when it should trigger, and whether it needs scripts — instructions only by default
Record & ReplayIt's easier to show than to describeDemonstrate the workflow once; the recorder drafts a reusable skill from the steps
ManualYou want full controlCreate the folder and write SKILL.md yourself — the next section walks through it
Skill BuilderYou'd rather not write YAML at allProfessorGPT's free wizard generates a standard SKILL.md that works in Codex, Claude, and Gemini CLI
§7Hands on — 5 steps

Step by step: writing your first Codex SKILL.md

We'll build the release-notes skill as a personal skill, so it's available in every repo you open with Codex.

1. Create the folder

macOS / Linux
mkdir -p ~/.agents/skills/release-notes
Windows (PowerShell)
mkdir -Force ~\.agents\skills\release-notes

Both commands create any missing parent folders and are safe to run twice.

2. Write SKILL.md

Save the example from the anatomy section as ~/.agents/skills/release-notes/SKILL.md. Rather talk it through? Type $skill-creator in Codex and answer its questions instead.

3. Let Codex pick it up

Codex detects new and changed skills automatically, so there's usually nothing to do. If the skill doesn't show up, restart Codex.

4. Use it

Ask naturally — "draft the release notes for v2.4.0" — and Codex can select the skill from its description. To run it by name, mention it with $:

Fig. 4 — Explicit invocation: a $ mention runs the skill by name. Simplified — the exact output varies by Codex version.

5. Check the list

Run /skills in Codex CLI or the IDE extension to see the skills Codex loaded and pick one. If release-notes is there, you've shipped your first Codex skill. 🎓

§8Office hours

Codex skill not triggering? Troubleshooting

SymptomLikely cause and fix
Missing from /skillsWrong path. It must be ~/.agents/skills/<name>/SKILL.md, or .agents/skills/<name>/SKILL.md in the repo. .agent/ (no s) won't match, and a SKILL.md dropped straight into skills/ without its own folder isn't found.
Still missing after you fix the pathNot picked up yet. Codex usually notices new skills on its own; if it doesn't, restart Codex. Skills from a newly installed plugin need a new session.
$release-notes works, but Codex never picks it on its ownImplicit use is off, or never matches. Check allow_implicit_invocation in agents/openai.yaml, then rewrite the description with the words people actually type.
Fires on the wrong tasksDescription too broad. Add when not to use it, or make the skill explicit-only.
Two entries with the same nameDuplicate names. Codex shows both instead of merging them — rename one.
You want it off for a whileDisable it in config. Add a [[skills.config]] entry with the skill's path and enabled = false to ~/.codex/config.toml, then restart Codex.

Debug like a pro

Test the trigger the way the Codex docs suggest: write a few prompts that should use the skill and a few that shouldn't, and check which ones it fires on. If the results surprise you, the description is the thing to fix.

§9Shortcuts

How to install a ready-made Codex skill

You don't have to write every skill yourself. Four ways to add an existing one:

1. Plugins (the official route). In Codex CLI, open the plugin browser, install a plugin from a marketplace, then start a new session to use its skills:

Codex CLI
/plugins

ChatGPT and Codex share one plugin directory, so a plugin's skills can reach both.

2. $skill-installer. Built into Codex: it installs curated skills, and it can fetch one from another GitHub repo too:

Codex CLI
$skill-installer install https://github.com/owner/repo/tree/main/skills/<skill-name>

3. The skills CLI (community tool). Installs into .agents/skills/; add -g to install into ~/.agents/skills/ instead:

bash
npx skills add owner/repo --skill <skill-name> -a codex

This is the third-party skills.sh CLI, not an OpenAI command.

4. Manual. Copy any skill folder — the one containing SKILL.md — into ~/.agents/skills/ or your repo's .agents/skills/.

Or find one in the ProfessorGPT catalog and install it in one command.

§10No YAML at all

Build a Codex skill without the setup

Skip the boilerplate: the Skill Builder turns a few answers into a standard SKILL.md that works in Codex, Claude, and Gemini CLI — download it or install it straight away. You can also browse ready-made skills and adapt one.

§11Beyond your first skill

Level up your Codex skills

You have the loop now: folder → SKILL.md → trigger → refine. From here, skills grow in a few directions:

  • Bundle resources. Put reference docs in references/ and templates in assets/, and point to them from SKILL.md — Codex opens them only when needed (Level 3 in Fig. 2).
  • Add scripts sparingly. A scripts/ helper earns its place for deterministic steps or external tools; everything else reads better as instructions.
  • Declare what it needs. dependencies.tools in agents/openai.yaml can list the tools a skill relies on, such as an MCP server.
  • Share it wider. A repo's .agents/skills/ covers one team; a plugin — even a skills-only one — is how you distribute beyond a single repo. Or publish it to the ProfessorGPT catalog.

The SKILL.md template adds the optional frontmatter fields, and the SKILL.md examples show finished skills to adapt.

Before you ship a Codex skill

  • Path is …/.agents/skills/<skill-name>/SKILL.md — .agents, its own folder, exact filename
  • name is lowercase-with-hyphens and matches the folder
  • description says what, when, and when not — in words people actually type
  • The skill does one job
  • Tested twice: once with a natural request, once with a $skill-name mention

Frequently asked questions

Where does Codex store skills?+
Personal skills live in ~/.agents/skills/ and repository skills in .agents/skills/ — Codex checks every folder from where you started it up to the repo root. Admins can add skills in /etc/codex/skills, and system skills ship with Codex. Each skill is a folder containing a SKILL.md.
Is a Codex SKILL.md the same as Claude's?+
Yes — both use the open Agent Skills SKILL.md format, so a well-written skill is largely portable. The main difference is the folder: .agents/skills for Codex, .claude/skills for Claude Code. Codex also reads an optional agents/openai.yaml for app metadata.
How do I invoke a Codex skill?+
Codex selects matching skills automatically from the description. To call one explicitly, type $ followed by the skill name, or run /skills in Codex CLI or the IDE extension.
What's the difference between SKILL.md and AGENTS.md?+
AGENTS.md is always-on, repo-wide guidance; a SKILL.md skill is task-specific and loaded only when relevant. Use AGENTS.md for project conventions and skills for repeatable workflows.
Do I need to write code for a Codex skill?+
No — a skill is markdown with a short frontmatter. Scripts are optional. You can also generate one with the free Skill Builder.
Do I need to restart Codex after adding a skill?+
Usually not: Codex detects new and changed skills automatically. If an update doesn't appear, restart Codex. Skills from a newly installed plugin become available in a new session.
What is $skill-creator in Codex?+
Codex's built-in skill creator. Type $skill-creator and it asks what the skill should do, when it should trigger, and whether it needs scripts, then drafts the skill for you. Skills are instruction-only unless you ask for scripts.
What happened to ~/.codex/skills?+
It's the older location. Codex still reads it for backward compatibility, but the documented personal folder is now ~/.agents/skills — the same one other open-standard agents use.
How do I turn off a Codex skill without deleting it?+
Add a [[skills.config]] entry with the skill's path and enabled = false to ~/.codex/config.toml, then restart Codex. To keep it available only on demand instead, set policy.allow_implicit_invocation: false in its agents/openai.yaml.

Build your skill now

Generate a standard SKILL.md in seconds — no YAML by hand.