It's a SKILL.md issue
Today's topic: Coding agent skills.
If you're not familiar, this is a way to advise and enhance what an AI coding agent is doing. And it's context-specific; you could have (say) a Python skill that applies when you write Python programs, or a data-science skill when you're slinging around dataframes, or a webservice skill if you're writing a web service.
Its core is a file named SKILL.md, which I could write a small book about...
But the short version is that it holds text, which gets injected into your prompt. Dynamically, when it is helpful for the current task.
Of course, a bad agent skill does more harm than good. What's the best way to make it?
My favorite approach:
Construct the SKILL.md file piece by piece, as I find myself repeating the same instructions in my prompts. When I notice I keep repeating a sentence, I copy it into the SKILL.md file, so I don't have to repeat it again.
As an example, let's say whenever I agentically code a Python program, I notice it keeps using double-quotes for strings. But I want it to use single quotes, because why are we typing shift if we don't have to? So I add this to the SKILL.md file:
"Prefer single-quotes instead of double-quotes for strings."
Or let's say the coding agent keeps creating a requirements.txt file, but I want something more modern. So I add this to SKILL.md file:
"Store dependencies in pyproject.toml instead of requirements.txt."
Or I want my coding agent to write unit tests. But I find it over-uses mocks, so I have to tell it to not use mocks so much. Also I find the unit tests it makes are often too pinpointed and thus fragile. Once I have gotten sick of that, I'll put this in the SKILL.md file:
"Write unit tests when they are beneficial. In the tests, avoid mocks unless they are necessary. Prefer end-to-end tests instead of overly pinpointed unit tests."
The key point is that I don't add these instructions until the coding agent shows me it needs them.
I'm not proactively creating the SKILL.md, slopping in all the instructions I think the agent might need, polluting the LLM's context. Instead, I give it a chance to do the right thing first, and only add to the SKILL.md file as it becomes clear the agent needs them.
There's a lot more to say about agent skills. Including HOW to tell the coding agent when it should load those skills, and when not to.
All of which you learn in the Agentic Coding Foundations course of Boosted Code. If you did not join already, read about it here: