AI Skills: A Beginner’s Guide to Claude and Codex
A plain-language walkthrough of what an AI Skill actually is, the exact settings Claude and OpenAI’s Codex CLI each expect, and two live examples you can build in the next five minutes.
The one file every skill needs. Plain instructions the AI reads before it does the job.
A small settings block at the top of that file. It tells the AI the skill’s name and purpose.
The single field that decides whether the AI finds and uses your skill on its own.
What Is an AI Skill?
If you have used Claude Code or Codex CLI for a while, you have probably typed the same instructions more than once: “when you write a commit message, keep it under 70 characters”, or “always check for existing duplicates before creating a new file”. A Skill is simply that repeated instruction, written down once and saved, so you never have to type it again.
Think of a Skill as a laminated cheat sheet you hand a new colleague on their first day. You would not hand them your entire company handbook every time they start a task. You would hand them the one-page sheet for the job in front of them, and only when that job comes up. That is exactly how a Skill behaves: it sits quietly on your computer until a task matches it, and only then does the AI pick it up and read it.
--- lines. Everything below it is the actual instructions.
Both Claude Code and Codex CLI build Skills the same way underneath: a folder, a required SKILL.md file inside it, and optional extra files the AI only opens if it needs them. The differences are in exactly which settings are required and where the folder needs to live, which is what the rest of this post walks through.
Why Bother Making One?
You do not need to be a programmer to benefit from a Skill. If you find yourself explaining the same thing to your AI assistant in more than one conversation, that is the signal to turn it into a Skill instead. Three common newbie-friendly reasons to make one:
You stop repeating yourself. Once a Skill exists, you never retype the instructions again; the AI reads them from disk every time they are needed. You get consistency. A written-down Skill behaves the same way today as it will next month, instead of depending on how you happened to phrase the request. And you can share it. A Skill is just a folder of text files, so you can hand it to a teammate, or commit it into a project, and everyone gets the same behaviour.
Building a Skill for Claude
Claude Code Skills live in a folder named after the skill, containing a SKILL.md file. Personal skills that work in every project go in ~/.claude/skills/; skills that belong to one specific project go in that project’s .claude/skills/ folder.
Every field in the frontmatter is technically optional except that description is strongly recommended, since it is what the AI reads to decide when to use the skill. Here are the settings a beginner actually needs to know about:
| Setting | Required? | What It Does |
|---|---|---|
name |
No | A short label. If you skip it, the folder name is used instead. |
description |
Recommended | Tells Claude what the skill does and exactly when to reach for it. Get this one right and Claude finds the skill on its own. |
disable-model-invocation |
No | Set to true if you want to be the only one who can run it. Good for anything you never want triggered by accident. |
allowed-tools |
No | A list of tools Claude can use without asking your permission first, only while this skill is active. |
arguments |
No | Lets you pass extra information when you run the skill, like a filename or a topic. |
model |
No | Forces this skill to use a specific Claude model, even if you are chatting with a different one. |
A handful of more advanced settings exist too, for running a skill in an isolated sub-task, limiting it to certain file types, or adjusting how much reasoning effort it uses. The six above cover nearly everything a first skill needs.
Here is a complete, working example. It is a skill called explain-this: paste an error message, and it explains what the error means in plain English and suggests one concrete first step.
# Step 1 — create the skill's folder (a personal skill, usable in any project)
mkdir -p ~/.claude/skills/explain-this
# Step 2 — save this as ~/.claude/skills/explain-this/SKILL.md
---
name: explain-this
description: Explain a pasted error message, exception, or log line in plain English and suggest one concrete first troubleshooting step. Use whenever the user pastes an error and asks what it means.
---
## Instructions
1. Read the pasted error text carefully.
2. Explain what it means in one or two plain-English sentences, avoiding jargon.
3. Suggest exactly one first thing to check or try — not a long list.
4. If the error text is incomplete, say what extra detail would help.
To try it, open Claude Code anywhere and either paste an error message directly, or type /explain-this followed by the error text. Both should trigger the same skill: the first because the pasted text matches the description, the second because you called it by name.
Building the Same Skill for Codex
Codex CLI Skills use the same core idea, laid out slightly differently. A skill folder lives under .agents/skills/, either inside your repository (so it is scoped to that project) or under ~/.agents/skills/ for a personal skill that works everywhere.
The important difference from Claude: Codex requires both name and description in the frontmatter. Skip either one and Codex will not load the skill at all.
| Setting | Required? | What It Does |
|---|---|---|
name |
Yes | The skill’s short internal name. |
description |
Yes | Same idea as Claude: this is how Codex decides when to use the skill. Be specific about when it should, and should not, trigger. |
interface.display_name |
No | Set inside an optional agents/openai.yaml file. A friendlier name shown in menus instead of the raw folder name. |
policy.allow_implicit_invocation |
No | Also in agents/openai.yaml. Set to false if the skill should only run when you type its name, never automatically. |
dependencies.tools |
No | Lists any external tools or integrations the skill needs to work. |
Here is the same explain-this skill, rebuilt for Codex:
# Step 1 — create the skill's folder inside your repository
mkdir -p .agents/skills/explain-this
# Step 2 — save this as .agents/skills/explain-this/SKILL.md
---
name: explain-this
description: Explain a pasted error message, exception, or log line in plain English and suggest one concrete first troubleshooting step. Use whenever the user pastes an error and asks what it means. Do not use for general coding questions unrelated to an error.
---
## Instructions
1. Read the pasted error text carefully.
2. Explain what it means in one or two plain-English sentences, avoiding jargon.
3. Suggest exactly one first thing to check or try — not a long list.
4. If the error text is incomplete, say what extra detail would help.
To try it, run Codex CLI in that repository and either type $explain-this followed by an error, or use the /skills menu to run it by name. Paste an unfamiliar error and see whether it triggers automatically first.
Claude vs Codex: Quick Reference
| Field | Claude Code | Codex CLI |
|---|---|---|
| Folder location | .claude/skills/<name>/ (project) or ~/.claude/skills/<name>/ (personal) |
.agents/skills/<name>/ (repo) or ~/.agents/skills/ (personal) |
| Required frontmatter | None strictly required, but description is strongly recommended |
name and description are both required |
| Run it by name | /skill-name |
/skills menu or $skill-name |
| Automatic triggering | Claude matches your request against the description | Codex does the same, unless disabled in openai.yaml |
| Extra config file | Not needed — frontmatter covers everything | Optional agents/openai.yaml for a friendlier menu name and tool dependencies |
| Manual-only switch | disable-model-invocation: true |
policy.allow_implicit_invocation: false |
Common Beginner Mistakes
| Mistake | Why It Happens | Fix |
|---|---|---|
| Vague description (“helps with stuff”) | The AI has nothing concrete to match your request against. | Write it like a job posting: what the skill does, plus exactly when to use it. |
| Skill never triggers by itself | The description does not include the words a user would actually type. | Add the phrases people naturally say, not just a formal summary. |
| Wrong command name (Claude) | Claude Code uses the folder name as the typed command by default. | Name the folder exactly what you want to type after /. |
| Skill will not load at all (Codex) | Codex requires both name and description. Missing either one stops the skill from loading. |
Always include both fields, even in a quick test skill. |
| One giant SKILL.md file | Long files cost tokens every time the skill loads, even for details it rarely needs. | Move detailed reference material into separate files and link to them from SKILL.md. |
Final Thoughts
Skills are one of the easiest ways to get more consistent, more useful behaviour out of an AI coding assistant, and neither platform requires you to be a professional developer to build one. Start small: pick one instruction you find yourself repeating, write it down as a Skill following the tables above, and see whether the AI picks it up on its own.
The two platforms will keep evolving their exact settings over time, so when in doubt, treat the tables above as a starting point and check the current documentation before relying on a field for something important.
SKILL.md file inside it. Get the description right, and both Claude and Codex will figure out the rest.
Next, we could look at MCP servers, the other major way to extend an AI assistant, this time by connecting it to live external tools and data instead of packaged instructions.