---
title: "Write Your First Agent Skill for the Three Times an Agent Reads It"
canonical: "https://current.tinyfish.ai/issue/57/foundations/article/71042/write-your-first-agent-skill-for-the-three"
publication: "TinyFish"
publisher: "TinyFish"
language: "en-US"
guide: "https://current.tinyfish.ai/llms.txt"
format: "Skill Writing Walkthrough"
author: "Sevda Polat"
author_url: "https://current.tinyfish.ai/team/200"
issue: 57
section: "foundations"
section_name: "Foundations"
published: 2026-11-30
updated: 2026-11-28
description: "Build one SKILL.md, learn what agents load at startup, activation and on demand, and why descriptions determine use."
word_count: 800
source_links: 9
---

# Write Your First Agent Skill for the Three Times an Agent Reads It

*By [Sevda Polat](<https://current.tinyfish.ai/team/200/markdown>)*

*November 30, 2026*

[Read on the website](<https://current.tinyfish.ai/issue/57/foundations/article/71042/write-your-first-agent-skill-for-the-three>)

When a new engineer joins a team, someone usually walks them through what the codebase can't explain on its own: why one directory uses tabs, which odd-looking setting must not be "fixed." A coding agent arrives without that conversation. An Agent Skill gives you a place to write it down. It is a folder containing a file named `SKILL.md`, which an agent can pick up when a relevant task comes along.

Here is a complete first skill. Save it as `.claude/skills/editorconfig/SKILL.md` for Claude Code, or `.github/skills/editorconfig/SKILL.md` for [Copilot in VS Code](https://code.visualstudio.com/docs/agent-customization/agent-skills):

```markdown
---
name: editorconfig
description: Create or update .editorconfig when the user asks for shared editor settings such as indentation or line endings.
---

Inspect existing editor configuration and representative source files first.
If the user's stated preference conflicts with existing files, follow the user,
but ask before changing a directory-specific rule.
Write the file, then explain each rule and any conflict left unresolved.
```

The `name` must match the folder name and may use only lowercase letters, digits and hyphens.

The [specification](https://agentskills.io/specification) describes agents reading a skill in three stages. This one uses only the first two.

**At startup**, the host (the app running the agent) loads just the name and description of each installed skill, roughly 100 tokens apiece. The model compares those lines with the user's request to decide whether to open anything more. So the description should say what the skill produces and when someone would want it, in words a user might actually type. "Helps with code quality" would pull the skill into requests it has no business touching.

**On activation**, the full body loads and stays in context alongside the conversation and any other active skills. The spec suggests keeping it under 5,000 tokens. Put here what every ordinary run needs and the agent can't work out for itself: the order of work, which source wins when two disagree, when to stop and ask.

**Only when needed**, the agent reads files in folders such as `references/` or runs helpers in `scripts/`, ideally because the body told it to. The [best-practices guide](https://agentskills.io/skill-creation/best-practices) favors conditional pointers: if the API returns a non-success status, read `references/api-errors.md`. Staging is what lets a team install dozens of skills while the model carries the full text of only the few in use.

{{component:skill-reading-stages.html}}

The same staging also makes a skill easy to overlook. Until it activates, a skill is little more than its description, one entry in a list the model scans on every request, and that list has a budget. When the collection outgrows it, Claude Code [omits some descriptions](https://code.claude.com/docs/en/skills). A skill can work perfectly when you invoke it by name and still go unused, because the model saw its name but never learned what it was for.

A tool sits at a different layer. In the [Model Context Protocol](https://modelcontextprotocol.io/specification/2026-07-28/server/tools), a common standard for connecting agents to outside services, a tool definition is a name, an optional description and a required input schema, backed by a server that carries out the operation when called. That is enough for the model to know one operation exists and to invoke it. A skill supplies the procedure around such operations: what to check first, which result decides the next step, and when to give up.

To test yours, invoke `/editorconfig` in a fresh chat on a small repository. That exercises the body. Exercising the description means not naming the skill at all. Ask for consistent indentation, then ask about a Python error; the first should trigger it and the second shouldn't. Run that pair with your team's other skills installed, because that is where descriptions compete with one another.

Then point it at a repository whose files disagree with one another and watch for the moment the agent makes a choice you never wrote down. Whatever it decided there is something your next draft should address.

## Things to follow up on...

- **Testing whether skills trigger:** The project's guide to [optimizing skill descriptions](https://agentskills.io/skill-creation/optimizing-descriptions) suggests evaluating requests that should activate a skill separately from nearby requests that shouldn't, and warns that a matching description may still be skipped when the agent thinks it can manage without the skill.

- **What validation actually checks:** The reference [skills-ref library](https://github.com/agentskills/agentskills/blob/main/skills-ref/README.md) is labeled a demonstration implementation, and its validator checks frontmatter and naming rules without following reference links, running scripts or judging the instructions.

- **Scripts that fetch dependencies:** The project's guidance on [using scripts in skills](https://agentskills.io/skill-creation/using-scripts) recommends declaring prerequisites and pinning versions, and some of its inline-dependency examples can cause a runner to install packages at execution time.

- **Skills served from elsewhere:** The beta [MCP Skills extension](https://skills.extensions.modelcontextprotocol.io/specification/beta/skills) treats remotely served skills as untrusted input, and requires visible origin and per-skill approval before their content can trigger code execution on the host.

## More

- [Foundations — Issue 57](<https://current.tinyfish.ai/issue/57/foundations/markdown>)
- [Issue 57](<https://current.tinyfish.ai/issue/57/markdown>)
- [Publication guide](<https://current.tinyfish.ai/llms.txt>)