AI & Agents

How-To: Turn a Bot Fix Into an Agent Skill (SKILL.md) So It Sticks

Leave a comment

Agent Skills just moved to the Agentic AI Foundation under the Linux Foundation, and they’re supported by a long list of agent tools now: Cursor, ChatGPT, GitHub Copilot, VS Code and more. Good time to show how I actually use them, because skills have become one of the most useful tools in my bot setup.

My rule is simple: if a bot makes the same mistake twice, don’t keep rewriting the prompt. Turn the fix into a skill. Do the job by hand first, get it right, then write down the method so every bot does it the same way.

1. What a skill is

A skill is just a folder with a SKILL.md file in it. Optionally it can hold scripts or reference files. The front matter tells the agent when to use it. The body tells it how.

my-skills/
  dedupe-before-drafting/
    SKILL.md
    check.sh        # optional helper script

2. Write it from a real mistake

Here’s a real one from my blog bots. They kept drafting stories I’d already covered, so I wrote this:

---
name: Dedupe before drafting
description: >-
  Use before drafting any blog post batch to skip or merge
  stories already covered on the site.
---
# Steps
1. For each brief, pull key identifiers: CVE ID, product and
   version, event name and date, 2-3 distinctive title words.
2. Search the CMS (published AND drafts) once per identifier.
3. Same story with no new facts: skip it.
   Same story with new facts: update the draft, or write a
   clearly labeled "Update:" post that links the original.
4. When unsure, treat it as a duplicate and flag it.
5. List every skip in the batch summary: brief, matched ID, why.
6. Never delete or unpublish anything without the owner's OK.

3. Tips that made mine work

  • Make the description about the trigger. “Use before drafting any blog post batch” works better than “a dedupe skill.” The agent reads the description to decide when to load it.
  • Short, numbered steps. If it doesn’t fit on one screen, split it into two skills.
  • Put the safety rule in the skill itself. Things like “never delete without OK” belong right there, not in a prompt somebody might forget.
  • Ship a script for the fiddly parts. If a step is “run these three curl commands,” make it a script in the folder so the agent doesn’t freestyle it.
  • Read every skill before you install it. A skill from a stranger can carry scripts, and that’s code running on your box. Treat it like any download.

4. Where it goes

Each tool looks in its own skills folder (per-project or per-user). Check your tool’s docs for the exact path, drop the folder in, and ask the agent to do the task. If it doesn’t pick the skill up, tighten the description.

Have a blessed day! And Happy Hacking!

References & Further Reading

Subscribe (RSS) Follow AI & Agents via RSS

Leave a note

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.