ProfessorGPTProfessorGPT
Guide

Agent Skills and SKILL.md: How to Create a Skill for Any AI Agent

Agent skills are an open way to give any AI agent reusable know-how through a single SKILL.md file. This guide covers the format, how agents load it, how to write one skill that works in Claude, Codex, and Gemini, and how to keep it safe.

6 min read Updated Oct 15, 2026 Beginner
§1The standard

What are Agent Skills? (the open standard)

Agent Skills are reusable capabilities you give an AI agent as a small folder containing a SKILL.md file. The agent reads each skill's name and description up front and loads the full instructions only when a task matches — so one agent can carry many skills without bloating its context.

It's an open standard, not one vendor's feature. Anthropic originally developed the format and released it as an open standard on December 18, 2025; today the same SKILL.md runs in Claude Code, OpenAI Codex, Gemini CLI and Antigravity, GitHub Copilot, VS Code, Cursor, and dozens of other agents.

Fig. 1 — The anatomy every compatible agent agrees on: one required file, three optional folders.
§2The file

Anatomy of a SKILL.md file

A SKILL.md starts with YAML frontmatter between --- lines, followed by a Markdown body with the instructions. The open standard defines these frontmatter fields:

FieldRequired?Rules
nameYes1–64 characters: lowercase letters, numbers, and hyphens; no leading, trailing, or double hyphens; matches the folder name
descriptionYes1–1,024 characters: what the skill does and when to use it, with the keywords a user would type
licenseNoA license name or a bundled license file
compatibilityNoUp to 500 characters on what the skill needs, such as tools or network access
metadataNoFree-form key–value pairs, like author or version
allowed-toolsNoExperimental: tools the skill may use without asking. A pre-approval, not a restriction

Individual agents add their own extras on top — Claude Code can make a skill manual-only, and Codex reads an optional agents/openai.yaml for display names and invocation policy. Agents ignore fields they don't use, so the core stays portable.

The body has no required format, but the standard recommends step-by-step instructions, examples of inputs and outputs, and common edge cases — kept under about 500 lines, with longer material moved into references/.

§3How it loads

How progressive disclosure works

Skills stay cheap because the agent reveals them to itself in three stages: discovery, activation, execution.

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: only the name and description are always loaded. Token figures are the open standard's guidance.

At startup the agent loads only names and descriptions. When your request matches one, it reads that skill's full SKILL.md. Bundled scripts and references are opened only if the instructions need them. Each agent also caps how much context the skill list may use — Claude Code budgets about 1% of the context window for it, Codex about 2% — so short, specific descriptions matter more as your library grows.

§4Hands on — 4 steps

How to create a SKILL.md file (tool-agnostic)

These steps work in any compatible agent; only the folder in step 1 changes per tool.

1. Create a folder named after the skill

Use lowercase letters and hyphens, for example pr-review/, inside your agent's skills folder (see the table in the next section).

2. Write the frontmatter

Add SKILL.md with a name identical to the folder and a description that answers two questions: what does it do, and when should the agent use it?

3. Write the instructions

Below the frontmatter, write short imperative steps. Say what to check first, what the output should look like, and what to avoid. Here's a complete, portable example:

SKILL.md
---
name: pr-review
description: Reviews a pull request for bugs, security issues, and style. Use when the user asks to review code, a diff, or a PR.
---

# PR review

1. Read the full diff before commenting.
2. Flag correctness bugs first, then security, then style.
3. Give concrete feedback with file:line references.
4. End with approve or request-changes and a one-line summary.

4. Test the trigger

Ask for the job the way you normally would — "review this PR" — and check that the agent picks the skill. If it doesn't, the description is almost always the thing to fix.

§5Portability

One SKILL.md across Claude, Codex, and Gemini / Antigravity

The file is identical everywhere; only the install folder differs.

SKILL.mdone file
  • Claude Code~/.claude/skills/<name>/
  • Codex~/.agents/skills/<name>/
  • Gemini CLI~/.gemini/skills/<name>/

…and other agents that read the open standard, such as GitHub Copilot, Cursor, and VS Code.

Fig. 3 — Write once, run anywhere: copy the same folder into each agent's skills directory.
AgentPersonal folderProject folder
Claude Code~/.claude/skills/<name>/.claude/skills/<name>/
OpenAI Codex~/.agents/skills/<name>/.agents/skills/<name>/
Gemini CLI~/.gemini/skills/<name>/.gemini/skills/ or .agents/skills/
Antigravity CLI~/.gemini/antigravity-cli/skills/<name>/.agents/skills/<name>/

One folder for three agents

A repo's .agents/skills/ folder is read by Codex, Gemini CLI, and Antigravity. Keep your team's skills there, and copy them into .claude/skills/ for Claude Code.

§6Look-alikes

SKILL.md is not an Azure AI Search skillset or a Gemini Gem

Two frequent mix-ups:

  • Azure AI Search "skillsets" are enrichment pipelines for search indexing — unrelated to agent SKILL.md files.
  • Gemini "Gems" are no-code custom chatbots at gemini.google.com, not SKILL.md files. Google is converting Gems into skills in the Gemini app from November 2026, and the app can already import a SKILL.md on the web and the Mac app.

If you're here to build an agent capability as a file, agent skills / SKILL.md is what you want.

§7Trust

Are agent skills safe?

A skill is instructions your agent follows with the access it already has — so it's exactly as safe as the file you install. Read the whole SKILL.md, open every bundled script, and prefer sources you can verify. The full checklist is in are agent skills safe?

Install skills like you install software

A SKILL.md from an unknown source can tell your agent to run commands or send data somewhere. Treat each install — and each update — as code you're about to run.

§8By tool

Create your skill by tool

Pick your agent for a step-by-step guide:

Or get the fundamentals in what are agent skills, compare the always-on files in SKILL.md vs CLAUDE.md vs AGENTS.md, and grab a SKILL.md template.

§9Your turn

Build your first agent skill now

Skip the boilerplate with the free Skill Builder, or browse ready-made skills to install one in seconds.

A skill that works everywhere

  • Folder and name match: lowercase letters, numbers, hyphens
  • description says what and when, in a user's words
  • Instructions are short, concrete steps; body under ~500 lines
  • Long material lives in references/, code in scripts/
  • Tested in each agent you plan to use

Frequently asked questions

What is the SKILL.md format?+
SKILL.md is the open file format for an agent skill: YAML frontmatter (a required name and description, plus optional license, compatibility, metadata, and allowed-tools) followed by Markdown instructions.
Do agent skills work on more than one AI model?+
Yes. Skills belong to the agent, not the model: the same SKILL.md runs in Claude Code, OpenAI Codex, Gemini CLI, Antigravity, GitHub Copilot, Cursor, and many more agents. The only difference is where each tool looks for skills.
Who maintains the Agent Skills standard?+
Anthropic originally developed the format and released it as an open standard on December 18, 2025. The specification is maintained in the open at agentskills.io and accepts contributions from the wider ecosystem.
Is a SKILL.md the same as an Azure skillset or a Gemini Gem?+
No. An Azure AI Search skillset is a search-indexing pipeline, and a Gemini Gem is a no-code chatbot. Google is converting Gems into skills in the Gemini app from November 2026, and the app can import SKILL.md files.
How do I create a SKILL.md file?+
Make a folder, add a SKILL.md with a name and description in the frontmatter, then write the instructions. Or generate one instantly with the free Skill Builder.
Are agent skills safe?+
As safe as the file you install: a skill is instructions your agent follows with its existing access. Read the whole SKILL.md and any bundled scripts before installing, and prefer sources you can verify.

Build your skill now

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