Codex Skills Guide: Build Reusable Workflows Without Prompt Bloat

You saved a reusable workflow, but Codex still answers without using it. How do you write, install and explicitly call a first SKILL.md, then tell discovery problems from tool failures?

Codex Skills Guide: Build Reusable Workflows Without Prompt Bloat

To build a Codex Skill, put a SKILL.md with YAML name and description fields in a skill folder under .agents/skills/. In Codex CLI or the IDE extension, find it with /skills or the $ selector, then invoke it by name with an input. Start with a workflow that produces a small result you can recognize, such as the release-note draft below.

Use a Skill when inputs change but the procedure repeats

A Skill is useful when you repeat the same procedure with different inputs. A release-note workflow always groups changes and returns the same format; the changes themselves differ with each release. A migration-review Skill can similarly store the team’s review procedure and references.

Keep requirements for a one-time task in that task's prompt. Put repository rules that apply across tasks in AGENTS.md, and store a procedure you will reuse in a Skill. OpenAI’s customization overview explains how these instructions work alongside MCP connections and subagents.

Write a complete first SKILL.md

Create a folder named release-note-draft and save the following text as SKILL.md, using that exact filename. This example turns pasted change notes into a draft returned in chat. It needs no scripts, credentials or external services.

---
name: release-note-draft
description: Turn supplied change notes into a short release-note draft. Use when the user asks to draft release notes from pasted notes. Do not use for release planning or publishing.
---

# Release-note draft

1. Read only the change notes supplied in the request.
2. Group the changes under Added, Fixed, and Changed, in that order.
3. Omit empty groups. Use one short bullet per change.
4. Preserve product names and version numbers. Do not invent dates or benefits.
5. Return the draft in chat. Do not edit files, run commands, or publish anything.
6. If no change notes were supplied, ask for them.

The opening and closing --- delimit YAML frontmatter. Both name and description are required. Use release-note-draft consistently as the folder name and the name value. The numbered Markdown instructions belong after the closing delimiter. OpenAI’s Build skills guide documents this format and the supported local locations.

The description tells Codex when to choose the Skill. The body tells it what to do after choosing it. In this example, you can check that the draft uses the specified headings and preserves the supplied facts. Because you paste the input into the request and receive the draft in chat, the Skill needs no filesystem or network access.

Choose a repo or personal location

Use caseSave the file hereWhere it applies
A procedure for this project<repo>/.agents/skills/release-note-draft/SKILL.mdCodex sessions launched in the repository or its subfolders
Your procedure across projects~/.agents/skills/release-note-draft/SKILL.mdYour local Codex work across repositories

Choose one location for this example. For repo skills, Codex scans .agents/skills from the current working directory up to the repository root. A Skill saved in a sibling project is outside that scan. Two installed Skills with the same name are not merged, and both can appear in the selector.

Codex detects skill changes automatically. If the new Skill does not appear, restart Codex and inspect the location and metadata. Older tutorials sometimes show ~/.codex/skills/; the current official authoring instructions specify ~/.agents/skills/ for personal Skills. Use the documented location for this first example.

Find it, call it and inspect the result

  1. Open Codex CLI or the IDE extension in the intended repository.
  2. Run /skills or type $ in the prompt to find release-note-draft. Select it so the request includes the Skill.
  3. Send the following request with the three sample changes.
$release-note-draft
Draft release notes from these changes:
- Added CSV export to the reports page.
- Fixed the Save button on narrow screens.
- Renamed Overview to Dashboard.

In ChatGPT, use @ to select a Skill instead. This walkthrough uses the CLI’s /skills and $ controls.

The expected result for this example is a chat draft with three headings and three corresponding bullets:

## Added
- Added CSV export to the reports page.

## Fixed
- Fixed the Save button on narrow screens.

## Changed
- Renamed Overview to Dashboard.

Wording can vary, but every supplied change should appear once, in the right group, with no added release date or unsupported claim. An input containing only a fix should produce only the Fixed heading. If no notes are supplied, the Skill’s instructions call for a request for the missing notes. These are expected outputs of the sample, not a captured run.

Look for the Skill selection or loading indication in the session, then compare the response with the requested format. Codex can format release notes without a Skill, so the answer's appearance alone cannot confirm that the instructions loaded. If they loaded but the format is wrong, revise the procedure or example; if the Skill never loaded, use the troubleshooting sequence below.

Make automatic selection more reliable

After the explicit call works, try a natural request: “Draft release notes from these changes,” followed by the same notes. Codex can select the Skill when the request matches its description. It initially uses the name and description for discovery, then loads the full instructions when it chooses the Skill. A trigger hidden only deep in the Markdown body is therefore a poor selection cue.

“Helps with releases” could mean planning, versioning, deployment or writing. “Turn supplied change notes into a short release-note draft” identifies the actual input and result. Put the main use case first, then the boundary. A request to plan a release should not select this drafting Skill merely because it contains the word “release.”

If the folder includes agents/openai.yaml, inspect policy.allow_implicit_invocation. The default is true; setting it to false disables automatic invocation while preserving explicit $skill calls. That optional file is unnecessary for the first example. Avoid adding broad, overlapping descriptions across several Skills.

Locate the failure: discovery, selection or execution

What you observeWhat to inspectNext action
The Skill is absent from the selectorThe exact SKILL.md filename, YAML name/description, scan location and any disabled entry in ~/.codex/config.tomlCorrect the file or location. If discovery has not updated, restart Codex. Config changes require a restart.
The Skill is listed, but a natural request does not activate itWhether the request matches the description, neighboring Skills have overlapping descriptions, or implicit invocation is disabledCall it explicitly. If that loads it, refine the description or the intentional invocation policy.
The instructions load, but a script or MCP call failsThe reported command or tool error, referenced file path, required runtime, connection and authorizationFix the failing dependency or input. Changing the description does not repair a missing executable or denied tool call.

For example, a future Skill could load successfully and then fail because its CSV-conversion script references a missing input file. Discovery and selection already worked. Repair that path rather than reinstalling the Skill. The release-note example above has no tool dependency, which keeps the first attempt focused on recognition and instructions.

A Skill supplies a procedure; it retains the session’s sandbox and approval rules. If an extended workflow needs an external tool, the MCP guide covers that connection separately. Tool access and a matching Skill description solve different parts of the workflow.

Add references and scripts when the workflow needs them

The original one-file Skill is enough for the sample. Add a resource when it removes repeated work: a house style reference, a reusable template or a deterministic converter. Keep the core sequence in SKILL.md and explain when each relative path is needed.

release-note-draft/
├── SKILL.md
├── references/
│   └── house-style.md
├── scripts/
│   └── convert-changes.py
└── assets/
    └── release-note-template.md

This is an expanded layout, not an additional installation requirement. If a converter exists, name its input, output and invocation in the instructions. If a reference matters only for customer-facing releases, load it for that case. Avoid forcing every task to read every resource.

OpenAI’s Skill Creator source recommends concise instructions and reusable resources. To use the built-in creator, describe when the Skill should run, what input it receives and what result it should return, then review the generated files. Start by getting the one-file release-note example recognized and explicitly invoked, with an answer that follows its procedure. Add supporting resources as later workflows need them.

Frequently asked questions

What is the smallest usable Codex Skill?

One folder containing SKILL.md, with YAML frontmatter defining name and description, followed by Markdown instructions. Scripts, references, assets and agents/openai.yaml are optional.

Where should I save a first Skill?

Use .agents/skills/release-note-draft/SKILL.md inside the repository for a project workflow, or ~/.agents/skills/release-note-draft/SKILL.md for a personal workflow across repositories.

How do I call a Skill explicitly?

In Codex CLI or the IDE extension, use /skills or type $ to select it, then send $release-note-draft with the input notes. In ChatGPT, use @ to select the Skill.

Why does an installed Skill not run automatically?

Discovery and selection are different stages. If the Skill appears in the selector, try an explicit invocation, then inspect its description and any allow_implicit_invocation policy in agents/openai.yaml.