Skills and Agent SDKs — Anthropic Skills, AGENTS.md, OpenAI Apps SDK
MCP says what tools exist. Skills say how to do a task. The 2026 stack layers both. Anthropic's Agent Skills (open standard, December 2025) ship as SKILL.md with progressive disclosure, OpenAI's Apps SDK is MCP plus widget metadata, and AGENTS.md (now in 60,000+ repos) sits at the repo root as project-level agent context. This lesson names what each covers and builds a minimal SKILL.md and AGENTS.md bundle that travels across agents.
Learning Objectives
- Distinguish the three layers: AGENTS.md (project context), SKILL.md (reusable know-how), MCP (tools).
- Write a SKILL.md with YAML frontmatter and progressive disclosure.
- Load skills filesystem-style into an agent runtime.
- Compose a skill with an MCP server and an AGENTS.md so one package works in Claude Code, Cursor, and Codex.
The Problem
Say you distill a release-notes workflow into a multi-step prompt: "Read the latest merged PRs. Group by area. Summarize each. Write a changelog entry following the team's style. Post to Slack draft." You put it in a Notion doc for your team.
Now you want to run that workflow from Claude Code, Cursor, and Codex CLI, and each one loads instructions differently: Claude Code slash-commands, Cursor rules, Codex .codex.md. So you copy the workflow three times and keep three copies in sync by hand.
AGENTS.md and SKILL.md together fix this:
- AGENTS.md sits at the repo root. Compatible agents read it on session start. "How does this project work? What are the conventions? Which commands run tests?"
- SKILL.md is a portable bundle: YAML frontmatter (name, description) + markdown body + optional resources. Agents that support skills load them by name on demand.
- MCP (Phase 13 · 06-14) handles the tools the skill needs to invoke.
Three layers, and the workflow lives in one portable file.
The Concept
AGENTS.md (agents.md)
Launched late 2025, adopted by 60,000+ repos by April 2026. One file at repo root. Format:
# Project: my-serviceConventions
- TypeScript with strict mode.
- Use Pydantic for models on the Python side.
- Tests run with
pnpm test.
Build and run
pnpm devfor local dev server.pnpm buildfor production bundle.
Agents read this on session start and use it to calibrate their behavior for that project. Every coding agent in 2026 supports AGENTS.md: Claude Code, Cursor, Codex, Copilot Workspace, opencode, Windsurf, Zed.
### SKILL.md format
Anthropic's Agent Skills (released as an open standard December 2025):
```markdown
---
name: release-notes-writer
description: Write a changelog entry for the latest merged PRs following this project's style.
---
# Release notes writer
When invoked, run these steps:
1. List PRs merged since the last tag. Use `gh pr list --base main --state merged`.
2. Group by label: feature, fix, chore, docs.
3. For each PR in each group, write one line: `- <title> (#<num>)`.
4. Draft the release notes and stage them in CHANGELOG.md.
If the user says "ship", run `git tag vX.Y.Z` and `gh release create`.
Notes
- Never include commits without a PR.
- Skip "chore" entries from the public changelog.
Frontmatter declares the skill's identity. The body is the prompt the model sees when the skill loads.
### Progressive disclosure
A skill can reference sub-resources that the agent fetches only when it needs them. For example:
skills/ release-notes-writer/ SKILL.md style-guide.md template.md scripts/ generate.sh
SKILL.md says "see style-guide.md for the style rules," and the agent pulls style-guide.md only while the skill is running. That keeps detail the model may not need out of the prompt.
### Filesystem discovery
Agent runtimes scan known directories for SKILL.md files:
- `~/.anthropic/skills/*/SKILL.md`
- Project `./skills/*/SKILL.md`
- `~/.claude/skills/*/SKILL.md`
Loading goes by folder name and frontmatter `name`. Claude Code, the Anthropic Claude Agent SDK, and SkillKit (cross-agent) all follow this pattern.
### Anthropic Claude Agent SDK
`@anthropic-ai/claude-agent-sdk` (TypeScript) and `claude-agent-sdk` (Python) load skills at session start and expose them as callable "agents" inside the runtime. The agent loop dispatches to a skill when the user invokes it.
### OpenAI Apps SDK
Launched October 2025 and built directly on MCP, it unifies OpenAI's earlier Connectors and Custom GPT Actions under a single developer surface. An Apps SDK app is:
- An MCP server (tools, resources, prompts).
- Plus widget metadata for ChatGPT's UI.
- Plus an optional MCP Apps `ui://` resource for interactive surfaces.
The protocol is the same, with a richer UI on top.
### Cross-agent portability via SkillKit
Tools like SkillKit and similar cross-agent distribution layers translate a single SKILL.md into the native format of each of 32+ AI agents (Claude Code, Cursor, Codex, Gemini CLI, OpenCode, and others). You keep one source of truth and many agents consume it.
### The three-layer stack
| Layer | File | Loaded when | Purpose |
|-------|------|-------------|---------|
| AGENTS.md | repo root | session start | project-level conventions |
| SKILL.md | skills directory | skill invoked | reusable workflow |
| MCP server | external process | tools needed | callable actions |
The layers compose. The agent reads AGENTS.md on session start, the user invokes a skill, the skill's instructions include MCP tool calls, and the agent dispatches those through an MCP client.
Use It
code/main.py ships a stdlib SKILL.md parser and loader. It writes two fixture skills under /tmp/lesson-21-skills/, discovers them, parses the YAML frontmatter plus markdown body, and produces a dict keyed by skill name. It then simulates an agent loop that invokes release-notes-writer by name and prints the system prompt that would go to the model.
What to look at:
- YAML frontmatter parsed with a minimal stdlib parser (no
pyyamldependency, flatkey: valuelines only). - Skill body stored verbatim; agent prepends it to the system prompt on invocation.
- Progressive disclosure through a
read_subresourcefunction that pulls a referenced file only when the skill body mentions it.
Ship It
This lesson produces outputs/skill-agent-bundle.md. Given a workflow, the skill produces the combined SKILL.md + AGENTS.md + MCP-server-blueprint bundle, portable across agents.
I'd run main.py and read the printed system prompt before anything else. The agent loop never calls a model. It builds the string a runtime would send, so you can see exactly what a skill adds: the skill body, plus style-guide.md appended when the body mentions it.
The progressive-disclosure check is the part worth poking at. Here it is a plain substring test for style-guide in the body, which is crude, but it makes the idea concrete. The sub-resource costs nothing until the skill asks for it. A real runtime lets the model decide when to read the file. Delete the See style-guide.md line from the fixture and the subresource pulled line disappears from the output.
The frontmatter parser splits each line on the first colon, so it handles flat fields like name and description and nothing else. Multi-line values or nested keys would not parse the way a YAML library would. I'd swap in a real parser once skills grow past two fields.
The code also stops short of the other two layers. It never reads an AGENTS.md or talks to an MCP server, and the last lines of the demo only print what the three layers are. Wiring a skill to a real MCP tool call is the next thing I'd build on top of it.
Exercises
-
Run
code/main.py. Add a second fixture skill under/tmp/lesson-21-skills/and confirm the loader picks it up. -
Write an AGENTS.md for this course repo. Include testing commands, style conventions, and the Phase 13 mental model.
-
Port a multi-step workflow from your team's internal docs into a SKILL.md. Verify it loads in Claude Code.
-
Translate the skill into Cursor's and Codex's native rule formats by hand. Count the diff between formats. That diff is the translation surface SkillKit automates.
-
Read the Anthropic Agent Skills blog post. Identify one feature in the Claude Agent SDK that the loader in
main.pydoes not cover. (Hint: agent sub-invocation.)
Key Terms
| Term | What people say | What it actually means |
|---|---|---|
| SKILL.md | "The skill file" | YAML frontmatter plus markdown body, loaded by agent runtime |
| AGENTS.md | "Repo-root agent context" | Project-level conventions file read on session start |
| Progressive disclosure | "Lazy-load sub-resources" | Skill body references files pulled only when needed |
| Frontmatter | "YAML block at top" | Metadata (name, description) in --- delimiters |
| Claude Agent SDK | "Anthropic's skill runtime" | @anthropic-ai/claude-agent-sdk, loads skills and routes |
| OpenAI Apps SDK | "MCP + widget meta" | OpenAI's dev surface built on MCP plus ChatGPT UI hooks |
| Skill discovery | "Filesystem scan" | Walk known dirs for SKILL.md, key by name |
| Cross-agent portability | "One skill many agents" | Translate one SKILL.md to 32+ agents via SkillKit-style tools |
| Agent Skill | "Portable know-how" | Reusable task template outside MCP's tool concept |
| Apps SDK | "MCP plus ChatGPT UI" | Connectors and Custom GPTs unified on MCP |
Further Reading
- Anthropic: Agent Skills announcement: December 2025 launch
- Anthropic: Agent Skills docs: SKILL.md format reference
- OpenAI: Apps SDK: MCP-based developer platform for ChatGPT
- agents.md: AGENTS.md format and adoption list
- Anthropic: anthropics/skills GitHub: official skill examples
Code
- main.py (python, 191 lines)