# Write a skill

> Turn a job you keep explaining to an agent into one skill folder that Claude, Codex and Gemini load when that job comes up.

9 steps. Checked 2026-12-06. Page for people: https://app.makeaguide.guides.hopperlabs.ai/guides/write-a-skill

You start with: A job you keep explaining to an agent; The steps you want followed.

You end up with: A SKILL.md file (what to do and how); A description (it makes the skill load); A place in each agent (Claude, Codex and Gemini); A clean check (nothing left to fix).

## Steps

### 1. Pick one job

Choose one job you keep explaining, and write down how people ask for it.

#### What should one skill cover?

One job you keep explaining to an agent, such as "write our weekly report". A skill is a folder with a `SKILL.md` file. The agent loads it when that job comes up, so give each job its own skill.

Write three things down before you make a file:

- the job, as you would say it to a colleague;
- the words people use when they ask for it;
- the steps you want followed every time.

#### What do I write first?

The requests you will test with. Anthropic's advice is to write the tests before the long instructions. A test here is a request in a person's words, and what a good answer must have in it.

Run each request once without the skill. What the agent gets wrong is what the skill has to say.

### 2. Say when to use it

Write one description that says what the skill does and when to use it, in the third person.

#### What does the description do?

It is what the agent reads to decide whether to load your skill. When an agent starts, it loads only the name and the description of every skill. It reads the rest of a `SKILL.md` when that skill is used.

So the description has two things to say: what the skill does, and when to use it. Put in the words people say when they ask for the job.

#### How is it written?

In the third person, in at most 1024 characters: "Writes the weekly report", not "I can write reports". Say what the skill does first, then "Use when" and the requests that should load it.

```yaml
description: Writes the weekly report from the team notes in the house format. Use when someone asks for the weekly report, a status update or a summary of the week.
```

From `skill/voice.md`:

```markdown
description: Turn something a person knows how to do into a guide folder that becomes a page, a connector and a skill. Use when someone wants to write a how-to, a guide or a playbook that agents can use too, or asks whether their guide folder is ready.
```

### 3. Name the folder

Give the folder a short lowercase name, and write the same name in the file.

#### What can the name be?

Lowercase letters, numbers and hyphens, at most 64 characters, with no hyphen at the start or the end. `weekly-report` fits. `Weekly Report` does not.

Anthropic's products add one more rule: the name cannot contain `anthropic` or `claude`.

#### Where is the name written?

In two places that must match: the folder's name, and the `name` line in the front matter at the top of `SKILL.md`. The specification and Codex both require a `name` and a `description` there.

```markdown
---
name: weekly-report
description: Writes the weekly report from the team notes in the house format. Use when someone asks for the weekly report, a status update or a summary of the week.
---
```

#### What is the front matter?

The lines between two rows of three hyphens at the very top of the file. Each line is a field, a colon and its value. Your instructions start on the line after the second row.

### 4. Write what it does not know

Under the front matter, write only your own steps, format and rules.

#### What goes under the front matter?

Only what the agent does not already know: your steps, your format, your rules, the names of your things. It knows how to sum up a week. It does not know that your report starts with risks and never names a customer.

#### How exact should it be?

Exact where a mistake costs something, loose where judgment is fine. Give the exact order or the exact command for a step that must not vary. Give the goal for a step where any sensible way will do.

#### How long can it be?

Under 500 lines, and the specification recommends under 5000 tokens. The whole body is loaded each time the skill is used, so every line you add is read on every run.

When it grows past that, the next step says where the extra goes.

From `skill/voice.md`:

```markdown
## How to help

1. Read the current guide before advising: call `get_guide` with `id: makeaguide` on the Hopper Guides connector, or read https://guides.hopperlabs.ai/guides/makeaguide.md. Follow its steps in order; do not work from memory of an older version.
2. Start from the job. Ask what the reader ends up with, and write the title, the one-sentence description and the audience first.
3. Collect sources before writing steps. A source is a page or file the reader can open to check a claim.
4. Write each step as questions with the answer in the first sentence, at most 60 words.
5. When the person has a folder, check it: call `check_guide_folder` with every file as `files` (path to text). Report each finding with the file it names. Do not say a folder is ready unless `ready` is true.
```

### 5. Move detail into files

Keep SKILL.md short. Put long detail in files it links to, one level down.

#### What belongs outside SKILL.md?

Anything long that is needed only some of the time: a full example, a table of codes, a script. Put it in a file inside the skill folder and link to it from the body. The specification names three optional folders: `scripts/`, `references/` and `assets/`.

```text
weekly-report/
  SKILL.md
  references/format.md
  scripts/collect.sh
```

#### How deep can the files go?

One level. Link every file from `SKILL.md` itself, and keep it no more than one folder below, as in `references/format.md`. A file that is reached only through another file is too deep.

Write the link with the file's path inside the folder, and say when to open it:

```markdown
Read [the format](references/format.md) before you write the summary.
```

### 6. Name the tools to call

Name each connector tool the skill should call, and say what to do without it.

#### Why name tools in a skill?

A skill says how the job is done. A connector's tools do the parts an agent cannot do alone, such as reading your notes. Name each tool exactly in the body, say when to call it, and say what to do when the connector is not there.

```markdown
1. Call `search` on the `notes` connector with the dates of the week.
2. If the connector is not connected, ask for the notes as text.
```

#### How does this site's skill do it?

Its list of tools is not typed by hand. It is made from the guide's tasks, so the skill cannot name a tool the connector does not have. The author writes only when to use the skill and how to help.

#### Can a skill say which tools it may use?

The specification has an optional `allowed-tools` line in the front matter: tool names separated by spaces, approved in advance. It is marked experimental, so do not rely on it.

From `skill/SKILL.md`:

```markdown
## Tools

These are on the Hopper Guides connector. If it is not connected, read the guide as plain text instead and say that the checks need the connector.

- `get_guide` with `id: makeaguide`: read the guide as it is now. Do this first.
- `check_guide_folder`: Check a guide folder and list what is missing, file by file. Needs `files`. Gives back `ready`, `findings`.
```

This step in full: [Give your product a connector](https://app.makeaguide.guides.hopperlabs.ai/guides/add-a-connector.md)

### 7. Put it where agents look

Copy the folder to where each agent reads skills.

#### Where does each agent look?

In its own folder. Claude Code reads `.claude/skills/` in a project and `~/.claude/skills/` for you alone. Codex reads `.agents/skills/`. Gemini CLI reads `.gemini/skills/`, and `.agents/skills/` as well. So two copies in a project reach all three.

```shell
mkdir -p .claude/skills .agents/skills
cp -R weekly-report .claude/skills/
cp -R weekly-report .agents/skills/
```

#### What about the Claude apps?

Upload the skill as a ZIP file with the skill folder at its top level. A skill added in one Claude product does not appear in the others, so add it in each one you use.

#### Does it matter where I start the agent?

For a project copy, yes. Codex looks for `.agents/skills` in the folder you start it in and in each folder above, up to the top of the project. It also reads `~/.agents/skills` in your home folder.

From `src/agent-doors.ts`:

```typescript
export function skillPlaces(name: string): readonly { readonly client: string; readonly path: string }[] {
  return [
    { client: 'Claude Code, for you', path: `~/.claude/skills/${name}/SKILL.md` },
    { client: 'Claude Code, for one project', path: `.claude/skills/${name}/SKILL.md` },
    { client: 'Codex and Gemini CLI, for one project', path: `.agents/skills/${name}/SKILL.md` },
    { client: 'Codex and Gemini CLI, for you', path: `~/.agents/skills/${name}/SKILL.md` },
    { client: 'Claude on the web or desktop', path: `Upload ${name}.zip, with the ${name} folder at its top` },
  ];
}
```

### 8. Check the skill

Send the folder's name and the text of SKILL.md to the check, and fix what it finds.

#### What does the check read?

The folder's name and the whole text of `SKILL.md`. It checks the front matter, the name against the folder, the length and wording of the description, and the length of the body. List the folder's other files too, and it checks every link.

Ask an agent that has this site's connector to check your skill. It answers `ready`, with one finding for each thing to fix. The specification names a checker of its own as well: `skills-ref validate ./my-skill`.

#### Is a clean check enough?

No. The check says the folder is well formed, not that the skill does the job. Run the requests you wrote in the first step, in every agent that will use the skill, and read what each one did.

Anthropic's advice is the same: test a skill with every model you plan to use it with.

From `tasks.yaml`:

```yaml
- id: check-skill
  description: Check a skill folder against the limits agents hold it to, and list what to fix
  inputs:
    schema:
      type: object
      properties:
        folder: {type: string, description: "The skill folder's name, such as weekly-report."}
        skill_md: {type: string, description: "The whole text of SKILL.md, front matter included."}
        files: {type: array, items: {type: string}, description: "The other paths in the folder, such as references/format.md."}
      required: [folder, skill_md]
      additionalProperties: false
  output_fields: [ready, name, description_characters, body_lines, findings, places, next]
```

This step in full: [Test which agent does best](https://app.makeaguide.guides.hopperlabs.ai/guides/test-agents.md)

### 9. Share it as a plugin

Wrap the folder in a plugin, so that others install it with one command.

#### What is a plugin?

A folder that carries skills so that someone installs them with one command. For Claude Code, put your skill under `skills/` and add a file at `.claude-plugin/plugin.json`. `name` is its only required key.

```text
team-skills/
  .claude-plugin/plugin.json
  skills/weekly-report/SKILL.md
```

#### How do people install it?

From a marketplace: a file at `.claude-plugin/marketplace.json` with a `name`, an `owner` and a `plugins` list. Each plugin in the list has a `name` and a `source`. Then anyone runs two commands.

```shell
claude plugin marketplace add <source>
claude plugin install <plugin>@<marketplace>
```

#### What about Codex and Gemini CLI?

Codex has the same two steps: `codex plugin marketplace add <source>`, then `codex plugin add <plugin>@<marketplace>`. Gemini CLI calls its package an extension. It has a `gemini-extension.json` file at its top and can carry skills.

Run:

```shell
claude plugin marketplace add ./my-marketplace
```

## What you keep

- One skill folder, with a SKILL.md that says what to do and when
- A description an agent can match to the job
- A copy where each agent looks, or a plugin that puts it there
- A check that lists nothing to fix

## Words used here

- **Agent**: A program that uses an AI model to do a job for someone, reading pages and calling tools as it goes. Claude, ChatGPT, Codex and Gemini are agents.
- **Connector**: An address an agent connects to that offers tools, using the Model Context Protocol (MCP). Often called an MCP server.
- **Description**: The line in a skill file's front matter that says what the skill does and when to use it, which an agent reads to decide whether to load the skill.
- **Front matter**: The lines between two rows of three hyphens at the very top of a file, where a skill file keeps its name and description.
- **Marketplace**: A list of plugins kept in one file, which someone adds once and then installs any plugin on it by name.
- **Plugin**: A folder that carries skills, and sometimes connectors and commands, so that someone installs them together with one command.
- **Skill**: A folder with a SKILL.md file that tells an agent when and how to do one kind of work. The agent loads it only when the work comes up.
- **Skill file**: The file named SKILL.md at the top of a skill folder, with front matter first and the instructions under it.
- **Skill folder**: The folder that holds one skill, with a SKILL.md file and any files it links to, named with the skill's name.
- **Test**: A request in a person's words, the tool an agent should reach for, and facts that must be true of the result.
- **Token**: The unit an AI model counts text in, so a longer text is more tokens.
- **Tool**: One named thing an agent can ask a connector to do, with the facts it needs described well enough for the agent to supply them.

## Questions

**Do I need to write code to make a skill?**

No. A skill is a folder with one text file, SKILL.md. It holds a name, a description and your instructions in plain words. Scripts are optional, for the parts of a job you want run the same way every time.

**What is the difference between a skill and a connector?**

A skill is instructions an agent loads when a job comes up. A connector is an address that offers tools an agent calls. A skill can name a connector's tools, so the agent knows which to call and when.

**Does one skill work in Claude, Codex and Gemini?**

The SKILL.md is the same. The place differs. Codex and Gemini CLI both read .agents/skills/<name>/SKILL.md. Claude Code reads .claude/skills/<name>/SKILL.md. The Claude apps take the folder as a ZIP file.

**Why does my skill not load when I ask for the job?**

Look at the description first. It is all the agent reads before it decides. Say what the skill does and when to use it, with the words people use to ask. Then check that the folder is in a place that agent reads, and that its name matches the name in the file.

**How long can a skill be?**

The description is at most 1024 characters. Keep the body of SKILL.md under 500 lines, and the specification recommends under 5000 tokens. Longer detail goes in files that SKILL.md links to, one level down.

**Were the plugin commands on this page run?**

The Claude Code and Codex commands come from each program's own help text, read on 2026-12-06 with Claude Code 2.1.337 and codex-cli 0.174.0. Gemini CLI was not installed where this page was written, so what it says about extensions comes from Gemini CLI's documentation and was not run.

## Sources

- [Agent Skills specification](https://agentskills.io/specification.md), read 2026-12-06, sha256 bf4137a702014f82a022de532e597c5f92ea86fb53fe29ea27bee3bbc1d19738
- [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview.md), read 2026-12-06, sha256 29342e76285612e3c962022c23580b0e08981f604703a20aaf21d72ebf15e160
- [Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices.md), read 2026-12-06, sha256 cb3f49125d6716342b369145655ec8a129a2baeaff3dd56b3087758f9674bd54
- [Create custom skills](https://claude.com/docs/skills/how-to.md), read 2026-12-06, sha256 35e5696a507f52990752734289cc0607d24d2fb98482e535e580408bfbdd90dd
- [Build skills](https://learn.chatgpt.com/docs/build-skills.md), read 2026-12-06, sha256 95b5ef4d0581d9eeeee342ef4718e77ed7574fe9c61ae28e1c2bffa4c6bdb411
- [Agent Skills in Gemini CLI](https://raw.githubusercontent.com/google-gemini/gemini-cli/main/docs/cli/skills.md), read 2026-12-06, sha256 51e8573ef4c068dbdef5f73bd665c47ab16718aefe4edba365fe333b2d85f96d
- [Plugin manifest reference](https://code.claude.com/docs/en/plugins/manifest-reference.md), read 2026-12-06, sha256 7b23d4eec809e10dc23a7c57eab48982a539a48fa5fd5b4fa8d83480cebf52df
- [Create a marketplace](https://code.claude.com/docs/en/plugins/create-marketplace.md), read 2026-12-06, sha256 8ff75a21144eb153f1ee0f157c3679c177fcb846c74b54bd70793a23b2239885
- [Gemini CLI extensions](https://raw.githubusercontent.com/google-gemini/gemini-cli/main/docs/extensions/index.md), read 2026-12-06, sha256 ba0bfc2f0dde9d780e29ad2b37446eeeff7c760052682c0f25e592a02bbffecf

Written from the primary pages listed as sources, read on 2026-12-06, and from this site's own files. No outside reviewer.

## For agents

- Connector for this guide: https://app.makeaguide.guides.hopperlabs.ai/api/mcp/write-a-skill (tools: list_guides, search, get_guide, fetch, define_word, check_skill)
- Connector for every guide: https://app.guides.hopperlabs.ai/api/mcp
- Skill: https://app.makeaguide.guides.hopperlabs.ai/skills/hopper-write-a-skill/SKILL.md
- Tests written: 6. What agents did with them: https://app.makeaguide.guides.hopperlabs.ai/results
- Next guide: [Test which agent does best](https://app.makeaguide.guides.hopperlabs.ai/guides/test-agents.md)
