
On this page
Every AI coding agent starts with a rules file: CLAUDE.md or AGENTS.md. It works until the file grows. Add your SEO checklist, your accessibility rules, your migration steps and your deploy process, and the agent reads all of it on every task, including the ones that have nothing to do with SEO.
Agent Skills fix that. A skill is a folder with a SKILL.md file that the agent loads only when a task needs it. Anthropic published the format as an open standard, and Claude Code, OpenAI Codex, Cursor and Google Antigravity all support it, so one skill works across all four tools.
What a skill looks like
seo-audit/
├── SKILL.md # required: frontmatter + instructions
├── references/ # optional: longer docs the skill points to
│ └── checklist.md
└── scripts/ # optional: scripts the agent can run
└── check-meta.mjs---
name: seo-audit
description: Audit a page's title, meta description, headings, canonical URL and JSON-LD. Use when the user asks to check or improve SEO for a page or route.
---
# SEO audit
1. Read the page's metadata export and the rendered <head>.
2. Check: title ≤ 60 characters, description ≤ 160, one h1, canonical set.
3. Validate JSON-LD with scripts/check-meta.mjs.
4. Report problems as a table: issue, file, fix.
For the full checklist, read references/checklist.md.Two frontmatter fields do the work. name is the skill's ID (lowercase, hyphens) and usually matches the folder name. description is the most important line in the file: the agent sees only the name and description of every skill until a task matches, so the description has to say what the skill does and when to use it.
Why skills beat one big rules file
- They save context. The agent reads the full skill only when it's relevant (the docs call this progressive disclosure). Twenty skills cost you twenty one-line descriptions, not twenty documents.
- They make output repeatable. A skill turns "audit SEO" from whatever the model feels like today into the same steps and the same report every time.
- They can bring scripts. A skill can include scripts and reference files, so the agent runs a tested check instead of improvising one.
- They're shareable. A skill is a folder in Git. Commit it and the whole team, and every agent they use, gets it.
- They're portable. The same
SKILL.mdworks in Claude Code, Codex, Cursor and Antigravity.
Where each tool loads skills from
| Tool | Project skills | Personal skills | Run a skill by hand |
|---|---|---|---|
| Claude Code | .claude/skills/<name>/ | ~/.claude/skills/ | /skill-name |
| Codex CLI | .agents/skills/<name>/ | ~/.agents/skills/ | $skill-name or /skills |
| Cursor | .cursor/skills/ or .agents/skills/ (also reads .claude/skills/) | ~/.cursor/skills/ | /skill-name |
| Antigravity | .agents/skills/<name>/ | ~/.gemini/config/skills/ | /skill-name |
All four tools also pick skills on their own: when your request matches a skill's description, the agent loads it without being asked. Each tool has a switch to turn that off for skills you only want to run by hand (in Claude Code it's disable-model-invocation: true in the frontmatter).
Write your first skill: a MERN API endpoint
A good first skill is a task you repeat and always explain the same way. For a MERN or NestJS backend, adding an endpoint is a classic. Create .claude/skills/add-api-endpoint/SKILL.md (or the same under .agents/skills/):
---
name: add-api-endpoint
description: Add a REST endpoint to the Express API with validation, auth and a test. Use when the user asks for a new route, endpoint or API for a resource.
---
# Add an API endpoint
Follow the existing pattern in src/modules/<resource>/.
1. Route: add it to <resource>.routes.ts. Protect it with requireAuth unless the user says it is public.
2. Validation: define a zod schema for body, params and query. Reject unknown fields.
3. Controller: thin. Call the service, map errors to HTTP codes (400 validation, 404 not found, 409 conflict).
4. Service: all database access lives here, never in the controller.
5. Test: add a supertest case for the success path and one failure path.
6. Run npm test and npm run lint before you finish. Report the new route and the tests you added.Now "add an endpoint to cancel an order" produces the same structure every time: validated input, auth, a thin controller and a test. Without the skill you'd repeat those six lines in every prompt, or forget one.
- Keep
SKILL.mdshort. Anthropic's docs suggest staying under 500 lines and moving detail into reference files the skill links to. - One task per skill. "Backend stuff" is too broad to trigger reliably; "add an API endpoint" is not.
- Write the description for matching. Include the words people actually type: "route", "endpoint", "API".
- Let the agent write the first draft. Claude Code, Codex (
$skill-creator) and Cursor (/create-skill) can all generate a skill from a description; then edit it.
Skills vs subagents vs MCP
| Feature | Skill | Subagent | MCP server |
|---|---|---|---|
| What it is | Instructions (+ optional scripts) for one task | A separate agent with its own context and tool limits | A connection to an outside system |
| Use it for | "How we do X here" | Work you want isolated: a review, a big search, a security audit | Data and actions outside the repo: database, Stripe, GitHub, browser |
| Example | add-api-endpoint | code-reviewer with read-only tools | Supabase MCP to list tables and run SQL on a dev project |
They combine well. A security-audit subagent can be told to use an owasp-checklist skill, and a skill can tell the agent which MCP tool to call. In Claude Code a subagent is a Markdown file in .claude/agents/ with name, description, tools and model in its frontmatter; Cursor reads the same files.
The GitHub repos worth knowing
You don't have to write every skill yourself. These are the collections developers share most. Read a skill before installing it: it's instructions your agent will follow, and scripts it may run.
| Repo | What's in it |
|---|---|
| anthropics/skills (opens in a new tab) | Anthropic's official skills: documents (Word, PDF, Excel, PowerPoint), design, and a skill for building MCP servers |
| hesreallyhim/awesome-claude-code (opens in a new tab) | The best-known list of Claude Code resources: skills, hooks, slash commands, workflows |
| VoltAgent/awesome-agent-skills (opens in a new tab) | Skills collected for many agents, not only Claude |
| VoltAgent/awesome-claude-code-subagents (opens in a new tab) | Ready-made subagents by role: reviewers, language experts, DevOps |
| travisvn/awesome-claude-skills (opens in a new tab) | A curated list of Claude skills and tools |
| modelcontextprotocol/servers (opens in a new tab) | Reference MCP servers and a list of official ones from companies |
To install a skill from a repo, copy its folder into your skills directory. Codex has $skill-installer, Antigravity installs plugin bundles with agy plugin install <github-url>, and Claude Code installs plugins (which can contain skills) with /plugin.
Skills on a real project
This website has 27 skills in .claude/skills/: performance and Core Web Vitals, accessibility, SEO and JSON-LD, copywriting, Tailwind and Next.js patterns. When I asked Claude Code to add structured data to the blog, the schema skill loaded and kept FAQ markup out (Google no longer shows FAQ rich results). When it wrote this post, the copywriting skill's rules applied. The full setup is in How I use Claude Code on a real project, and the tool-by-tool comparison is in Claude Code vs Codex vs Cursor vs Antigravity.
Frequently asked questions
What is a SKILL.md file?
It's the required file in an Agent Skill: YAML frontmatter with a name and a description, followed by Markdown instructions. The agent reads the description to decide when to load the skill, then follows the instructions.
What's the difference between CLAUDE.md and a skill?
CLAUDE.md (or AGENTS.md) is loaded on every task, so it should hold facts that are always true: stack, commands, conventions. A skill is loaded only when a task matches its description, so it's the place for longer, task-specific instructions.
Do Agent Skills work in Cursor and Codex?
Yes. Codex reads .agents/skills, Cursor reads .cursor/skills and .agents/skills (and .claude/skills for compatibility), and Google Antigravity reads .agents/skills.
Are skills from GitHub safe to install?
Treat them like code. A skill is instructions your agent will follow and may include scripts it runs, so read SKILL.md and any scripts before you install it.
- Agent Skills
- Claude Code
- Codex
- Cursor
- Antigravity
- Subagents
Keep reading

AI Coding Tools8 min read
Claude Code vs Codex vs Cursor vs Antigravity: Skills, Subagents and MCP Compared (2026)
The four big AI coding agents now share the same building blocks: a rules file, Agent Skills, subagents, hooks and MCP servers. Here is how each one installs, where it keeps its config, and which one fits which job.

AI Coding Tools6 min read
How I Use Claude Code on a Real Next.js Project: AGENTS.md, 27 Skills and 10 Subagents
The actual Claude Code setup behind this website: what goes in AGENTS.md, which skills and subagents are installed and why, how a feature goes from plan to Lighthouse check, and the guardrails I'd add next.
