<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nirali</title>
    <description>The latest articles on DEV Community by Nirali (@nirali_toolbit).</description>
    <link>https://dev.to/nirali_toolbit</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4203648%2F65c48142-2f37-4c51-b179-a57c1965e20b.png</url>
      <title>DEV Community: Nirali</title>
      <link>https://dev.to/nirali_toolbit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nirali_toolbit"/>
    <language>en</language>
    <item>
      <title>How to write your first Agent Skill: SKILL.md explained with a working example</title>
      <dc:creator>Nirali</dc:creator>
      <pubDate>Sat, 24 Oct 2026 07:02:14 +0000</pubDate>
      <link>https://dev.to/nirali_toolbit/how-to-write-your-first-agent-skill-skillmd-explained-with-a-working-example-afp</link>
      <guid>https://dev.to/nirali_toolbit/how-to-write-your-first-agent-skill-skillmd-explained-with-a-working-example-afp</guid>
      <description>&lt;p&gt;One folder and one Markdown file can teach an AI coding agent a repeatable task. Here's the format, the rules that trip people up, and a skill you can copy today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In short:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A skill is a folder with one required file, &lt;code&gt;SKILL.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;description&lt;/code&gt; field decides when an agent uses the skill, so write it first.&lt;/li&gt;
&lt;li&gt;Validate the name before you share it, because some tools won't load a skill with an invalid name.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What an Agent Skill is
&lt;/h2&gt;

&lt;p&gt;An Agent Skill is a folder that teaches an AI agent how to do one specific job. At minimum it holds a single &lt;code&gt;SKILL.md&lt;/code&gt; file: YAML frontmatter on top, plain Markdown instructions below (&lt;a href="https://agentskills.io/specification" rel="noopener noreferrer"&gt;Agent Skills specification&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The format started at Anthropic and was published as an open standard in December 2025, with tools such as Cursor, GitHub, VS Code, goose and OpenCode listed as early adopters (&lt;a href="https://simonwillison.net/2025/Dec/19/agent-skills" rel="noopener noreferrer"&gt;Simon Willison&lt;/a&gt;). Editors like Zed now load skills from an &lt;code&gt;.agents/skills/&lt;/code&gt; folder (&lt;a href="https://zed.dev/docs/ai/skills.md" rel="noopener noreferrer"&gt;Zed docs&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The appeal is simple. You write instructions once, and any compatible agent can pick them up when a task matches.&lt;/p&gt;

&lt;h2&gt;
  
  
  How agents load a skill
&lt;/h2&gt;

&lt;p&gt;Skills are designed to stay out of the way until they're needed. The spec calls this progressive disclosure, and it works in three steps (&lt;a href="https://agentskills.io/specification" rel="noopener noreferrer"&gt;spec&lt;/a&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;At startup the agent reads only each skill's &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;description&lt;/code&gt;, about 100 tokens per skill.&lt;/li&gt;
&lt;li&gt;When a task matches the description, it loads the full &lt;code&gt;SKILL.md&lt;/code&gt; body. The spec recommends keeping that under 5,000 tokens.&lt;/li&gt;
&lt;li&gt;Files in &lt;code&gt;scripts/&lt;/code&gt;, &lt;code&gt;references/&lt;/code&gt; or &lt;code&gt;assets/&lt;/code&gt; load only when the instructions point to them.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's why the &lt;code&gt;description&lt;/code&gt; field matters more than anything else in the file. It is the only thing the agent sees when deciding whether to use your skill.&lt;/p&gt;

&lt;h2&gt;
  
  
  The folder layout
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;changelog-writer/
├── SKILL.md
└── references/
    └── STYLE.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only &lt;code&gt;SKILL.md&lt;/code&gt; is required. The &lt;code&gt;scripts/&lt;/code&gt;, &lt;code&gt;references/&lt;/code&gt; and &lt;code&gt;assets/&lt;/code&gt; folders are optional conventions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the folder goes
&lt;/h2&gt;

&lt;p&gt;Each tool reads skills from its own location, so check your editor's docs. In Zed, for example, skills live in &lt;code&gt;~/.agents/skills/&lt;/code&gt; for every project or in &lt;code&gt;.agents/skills/&lt;/code&gt; inside one project. Each skill must sit directly in that folder, with no nested groups, and project skills only load once you've marked the project as trusted (&lt;a href="https://zed.dev/docs/ai/skills.md" rel="noopener noreferrer"&gt;Zed docs&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  The frontmatter rules that trip people up
&lt;/h2&gt;

&lt;p&gt;Two fields are required (&lt;a href="https://agentskills.io/specification" rel="noopener noreferrer"&gt;spec&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;name&lt;/code&gt;&lt;/strong&gt;: 1 to 64 characters, lowercase letters, numbers and hyphens only. It can't start or end with a hyphen, can't contain &lt;code&gt;--&lt;/code&gt;, and must match the folder name.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;description&lt;/code&gt;&lt;/strong&gt;: 1 to 1,024 characters. It should say what the skill does and when to use it, with keywords an agent can match.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Optional fields include &lt;code&gt;license&lt;/code&gt;, &lt;code&gt;compatibility&lt;/code&gt; (up to 500 characters, only if the skill needs a specific environment), &lt;code&gt;metadata&lt;/code&gt; and an experimental &lt;code&gt;allowed-tools&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The most common mistakes are an uppercase name, a folder name that doesn't match, and a vague description like "Helps with changelogs". In Zed, for example, a skill with an invalid name fails to load and shows an error (&lt;a href="https://zed.dev/docs/ai/skills.md" rel="noopener noreferrer"&gt;Zed docs&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  A complete example: changelog-writer
&lt;/h2&gt;

&lt;p&gt;This skill turns recent commits into release notes in a consistent style.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;changelog-writer&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Writes&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;release&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;notes&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;from&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;recent&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;git&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;commits&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;in&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Keep&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Changelog&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;style.&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Use&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;when&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;asks&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;changelog,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;release&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;notes,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;or&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;summary&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;of&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;what&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;changed&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;since&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;last&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;tag."&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gh"&gt;# Changelog writer&lt;/span&gt;
&lt;span class="p"&gt;
1.&lt;/span&gt; Find the latest tag with &lt;span class="sb"&gt;`git describe --tags --abbrev=0`&lt;/span&gt;.
&lt;span class="p"&gt;2.&lt;/span&gt; List commits since that tag with &lt;span class="sb"&gt;`git log &amp;lt;tag&amp;gt;..HEAD --oneline`&lt;/span&gt;.
&lt;span class="p"&gt;3.&lt;/span&gt; Group each commit under Added, Changed, Fixed or Removed.
&lt;span class="p"&gt;4.&lt;/span&gt; Rewrite each line for users, not developers: say what changed for them.
&lt;span class="p"&gt;5.&lt;/span&gt; Skip merge commits and dependency bumps unless they fix a security issue.

Follow the tone and formatting rules in &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;the style guide&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;references/STYLE.md&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;.

&lt;span class="gu"&gt;## Example&lt;/span&gt;

Input commit: &lt;span class="sb"&gt;`fix: handle empty CSV upload without crashing`&lt;/span&gt;
Output line: &lt;span class="sb"&gt;`Fixed: uploading an empty CSV file no longer causes an error.`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The style guide sits in &lt;code&gt;references/STYLE.md&lt;/code&gt;, so it loads only when the agent actually writes a changelog.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep it small
&lt;/h2&gt;

&lt;p&gt;The spec gives three practical limits worth following (&lt;a href="https://agentskills.io/specification" rel="noopener noreferrer"&gt;spec&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep &lt;code&gt;SKILL.md&lt;/code&gt; under 500 lines and move long material into reference files.&lt;/li&gt;
&lt;li&gt;Keep file references one level deep from &lt;code&gt;SKILL.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Reference files by relative path from the skill folder.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Validate before you share
&lt;/h2&gt;

&lt;p&gt;The standard ships a reference library, &lt;code&gt;skills-ref&lt;/code&gt;, that checks your frontmatter and naming:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;skills-ref validate ./changelog-writer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it before committing a skill to a shared repo. Some agents simply skip a skill whose name breaks the rules, so it's easier to catch problems here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check that your agent actually uses it
&lt;/h2&gt;

&lt;p&gt;A valid skill can still sit unused if its description doesn't match how people ask for the task. In Zed you can test both paths: type &lt;code&gt;/&lt;/code&gt; and pick the skill to load it by hand, or describe the task in plain words and see whether the agent reaches for it on its own (&lt;a href="https://zed.dev/docs/ai/skills.md" rel="noopener noreferrer"&gt;Zed docs&lt;/a&gt;). If it never triggers by itself, rewrite the description before you touch the steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to go next
&lt;/h2&gt;

&lt;p&gt;Start with one task your team repeats every week, such as release notes, PR descriptions or test scaffolding. Write the description first, then the steps.&lt;/p&gt;

&lt;p&gt;Still choosing an editor to run your skills in? This &lt;a href="https://www.toolbit.ai/blog/cursor-vs-windsurf-which-agentic-ide-solves-m" rel="noopener noreferrer"&gt;Cursor vs Windsurf comparison&lt;/a&gt; puts both through a repository-wide refactor.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I work on Toolbit, which published the comparison linked above. This article was created with the help of AI and reviewed by the author for accuracy.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
