How Codex picks a skill
OpenAI's documentation says skills can be used in two ways: "Explicit invocation: Include the skill directly in your prompt." and "Implicit invocation: ChatGPT or Codex can choose a skill when your task matches the skill description."
In Codex CLI or the IDE extension, you invoke a skill explicitly by running /skills or typing $ followed by its name.
For implicit use, the description does the work. The documentation advises: "Because implicit matching depends on description, write concise descriptions with clear scope and boundaries."
It also explains how much Codex loads up front. Skills use progressive disclosure: "ChatGPT and Codex start with each skill's name and description, then load the full SKILL.md instructions when they decide to use that skill." In Codex, the initial list also includes each skill's file path.
That initial list has a budget. If many skills are installed, the documentation says Codex shortens descriptions first and may leave some skills out of the list with a warning. You can change the budget with the skills.max_context_tokens setting. Front-loading the key use case in each description keeps it recognizable when it's shortened.
What goes in SKILL.md
The minimum is a short frontmatter block with name and description, followed by the instructions. OpenAI's template uses a description that explains exactly when the skill should and should not trigger.
A skill folder can also hold:
scripts/for executable codereferences/for documentationassets/for templates and resourcesagents/openai.yamlfor appearance, invocation policy, and tool dependencies
OpenAI's best practices are short: "Keep each skill focused on one job." "Prefer instructions over scripts unless you need deterministic behavior or external tooling." "Write imperative steps with explicit inputs and outputs."
Where to save a skill
OpenAI's documentation lists where Codex looks:
$CWD/.agents/skills: the folder where you launch Codex, for skills relevant to one module or service$CWD/../.agents/skills: a parent folder inside a Git repository, for a shared area$REPO_ROOT/.agents/skills: the repository root, for skills everyone in the repository uses$HOME/.agents/skills: your personal folder, for skills you want in every repository/etc/codex/skills: a shared system location for admin skills- System: skills bundled with Codex, including
skill-creatorandskill-installer
For repositories, the documentation says: "Codex scans .agents/skills in every directory from your current working directory up to the repository root."
Two details to know. If two skills share the same name, "Codex doesn't merge them; both can appear in skill selectors." And Codex picks up changes on its own: "Codex detects skill changes automatically. If an update doesn't appear, restart Codex."
Example 1: A personal weekly update skill
This lives in your personal folder so it works in any repository. Save it as $HOME/.agents/skills/weekly-update/SKILL.md. Frontmatter:
name: weekly-updatedescription: Write my Friday status update from this week's commits and notes. Use when I ask for a weekly update or status summary. Do not use for release notes.
Body, with our example lines to adapt:
- Collect merged work from this week's commits in the current repository.
- Group items under Shipped, In progress, and Blocked.
- Keep each item to one line with a link to the change.
- End with the two most important next steps.
Why it works: the description names the trigger words and says what it isn't for, so Codex doesn't confuse it with a release notes skill.
Example 2: A team release notes skill
This belongs to the repository, so everyone gets it. Save it as .agents/skills/release-notes/SKILL.md at the repository root and commit it. Frontmatter:
name: release-notesdescription: Draft user-facing release notes from merged changes since the last tag. Use when preparing a release.
Body, with our example lines to adapt:
- Find the most recent release tag and list changes since then.
- Write for users, not developers: describe what changed, not how.
- Group under New, Improved, and Fixed.
- Put a template for the final format in
assets/and follow it.
Why it works: the template file keeps the format consistent, and assets/ is the folder OpenAI lists for templates and resources.
Example 3: A skill scoped to one service
Some instructions only make sense inside one part of a repository. Save this as .agents/skills/billing-migrations/SKILL.md inside the billing service's folder. Frontmatter:
name: billing-migrationsdescription: Checklist for database migrations in the billing service. Use when adding or changing a migration under this folder.
Body, with our example lines to adapt:
- Every migration must be reversible; write the rollback first.
- Never rename a column in one step; add, backfill, then remove.
- Run the billing test suite before proposing the change.
Why it works: because Codex scans from your working directory up to the root, this skill is in the list when you launch Codex inside the billing service.
Example 4: A skill that only runs when you ask
Some workflows should never start on their own, such as a deploy checklist. Save this as .agents/skills/deploy-checklist/SKILL.md. Frontmatter:
name: deploy-checklistdescription: Pre-deploy checklist for production. Use only when explicitly invoked.
Then add agents/openai.yaml in the same folder with a policy section that sets allow_implicit_invocation to false.
OpenAI's documentation explains the effect: "When false, Codex won't implicitly invoke the skill based on user prompt; explicit $skill invocation still works." The default is true.
Body, with our example lines to adapt:
- Confirm the target environment and version with me before anything else.
- List pending migrations and feature flags that change with this release.
- Stop and ask if any check fails.
Example 5: A custom prompt turned into a skill
If you used custom prompts, it's time to move them. OpenAI's custom prompts page says: "Custom prompts are deprecated." It explains the difference: custom prompts "require explicit invocation and live in your local Codex home directory (for example, ~/.codex), so they're not shared through your repository."
To convert one, create a skill folder, move the prompt text into the body of SKILL.md, and write a name and description. If the old prompt relied on arguments, describe the inputs in plain steps instead.
Why it works: the same instructions are now shareable through the repository and can be picked up implicitly when the description matches.
Turn off a skill without deleting it
OpenAI's documentation says you can use [[skills.config]] entries in ~/.codex/config.toml to disable a skill. Each entry uses one selector: an absolute path to a SKILL.md file, or a name, with enabled set to false. When more than one entry matches a skill, the last matching entry wins.
To turn off all bundled system skills for one project, the documentation says to add a skills.bundled setting with enabled set to false in that project's trusted .codex/config.toml. Restart Codex after changing the configuration.
Skills, AGENTS.md, and plugins
These three do different jobs.
AGENTS.md holds rules and context that apply to every task in a project. Codex reads it before doing any work. We showed example files in our guide to AGENTS.md examples for Codex.
Skills hold workflows for specific tasks, loaded when needed. A long AGENTS.md section about one task is a good candidate for a skill.
Plugins distribute skills. OpenAI's documentation says: "Plugins can include one or more skills." Use them when you want other people to install your skills, or when a skill needs a connector.
What people try first
Writing a vague description. Implicit matching depends on it.
Putting every rule in one skill. Keep each skill focused on one job.
Saving a team skill in your home folder. Teammates won't get it. Use the repository's .agents/skills.
Giving two skills the same name. Codex doesn't merge them.
Deleting a skill to stop it triggering. Disable it in config.toml or make it explicit-only.
Keeping custom prompts. They're deprecated in favor of skills.
The Fix: Turn repeated instructions into skills
Step 1: List what you paste repeatedly
Collect the instructions you give Codex more than once a week.
Step 2: Write one skill per task
Give each a clear description with trigger words and boundaries.
Step 3: Save it at the right level
Personal skills in your home folder, team skills at the repository root, service-specific skills in that service's folder.
Step 4: Write down the reasoning
Note why each workflow is the way it is, in your own words, separate from the skill.
Setting this up in MemoryLake
A skill captures how to do a task in Codex. The knowledge behind it, such as why migrations must be reversible or what your users care about in release notes, is useful beyond one tool and one repository.
MemoryLake is a memory layer for that kind of context, kept in one place you maintain and available to the assistants you connect, such as ChatGPT, Claude Code, and Codex.
You write the entries yourself, in your own words. Nothing is read out of, written to, or deleted from your skill folders, your SKILL.md files, your config.toml, your Codex chats, or any vendor's store. Codex skills work the way OpenAI describes them.
Step 1: Create an API key
Sign in and generate a key from the dashboard. Keep it somewhere private.

Step 2: Upload your first memories
Start with what you wrote in Step 4 of the fix: the reasons behind each workflow. One topic per entry.

Step 3: Connect your AI & agents
Connect ChatGPT, Claude Code, Codex, and the other assistants you use, so the same context is there in each.

What this changes in practice
The first difference is reuse. The reasoning behind a skill is available to other assistants too.
The second is easier maintenance. When a rule changes, you know why it existed.
The third is onboarding. New teammates can read the context, not just the steps.
Best practices for Codex skills
Front-load the description. Put the main use case and trigger words first.
Say when not to use it. Boundaries prevent wrong matches.
Keep instructions over scripts. Add scripts only when you need deterministic behavior.
Use assets for templates. OpenAI lists assets/ for templates and resources.
Make risky workflows explicit-only. Set allow_implicit_invocation to false.
Test prompts against the description. OpenAI recommends it to confirm the right trigger behavior.
Conclusion
A Codex skill is a folder with a SKILL.md file that includes a name and description, plus optional scripts, references, assets, and an agents/openai.yaml file. Codex starts with each skill's name, description, and path, and reads the full instructions when it uses the skill, either because you invoked it with $ or /skills, or because your task matched the description. Where you save the folder, from your home directory to the repository root to a service folder, decides who gets it.
The five examples here cover a personal update, a team release notes workflow, a service-scoped checklist, an explicit-only deploy skill, and a converted custom prompt. Disable skills in config.toml rather than deleting them, keep project-wide rules in AGENTS.md, and use plugins to distribute. Writing down the reasoning behind each skill in your own words keeps that knowledge available wherever you work.