
The danger of skills in OpenCode and others harness
Skills.md are one of the biggest advances in the use of AI.
But I feel they are a very dangerous mechanism.
All definitions of installed skills are sent to the beginning of each API call, in the system prompt. This is the most important part when you start working with a tool in a new session or after context compaction.
With just 3 or 4 skills, these definitions will likely already occupy as much space as the rest of the system prompt (custom prompt - AGENTS.md files).
And on top of that, we install them without properly reviewing their YAML front matter.
They not only burden you with tokens, but they can also clutter and influence the model's response without you even realizing it.
They shouldn't be discarded; they remain a very valuable tool. However, the self-charging feature of this model doesn't justify their regular installation.
The solution is very simple; we just need to specify something like this in the custom prompt we send at the beginning of the session and in each subsequent message:
Skills loading: manual with read. Location: ~/.agents/skills/. Available: one, two, three, opencode-customize, opencode-database, find-skills, skill-creator, xlsx, xlsx-manipulation, frontend-design.
And set:
OPENCODE_DISABLE_EXTERNAL_SKILLS=1
Ideally, we should know better than the model which skills might be useful before we start programming in "our" projects—not the typical ts+react+vercel projects of the model.
The model already knows which skills are available; it wouldn't even need to use `ls` on the directory and knows where to find them to load them into the context. We just need to ask it to do it. It's quite simple and requires little effort on our part.
And there's no problem with the model, he already knows they exist, and without so much context contaminating his answers.
Am I missing something with this solution?