Skip to content
← Writing

Agent Skills: How to Install and Write SKILL.md for Claude Code, Codex, Cursor and Copilot

Agent Skills is an open SKILL.md format that Claude Code, Codex, Cursor and GitHub Copilot all load. Where skills live, how to install one, and how to write your own.

Thilak//7 min read
Illustration of a coding agent loading a set of Agent Skills, each defined by a SKILL.md file

Agent Skills are folders with a SKILL.md file that teach a coding agent a specific workflow, and they load only when the task needs them. The format is open, so one skill works in Claude Code, Codex, Cursor and GitHub Copilot. Put it in the right folder, or install it with gh skill install or npx skills add, and keep AGENTS.md for facts instead of procedures.

I am Thilak, a solution architect in Chennai, and I spend my days orchestrating coding agents. My AGENTS.md files kept growing into novels. Skills fixed that. Here is the practical version.

Key facts

  • Open format: a skill is a directory with a required SKILL.md (agentskills.io spec).
  • Origin: “originally developed by Anthropic, released as an open standard” (agentskills.io).
  • Four agents, one format: Claude Code, Codex, Cursor and GitHub Copilot all document SKILL.md skills.
  • Shared folder: .agents/skills/ works for Codex, Cursor and Copilot.
  • Startup cost: about 100 tokens per skill for name and description (spec).
  • Two install CLIs: gh skill (preview) and npx skills.

What is an Agent Skill?

A directory with a required SKILL.md: YAML frontmatter on top, Markdown instructions below. Optional scripts/, references/ and assets/ folders hold code, docs and templates (spec).

Skill anatomy: a release-notes folder holds a required SKILL.md plus optional scripts, references and assets folders; SKILL.md has name and description frontmatter followed by numbered instructions

One folder, one SKILL.md. The description is what the agent matches on.

Think of it as a runbook your agent opens only when the job calls for it. Write one when:

  • You keep pasting the same procedure into chat.
  • Your CLAUDE.md or AGENTS.md “has grown into a procedure rather than a fact” (Claude Code docs).

My rule: AGENTS.md holds “this repo uses pnpm”. A skill holds “here is how we cut a release”.

Where does each coding agent look for skills?

Each agent has its own folders, and three of them share .agents/skills/.

Where skills live: Claude Code reads .claude/skills and ~/.claude/skills; Codex reads .agents/skills and ~/.agents/skills; Cursor reads .agents/skills, .cursor/skills and their home equivalents; Copilot reads .agents/skills, .github/skills, .claude/skills, ~/.agents/skills and ~/.copilot/skills

Put a team skill in .agents/skills/ and three agents find it.

Agent Project folder User folder How you use it
Claude Code .claude/skills/ ~/.claude/skills/ Automatically when relevant, or /skill-name
Codex .agents/skills/ (scanned up to repo root) ~/.agents/skills/ When the task matches the description, or /skills and $ to mention one
Cursor .agents/skills/, .cursor/skills/ ~/.agents/skills/, ~/.cursor/skills/ Automatically, or / in Agent chat
GitHub Copilot .github/skills/, .claude/skills/, .agents/skills/ ~/.copilot/skills/, ~/.agents/skills/ In the Copilot app, Copilot CLI, cloud agent, code review and IDE agent mode

Two compatibility notes:

  • Cursor also reads .claude/skills/ and .codex/skills/ plus home equivalents (Cursor docs).
  • Cursor manual-only skills: set disable-model-invocation: true and the skill runs only via /skill-name.

How do I install a skill?

Pick one CLI and run a single command. Both pull a skill straight from a repo.

Install flow: a source repo with skills/name/SKILL.md, installed with gh skill install, npx skills add or a folder copy, lands in a project or user skills folder, and the agent loads it when the description matches the task

Source, install, land, match. Preview and pin before step 2.

With GitHub CLI (manual):

# Peek first
gh skill preview anthropics/skills skill-creator

# Claude Code, for every project on this machine
gh skill install anthropics/skills skill-creator --agent claude-code --scope user

# Codex, Cursor or Copilot, this project only
gh skill install anthropics/skills skill-creator --agent codex
  • Syntax: gh skill install <repository> [<skill[@version]>].
  • Defaults: project scope; github-copilot when run non-interactively. Use --agent for anything else.
  • Agents: --agent accepts about 50 values, including claude-code, codex, cursor, github-copilot and gemini-cli.
  • No version? Latest tagged release, else default branch HEAD. A version can be a tag or commit SHA.
  • Shared install: Copilot, Cursor and Codex share .agents/skills, so a skill is installed there only once.
  • Preview warning: gh skill is “in preview and subject to change without notice” (manual).

With the skills CLI (vercel-labs/skills):

npx skills add vercel-labs/agent-skills --skill web-design-guidelines -a claude-code
  • Flags: -s, --skill, -a, --agent, -g, --global for the user folder (commands).
  • Reach: supports “OpenCode, Claude Code, Codex, Cursor, and 75 more”.

Agent-native options:

  • Claude Code plugin: /plugin marketplace add anthropics/skills (anthropics/skills).
  • Codex: the built-in $skill-installer installs skills from repos (Codex docs).
  • Any agent: copy the folder into the agent’s skills directory.

Where do I find good skills?

Start with repos maintained by the people who build the tool or framework.

Source What is in it
anthropics/skills Document skills (docx, pdf, pptx, xlsx, Apache 2.0), skill-creator, mcp-builder, frontend-design, webapp-testing, a template
vercel-labs/agent-skills react-best-practices, web-design-guidelines, composition-patterns, react-native-skills, deploy-to-vercel
openai/skills Deprecated; the README points to openai/plugins for current Codex examples
github/awesome-copilot Skill repo used in the gh skill manual example (documentation-writer)
Microsoft Agent Framework agent-framework-builder-python and -dotnet: framework guidance for your coding agent

The framework example teaches a useful distinction:

  • Dev-time skill: helps your coding agent write code. The Agent Framework docs say it “doesn’t run inside your Agent Framework application”.
  • Runtime skill: loaded by the agent app you ship.
  • No guarantees: the same docs say the skill “doesn’t guarantee that generated code is production-ready”.

How does progressive disclosure keep context cheap?

Skills load in three stages, so twenty installed skills do not mean twenty manuals in your context window (spec).

Progressive disclosure: names and descriptions of every skill at startup, about 100 tokens each; the full SKILL.md body when a task matches, under 5,000 tokens recommended; scripts, references and assets only when a step needs them

Startup, activation, on demand. Unused skills cost one short description.

  1. Startup: name and description, about 100 tokens per skill.
  2. Activation: the full SKILL.md body, under 5,000 tokens recommended.
  3. On demand: files in scripts/, references/ and assets/.

Claude Code docs put it plainly: “a skill’s body loads only when it’s used”. That is why skills beat a bloated AGENTS.md.

How do I write my own SKILL.md?

Create a folder, add SKILL.md with two required fields, and keep the body short (spec):

.agents/skills/release-notes/
├── SKILL.md
├── scripts/
│   └── collect-commits.sh
└── references/
    └── style-guide.md
---
name: release-notes
description: Drafts release notes from merged PRs since the last tag. Use when the user asks for a changelog, release notes, or a version summary.
---

# Release notes

1. Run `scripts/collect-commits.sh` to list merged PRs since the last tag.
2. Group changes into Features, Fixes and Chores.
3. Follow `references/style-guide.md` for tone and formatting.
4. Show the draft for review. Never publish it.

Rules from the spec:

  • name: max 64 characters; lowercase letters, numbers and hyphens; no leading, trailing or double hyphens; must match the folder name.
  • description: max 1024 characters. Say what it does and when to use it.
  • Optional fields: license, compatibility (max 500 characters), metadata, and the experimental allowed-tools.
  • Size: keep SKILL.md under 500 lines; move detail into references/.
  • Validate: skills-ref validate ./release-notes.

Want Claude Code to find it too? Put it in .claude/skills/ instead: Cursor and Copilot read that folder as well. Or start from the template in anthropics/skills.

Skill, AGENTS.md or MCP server?

Each holds a different kind of knowledge. My split:

  • AGENTS.md / CLAUDE.md: facts that are always true in this repo.
  • Skill: a procedure, loaded only for the task that needs it.
  • MCP server: live data or an API the agent calls, such as current docs.

What should I check before I trust a skill?

Treat a skill like a dependency: it steers code that lands in your repo.

  • Preview it first (gh skill preview <repo> <skill>) and read SKILL.md.
  • Read every file in scripts/ before an agent runs it.
  • Pin a tag or commit SHA for reproducible installs.
  • Pick the right scope: project for team skills, user for personal ones.
  • Prefer .agents/skills/ for team skills shared across agents.
  • Review the agent’s plan, packages, commands and file changes.
  • Remember gh skill is in preview and may change.

The takeaway

Skills are how I stopped stuffing procedures into AGENTS.md. One open format, four agents, one shared folder. Install the skills maintained by the people who build your tools, write small ones for your own workflows, and let progressive disclosure keep context lean.

Start today: install one skill, ask your agent to use it on a real task, and review what it hands back. That review step is still your job.

Frequently asked questions

What is an Agent Skill?

An Agent Skill is a directory that contains a required SKILL.md file with YAML frontmatter and Markdown instructions, plus optional scripts/, references/ and assets/ folders. Agent Skills is an open format documented at agentskills.io, originally developed by Anthropic and released as an open standard.

Which coding agents support the Agent Skills format?

Claude Code, OpenAI Codex, Cursor and GitHub Copilot all document support for SKILL.md-based Agent Skills. Each agent reads skills from its own folders, and Codex, Cursor and GitHub Copilot all read the shared .agents/skills folder.

Where do I put an Agent Skill so every coding agent finds it?

Put the skill in .agents/skills/<skill-name>/ for Codex, Cursor and GitHub Copilot. Claude Code reads .claude/skills/<skill-name>/, which Cursor and GitHub Copilot also read. For user-wide skills, Codex, Cursor and Copilot read ~/.agents/skills/ and Claude Code reads ~/.claude/skills/.

How do I install an Agent Skill from a GitHub repository?

Run gh skill install <repository> <skill> with the preview gh skill command in GitHub CLI, adding --agent to pick the coding agent and --scope user for a user-wide install. Alternatively, run npx skills add <repository> --skill <skill> -a <agent> with the open source skills CLI from Vercel Labs.

How does progressive disclosure keep Agent Skills cheap on context?

The Agent Skills specification loads skills in three stages: about 100 tokens of name and description per skill at startup, the full SKILL.md body only when the skill activates (under 5,000 tokens recommended), and scripts or reference files only when needed. Unused skills cost almost nothing.

When should I use an Agent Skill instead of AGENTS.md or CLAUDE.md?

Claude Code documentation recommends a skill when a section of CLAUDE.md has grown into a procedure rather than a fact. AGENTS.md and CLAUDE.md suit always-true project facts, while skills suit task-specific workflows that load only when relevant.

Is it safe to install third-party Agent Skills?

Treat a third-party Agent Skill like a code dependency. Preview the SKILL.md, read every file in scripts/ before an agent runs it, pin a version where one exists, and review the code changes the coding agent makes with the skill.

GET /blog/coding-agent-skills-how-to.md · text/markdown
Raw ↗llms.txt ↗
Loading markdown…

This is what AI agents read. Every page on WebTK Dev Studio has a markdown twin: append .md to any URL, sendAccept: text/markdown, or start from /llms.txt.