cd /news/ai-agents/how-to-write-your-first-agent-skill Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-145770] src=dev.to β†— pub= topic=ai-agents verified=true sentiment=↑ positive

How to Write Your First Agent Skill

A developer published a free, MIT-licensed pack of five agent skills, including one that generates conventional-commit messages, and outlined the minimal structure each skill follows: a folder containing a single SKILL.md file with YAML frontmatter (name and description) plus a markdown body of numbered workflow steps, judgment rules, a worked example, and named anti-patterns. The description field acts as the trigger the agent matches against a request, while the body fixes execution order and output format; the skills install via `npx skills add alapha888/agent-skills-en`.

by read2 min views2 publishedOct 6, 2026

You have house rules for your coding agent: how commit messages should look, what a code review should check, how meeting notes should be structured. So you paste them into the chat at the start of every session β€” and by message ten the agent has drifted anyway. Next session, you paste again.

The problem is not memory. The instructions live in your clipboard instead of in a file the agent loads every time. A skill is that file.

A skill is a folder containing one file: SKILL.md. It has two parts.

The YAML frontmatter carries two fields β€” a name and a description. The description is the trigger: the agent scans the descriptions of its skills to decide which ones apply to your request. So the description does two jobs β€” say what the skill does, and name the situations where it fires. Write it as "does X. Use when the user asks for Y."

The body is plain markdown: the workflow, the rules, an example. No code, no config beyond the frontmatter.

The smallest skill in my pack generates commit messages, and it shows every part doing a job. Its frontmatter, verbatim:

---
name: git-commit-message
description: "Generates conventional-commit messages from staged changes: type prefix + English imperative subject (≀50 chars) + optional body explaining why. Use when the user asks to write, generate, or polish a git commit message."
---

The workflow is five numbered steps, in execution order:

git status --short, git diff --cached --stat). If nothing is staged, stop and ask β€” never invent a message out of nothing.feat, fix, docs, refactor, test, chore. A change that mixes types gets split into two commits, not averaged into one.git commit command, not bare text the user has to assemble. Then come the rules that encode judgment β€” the things you would otherwise keep correcting in review:

And one worked example, with the expected output:

git commit -m "feat: add CAPTCHA verification to login endpoint" -m "Blocks automated credential stuffing; CAPTCHA valid 5 minutes, account locks 10 minutes after 3 failures."

Finally, the anti-patterns β€” the failure modes, named explicitly:

Each part earns its place. The description decides triggering. The numbered steps fix the order of operations and include a stop condition. The rules hold the judgment calls. The example anchors the output format better than a paragraph of prose. The anti-patterns tell the agent what to refuse.

Drop the folder into your agent's skills directory, and the agent picks it up by matching the description β€” no further configuration. If you want working examples first, the five skills in the pack this teardown came from are free and MIT-licensed: commit messages, code review, meeting minutes, technical proofreading, and structured deep research.

Repo: https://github.com/alapha888/agent-skills-en

npx skills add alapha888/agent-skills-en

The structure is the stable part; the rules are yours. Take the workflow you explained three times this week, and write it down once.

── more in #ai-agents 4 stories Β· sorted by recency
── more on @alapha888 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/how-to-write-your-fi…] indexed:0 read:2min 2026-10-06 Β· β€”