What Are Skills?
🎯 Introduction
When developing with AI, we often need to repeat the same instructions: which development conventions to follow, how to design pages, and which checks to run after changing code. Rewriting these requirements for every task takes time and makes it easy to miss important steps.
Skills (Agent Skills) package reusable development guidelines, specialized knowledge, and workflows so that AI can read and use them as needed. This article explains what skills do, how their files are organized, and how they work. Using Vue component code review as an example, you will learn how to write a skill, provide it directly to AI, and configure it for reuse in Codex.
🧩 What Are Skills?
Skills are an open format for organizing AI task instructions and related resources, originally introduced by Anthropic. AI tools can use this format by supporting the Agent Skills standard.
For example, when reviewing a Vue component, you might send AI a request like this:
Review this Vue component.
AI can review it using its existing knowledge, but its focus may vary each time. One review might emphasize code conventions, another performance, and another might overlook error handling.
To get reviews that consistently follow the same criteria, you need to define the requirements in advance:
- Check code logic, component structure, and the use of reactive data.
- Check error handling, loading states, and empty states.
- Report findings in order of severity and suggest fixes.
You can save these requirements as a code review skill. For future reviews, you only need to specify the component to review, reusing the same guidelines without rewriting every requirement.
Skills can also guide many other everyday development tasks:
| Use case | Guidance a skill can provide |
|---|---|
| UI design | Guidelines for layout, colors, typography, and responsive design |
| Coding | Framework-specific conventions and best practices |
| Debugging | Steps to reproduce issues, identify causes, fix problems, and verify fixes |
| Automated testing | Instructions for writing test cases, running scripts, and checking results |
Skills do not change the AI model itself or require retraining. They provide instructions and resources for specific tasks, helping the model apply its existing capabilities more effectively.
📂 Skill File Structure
Under the Agent Skills standard, each skill is a separate folder that must contain a SKILL.md file. You can add other files and directories as the task requires.
| File or directory | Required | Purpose |
|---|---|---|
SKILL.md | Yes | Basic skill information and task instructions |
scripts/ | No | Scripts to run as needed, such as test scripts |
references/ | No | Reference material, such as detailed development guidelines and technical documentation |
assets/ | No | Resources needed for the task, such as templates and images |
For our Vue code review example, the review guidelines are entirely text-based, so a single SKILL.md file is enough.
Writing SKILL.md
Create a folder named vue-code-review and a SKILL.md file inside it:
---
name: vue-code-review
description: Review Vue 3 components for code logic, component structure, reactive data usage, and error handling. Use when the user asks to review a Vue component.
---
# Vue Code Review
## Review Steps
1. Check code logic and potential bugs.
2. Check how component responsibilities are divided and how reactive data is used.
3. Check error handling, loading states, and empty states.
## Output Requirements
- Order findings by severity.
- Explain each issue's location, cause, and suggested fix.
- Do not modify source code unless the user asks you to.
SKILL.md consists of two parts:
- Metadata (frontmatter): The YAML section enclosed by
---at the top of the file. It tells the AI tool the skill's name, purpose, and when to use it. - Body (Markdown): The review steps, execution guidelines, and output requirements that AI reads when using the skill.
The standard requires two fields: name and description.
| Field | Description |
|---|---|
name | The skill name, using lowercase letters, numbers, and hyphens. It must match the folder name. |
description | Describes what the skill does and when it should be used. |
The body has no fixed section template; organize it to suit the task. You now have a minimal skill, with no additional dependencies to install.
⚙️ How Skills Work
Suppose you configure three skills in an AI coding tool that supports them: UI design, Vue code review, and automated testing. When you ask AI to review a Vue component, it does not need to read the other two skills in full beforehand.
Agent Skills address this through progressive disclosure: first, AI learns which skills are available; then it reads the instructions relevant to the current task, loading additional resources only when needed.
Read only names and descriptions
Read only the matching skill
This example needs no extra resources
The process has three stages:
- Discover skills: The tool scans available skill directories, reads each skill's name and description, and provides this metadata to the model.
- Load instructions: When AI determines that the task matches
vue-code-review, or the user explicitly selects it, it reads the correspondingSKILL.mdfor the detailed review requirements. - Read resources on demand: If the instructions reference other documents, templates, or scripts, AI can read or execute them as needed, subject to the tool's permissions. Our code review skill contains only text instructions, so this step is unnecessary.
Once the relevant instructions and resources are available, AI can handle the task according to the skill's requirements.
This mechanism reduces unnecessary context usage. For example, configuring 30 skills does not mean that every request loads 30 complete SKILL.md files. However, skill metadata and any content that is actually loaded still take up context.
🚀 How to Use Skills
Skills do not always need to be installed. For a one-off task with a text-only skill, you can give the file directly to AI. To reuse a skill across tasks in an AI coding tool, place it in a directory the tool supports.
Method 1: Provide the File Directly to AI
Upload the SKILL.md you wrote earlier along with the Vue component file to an AI chat tool that can read files, such as ChatGPT. Then send this instruction:
Review the Vue component I provided, following the review steps and output requirements in SKILL.md.
You can also paste the contents of SKILL.md into the conversation. This uses the skill's text as a prompt for the current task, without relying on the tool's native skill-loading mechanism.
This approach is convenient for a skill you only need once. When you start a new conversation, however, you will usually need to provide the file or instructions again.
Method 2: Configure a Skill in an AI Coding Tool
If you regularly use Codex for project development, place the vue-code-review folder you created earlier in .agents/skills/ at the project root.
For example, in a Vue project named my-vue-app, the full relative path to the skill file is:
.agents/skills/vue-code-review/SKILL.md
Suppose the component you want to review is at src/components/UserList.vue.
- Make sure
SKILL.mdis saved at the path above and itsnamematches the folder name. - Open the Vue project in Codex. If an existing session has not recognized the new skill, try starting a new session for the project.
- Explicitly select the skill in the conversation and tell Codex which file to review.
In a Codex interface that supports $ skill references, you can send:
Use $vue-code-review to review src/components/UserList.vue. Output only the review findings.
You can also ask directly, “Review UserList.vue,” and let Codex use the skill's description to decide whether to apply it automatically. If you want to ensure a specific skill is used, explicitly select it and confirm that it has been recognized.
To make this skill available across projects, place it in ~/.agents/skills/vue-code-review/ in your user directory instead of copying it into each project.
Here, installing a skill means making its files available for the AI tool to find and use. Skills containing only SKILL.md usually need no additional runtime dependencies. For skills with scripts and external resources, follow their instructions to prepare the complete set of files and the execution environment.
What Changes When You Use a Skill?
Suppose UserList.vue contains this data-fetching logic:
<script setup>
import { ref } from 'vue';
const loading = ref(false);
const users = ref([]);
async function loadUsers() {
loading.value = true;
const response = await fetch('/api/users');
users.value = await response.json();
loading.value = false;
}
</script>
Our code review skill requires AI to check error handling, loading states, and related concerns, then report issues in the specified format. For example:
| Severity | Location | Cause | Suggested fix |
|---|---|---|---|
| High | loadUsers() | If the request or JSON parsing fails, the loading state reset never runs, potentially leaving the page stuck in a loading state. | Use try...finally to ensure the loading state is reset, and handle errors with catch. |
| Medium | fetch('/api/users') | The HTTP status is not checked, so an error response may be treated as valid data. | Check response.ok to determine whether the request succeeded. |
These are expected review findings based on the example code and skill requirements, not output from an actual Codex run.
The skill does not suddenly teach AI how to use Vue. It establishes a consistent review scope and output format that you can reuse in later tasks.
🔍 How Do Skills Differ from Regular Prompts?
Both regular prompts and skills can provide task instructions to AI. The main difference is how those instructions are organized, used, and reused.
| Aspect | Regular prompts | Agent Skills |
|---|---|---|
| Organization | Provide instructions directly or maintain prompt templates | Organize task instructions and optional resources in a dedicated skill directory |
| Usage | Supply instructions for the current task | Provide them manually or let a tool that supports skills load them on demand |
| Reuse | Copy prompts or use templates | Reuse the same skill across tasks and projects |
| Additional resources | Provide extra files as needed | Manage scripts, documents, and templates together |
For example, “Explain this code” is a one-off task that a regular prompt can handle. “Follow the same checks and output format every time you review a Vue component” describes a recurring workflow that is better captured as a skill.
The two work together. In practice, a prompt tells AI what to do now, while a skill can guide it on how to carry out this type of task.
