A skill is a folder with a SKILL.md file in it. The file has YAML frontmatter with a name and a description, then Markdown instructions. Claude Code, Codex and Cursor all read the same format, because all three follow the Agent Skills specification. What differs is the folder each one scans and how you call the skill by hand.
This guide builds one small skill, checks it, and then covers each agent in turn.
Write the SKILL.md
Pick a job you keep explaining to the agent. The example here drafts release notes from merged pull requests. Make a folder named after the skill and put this in release-notes/SKILL.md:
---
name: release-notes
description: Drafts release notes from the merged pull requests since the last Git tag. Use when the user asks for release notes, a changelog entry or a summary of what shipped since the last release.
---
# Release notes
## Steps
1. Find the last tag with `git describe --tags --abbrev=0`.
2. List the merge commits since that tag with `git log <tag>..HEAD --merges --oneline`.
3. Group the changes under Added, Changed and Fixed. Skip dependency bumps unless they change behaviour.
4. Write one line per change in the past tense, and end it with the PR number.
5. Show the draft and ask before writing it to CHANGELOG.md.
## Example
Input: three merged PRs since `v1.4.0`.
## 1.5.0
### Added
- Export to CSV from the reports page (#212)
### Fixed
- Dates in the weekly email used the server time zone (#215)
## Edge cases
- No tags yet: use the first commit and say so in the draft.
- No merges since the tag: list the plain commits instead.Three things in that file do most of the work.
The name matches the folder. The spec says the name "May only contain unicode lowercase alphanumeric characters (a-z, 0-9) and hyphens (-)" and "Must match the parent directory name". Cursor's docs say the same. A mismatch fails the name matches its folder check.
The description says what and when. Agents read only the name and description at startup and load the rest when a request matches. The spec asks for a description that will "describe both what the skill does and when to use it". Ending with "Use when..." and the words people actually type is the simplest way to get there. How to write a SKILL.md that triggers goes through the description rules one by one.
The body has steps, an example and edge cases. Those are the three sections the spec recommends. Keep SKILL.md under 500 lines and move long reference material into separate files that the body links to.
Check it before you use it
Paste the file into /validate or drop the whole folder there. It runs in your browser and nothing is uploaded. From a terminal, the same rules run with one command:
npx -p @skillland/validator skillland check ./release-notesThe example above scores 100. Here is what the CLI prints for a weaker version whose description is only Helps with release notes.:
**Score:** 76/100 (grade C)
## Warnings
- **No "Use when" in the description** (warning, line 3). ...
- **Vague wording in the description: "Helps with"** (warning, line 3). ...
- **Description is too short (25 characters)** (warning, line 3). ...Each line links to its rule page, which quotes the official doc the rule comes from. Add --min-score 90 to make the command exit with code 1 below 90, which is enough to gate a pull request in CI.
A good score means the file is well formed and easy to match. It does not tell you whether the steps are right, so the next part is a real test in each agent.
Claude Code
Claude Code reads personal skills from ~/.claude/skills/<skill-name>/SKILL.md and project skills from .claude/skills/<skill-name>/SKILL.md. Commit the project folder and everyone who works in the repository gets the skill (Claude Code skills docs).
To test it, start claude in a project and ask something that matches the description, such as "write release notes for this release". You can also call it directly:
/release-notesIf it doesn't trigger, the docs suggest checking that the description "includes keywords users would naturally say" and that the skill shows up when you ask What skills are available?. A frontmatter block that doesn't parse still loads, but with no description to match against; run claude --debug to see the parse error.
Claude Code adds fields the spec doesn't have. The one most skills need is disable-model-invocation: true, which stops Claude from running a skill on its own. Use it for anything with side effects, like a deploy or a message to Slack. Writing CHANGELOG.md without asking is a side effect too, which is why step 5 above asks first.
Codex
Codex scans .agents/skills in every directory from where you started it up to the repository root, plus $HOME/.agents/skills for your own skills (OpenAI: build skills). Copy the folder to .agents/skills/release-notes/.
Codex ships a built-in creator. Run $skill-creator and it asks "what the skill does, when it should trigger, and whether it should stay instruction-only or include scripts". It's a good way to draft a first version, which you can then check with the validator.
To call a skill by hand, run /skills or type $ and pick it. To stop Codex from choosing it on its own, add agents/openai.yaml to the skill folder:
policy:
allow_implicit_invocation: falseCodex picks up edits on its own. The docs say to restart it if an update doesn't appear.
Cursor
Cursor loads skills from .agents/skills/ and .cursor/skills/ in the project, and ~/.agents/skills/ and ~/.cursor/skills/ for your user (Cursor: Agent Skills). It also reads .claude/skills/ and .codex/skills/, so a skill you wrote for Claude Code works in Cursor without moving it.
Type / in Agent chat and search for the skill name to run it by hand. Cursor's own creator is /create-skill. The frontmatter field that turns off automatic use is the same one Claude Code uses: disable-model-invocation: true.
Cursor also has paths, a list of glob patterns that limits the skill to matching files. Older skills may use globs instead; Cursor still accepts it but says new skills should use paths, and the validator flags it as legacy globs.
One folder for all three
Since Codex and Cursor both read .agents/skills/, and Cursor and Claude Code both read .claude/skills/, a repository can serve all three agents from one copy. Keep the skill in .agents/skills/release-notes/ and add a symlink at .claude/skills/release-notes. Claude Code's docs say a skill folder "can be a symlink to a directory elsewhere on disk", and the Codex docs say Codex "follows the symlink target".
Then check the one copy:
npx -p @skillland/validator skillland check .agents/skillsThe CLI finds every SKILL.md below the folder you give it, so the same command covers a whole skills directory.