# Agent Skills vs AGENTS.md: what is the difference?

> AGENTS.md is always-on project guidance. Agent Skills are instructions an agent loads only when needed. How each works, when to use which, and a validator.

Source: https://devaiper.com/blog/agent-skills-vs-agents-md
Published: 2026-10-30
Topics: Agents, Agent Skills, AGENTS.md, Open standards, TypeScript

**Short answer:** AGENTS.md is a plain markdown file of project instructions that coding agents read every time they work in your repo. An Agent Skill is a folder with a SKILL.md (a name, a description and instructions, plus optional scripts) that an agent loads only when a task needs it. Use AGENTS.md for what is always true, skills for what is sometimes needed, and MCP for live tools and data.

On 22 October 2026, **Agent Skills** moved to the Agentic AI Foundation under the Linux Foundation, the same neutral home that already looks after **AGENTS.md** and MCP. So three open standards now sit side by side, and every coding agent you use is likely to read at least two of them. They are easy to mix up. This post explains what each one is for, with examples, and gives you a small TypeScript validator for skills.

## The short version

| | AGENTS.md | Agent Skills | MCP |
|---|---|---|---|
| **What it is** | One markdown file | A folder with SKILL.md | A server |
| **Holds** | Project instructions | How to do one kind of task | Tools and live data |
| **Loaded** | Every session | Only when relevant | Tool list up front, calls on demand |
| **Can run code** | No (it is text) | Yes, bundled scripts | Yes, on the server |
| **Format rules** | None | Frontmatter + markdown | A protocol |

In one sentence each: **AGENTS.md is what is always true about this repo. A skill is what to do when a certain kind of task shows up. MCP is how the agent reaches systems outside the repo.** If you know [MCP](https://devaiper.com/blog/what-is-mcp) already, the new part is skills.

## AGENTS.md: a README for agents

The project describes it as "a README for agents": one predictable place for the instructions a coding agent needs and a human contributor would skim past. There are no required fields. It is standard markdown, and agents read the text you give them.

```markdown
# AGENTS.md

## Setup
- Install: `pnpm install` (not npm; the lockfile is pnpm-lock.yaml)
- Dev server: `pnpm dev`

## Before you say you are done
- `pnpm test` and `pnpm typecheck` must pass
- Never edit files in `src/generated/`

## Style
- TypeScript strict mode, no `any`
- Keep functions under ~40 lines; move shapes into helpers
```

Two rules from the format worth knowing:

- **The nearest file wins.** In a monorepo, put another AGENTS.md in each package. Agents read the closest one in the directory tree, so every subproject can have its own instructions.
- **Chat beats file.** An explicit instruction in the conversation overrides AGENTS.md.

If you have written a [CLAUDE.md](https://devaiper.com/blog/claude-md-guide), you already know the craft: short, concrete, checkable rules. The same advice applies here.

## Agent Skills: knowledge loaded on demand

A skill is a **folder**. The only required file is `SKILL.md`; everything else is optional:

```text
release-notes/
├── SKILL.md         # required: metadata + instructions
├── scripts/         # optional: code the agent can run
├── references/      # optional: docs it can read when needed
└── assets/          # optional: templates, data
```

`SKILL.md` is YAML frontmatter followed by markdown:

```markdown
---
name: release-notes
description: Writes release notes from merged pull requests since the
  last tag. Use when the user asks for release notes, a changelog or
  "what shipped" for a version.
---

# Writing release notes

1. Run `scripts/merged-prs.ts <last-tag>` to list merged PRs.
2. Group them: Features, Fixes, Internal. Drop dependency bumps.
3. One line per change, user-facing wording, link the PR.
4. Follow the template in `assets/template.md`.
```

The rules for the two required fields, from the [specification](https://agentskills.io/specification):

- **`name`**: 1 to 64 characters, lowercase letters, digits and hyphens only, no hyphen at the start or end, no double hyphens, and it **must match the folder name**.
- **`description`**: 1 to 1024 characters, saying **what the skill does and when to use it**, with the keywords a user would actually say.

Optional fields include `license`, `compatibility` (up to 500 characters, for things like "needs network access"), `metadata`, and an experimental `allowed-tools`.

### Why skills are cheap: progressive disclosure

This is the clever part. Agents load skills in three stages:

1. **Metadata (~100 tokens per skill)**: only `name` and `description` are loaded at startup, for every installed skill.
2. **Instructions (under 5,000 tokens recommended)**: the full `SKILL.md` body is loaded when the agent decides the skill applies.
3. **Resources (as needed)**: files in `scripts/`, `references/` and `assets/` are read only when the instructions point to them.

So you can install dozens of skills and pay roughly a hundred tokens each until one is needed. The spec recommends keeping `SKILL.md` under 500 lines and moving detail into reference files, one level deep. In [context engineering](https://devaiper.com/blog/what-is-context-engineering) terms, skills are a way to keep the context small by default and rich on demand.

It also means **the description is the whole interview.** If it does not say when to use the skill, the agent never opens it. "Helps with PDFs" will be ignored; "Extracts text and tables from PDFs, fills forms and merges files. Use when the user mentions PDFs or forms" will be found.

## Which one should you use?

My rule of thumb (opinion, not spec):

- **Always true, short, about this repo** (commands, conventions, don'ts): AGENTS.md.
- **A procedure you repeat, longer than a few lines, or one that needs a script** (release notes, a migration checklist, a review rubric): a skill.
- **Needs live data or acts on another system** (tickets, databases, deploys): MCP, possibly with a skill that explains how to use those tools well.

A sign you need a skill: your AGENTS.md has a section that only matters one week in ten. Move it out, and every other session gets a smaller, sharper context.

## Validate your skills

The standard ships a reference validator (`skills-ref validate ./my-skill`). If you would rather check skills in your own TypeScript tooling, or in CI, the rules fit in one function. It uses the [`yaml`](https://www.npmjs.com/package/yaml) package (`npm install yaml`):

```ts
import { readFile } from "node:fs/promises";
import { basename, dirname } from "node:path";
import { parse } from "yaml";

const NAME = /^[a-z0-9]+(-[a-z0-9]+)*$/; // no edge or double hyphens

/** Check a SKILL.md against the Agent Skills spec. [] = valid. */
export function checkSkill(source: string, folder: string) {
  const m = source.match(/^---\r?\n([\s\S]*?)\r?\n---(\r?\n|$)/);
  if (!m) return ["SKILL.md must start with YAML frontmatter (---)"];
  const meta = (parse(m[1]) ?? {}) as Record<string, unknown>;
  const errors: string[] = [];
  const { name, description, compatibility } = meta;

  if (typeof name !== "string" || !name) {
    errors.push("name is required");
  } else {
    if (name.length > 64) errors.push("name: max 64 characters");
    if (!NAME.test(name)) {
      errors.push("name: a-z, 0-9 and single inner hyphens only");
    }
    if (name !== folder) {
      errors.push(`name must match its folder "${folder}"`);
    }
  }
  if (typeof description !== "string" || !description.trim()) {
    errors.push("description is required");
  } else if (description.length > 1024) {
    errors.push("description: max 1024 characters");
  }
  const compat = String(compatibility ?? "");
  if (compat.length > 500) {
    errors.push("compatibility: max 500 characters");
  }
  return errors;
}

/** CLI: node skill-check.ts path/to/my-skill/SKILL.md */
if (import.meta.main) {
  const file = process.argv[2];
  const errors = checkSkill(
    await readFile(file, "utf8"),
    basename(dirname(file)),
  );
  console.log(errors.length ? errors.join("\n") : "valid");
  process.exitCode = errors.length ? 1 : 0;
}
```

The `NAME` pattern does three of the rules at once: only lowercase letters and digits in groups, joined by single hyphens, which rules out leading, trailing and double hyphens. Run it on every `SKILL.md` in CI and a typo in a folder name never ships.

How I tested this: under Node 24, the tests feed it the spec's own valid and invalid examples (`PDF-Processing`, `-pdf`, `pdf--processing`), a 65-character name, a name that does not match its folder, missing and 1,025-character descriptions, an over-long `compatibility`, a file without frontmatter, Windows line endings, and the CLI's exit codes for a valid and an invalid skill.

## Skills can run code: treat them like dependencies

A skill can bundle scripts and tell the agent to run them. That makes a skill from the internet closer to an npm package than to a README. Read it before you install it, pin the version you reviewed, and be wary of skills whose instructions fetch more instructions from somewhere else, which is the same [prompt injection](https://devaiper.com/blog/how-to-protect-ai-agents-from-prompt-injection) risk as any other untrusted text an agent reads. The foundation's proposed roadmap includes security guidance for people who write and install skills, which is a good sign. Until then, review is on you.

## What this means for your team

1. Write an AGENTS.md this week if you do not have one: setup, test commands, the three rules people keep breaking.
2. Turn your longest "how we do X" wiki page into a skill, with a description that says when to use it.
3. Validate skills in CI, and review new ones like code.

For how Claude Code in particular combines skills, hooks, subagents and MCP, see [Claude Code skills vs hooks vs subagents](https://devaiper.com/blog/claude-code-skills-hooks-subagents).

Sources: [Agent Skills specification](https://agentskills.io/specification), [AGENTS.md](https://agents.md), [Agentic AI Foundation](https://aaif.io).

## FAQ

### What is AGENTS.md?

AGENTS.md is an open, plain-markdown file that tells coding agents how to work in a project: setup commands, code style, how to run tests. It has no required fields. In a monorepo the nearest AGENTS.md to the file being edited wins, and explicit instructions in the chat override it.

### What are Agent Skills?

An Agent Skill is a folder containing a SKILL.md file with YAML frontmatter (a required name and description) and markdown instructions, plus optional scripts, references and assets. Agents read only the name and description up front and load the rest when a task calls for it.

### What is the difference between Agent Skills and AGENTS.md?

AGENTS.md is always loaded and describes the project. A skill is loaded on demand and describes how to do one kind of task, and it can bundle scripts and reference files. Many teams use both.

### Who maintains Agent Skills and AGENTS.md?

Both are open standards stewarded by the Agentic AI Foundation under the Linux Foundation, which also hosts MCP. Agent Skills moved there on 22 October 2026. You can use either without joining the foundation.

### How do I validate a SKILL.md?

The standard ships a reference validator, skills-ref. The rules are short: name is 1 to 64 lowercase letters, digits and single hyphens and matches the folder name; description is 1 to 1024 characters; compatibility, if present, is at most 500.

