|
| 1 | +--- |
| 2 | +draft: false |
| 3 | +title: Everything you need to create your first skill as a developer |
| 4 | +date: 2026-05-15 |
| 5 | +image: |
| 6 | + src: /content/images/everything-you-need-to-create-your-first-skill-image.jpg |
| 7 | +--- |
| 8 | + |
| 9 | +> It's 2026, your work probably asked you to use AI, but your security department won't help you... Skills are the easiest way to get started, but they are still text-based and can behave unreliably... Here is the workflow I use as a developer. |
| 10 | +
|
| 11 | +<!--more--> |
| 12 | + |
| 13 | +## Quick definition |
| 14 | + |
| 15 | +(Agent) Skill are a standardized way to give AI agents new capabilities and expertise. They follow the [open agent skills standard](https://agentskills.io/home). **I strongly advise you to start here**. |
| 16 | + |
| 17 | +<RichLink href="https://agentskills.io/home" title=""></RichLink> |
| 18 | + |
| 19 | +Here are the main things to remember: |
| 20 | + |
| 21 | +- skills are files / folders of markdown text. |
| 22 | +- SKILL.md is the entry point, other folders are (scripts, references, assets) |
| 23 | +- skills lifecycle is: discovery (skill content and metadata), activation (from your agent), execution. |
| 24 | +- skills metadata most important part is the `description`, as it should also include the skill trigger (activation). |
| 25 | +- do not create a single of file of thousands lines (it will blow up your context window). use (progressive disclosure)[https://agentskills.io/specification#progressive-disclosure]. |
| 26 | +- for complex or long tasks use [workflow](https://agentskills.io/skill-creation/best-practices#checklists-for-multi-step-workflows) |
| 27 | + |
| 28 | + |
| 29 | +## Writing your own skill |
| 30 | + |
| 31 | +Let's create our first skill ! I want to create a skill to enforce the usage of the recent [useTemplateRef](https://vuejs.org/api/composition-api-helpers.html#usetemplateref) in Vue.js instead of the generic `ref` primitive. |
| 32 | + |
| 33 | +The good thing about creating a skill is that you can get help from... well, more skills ! [Anthropic](https://github.com/anthropics/skills/tree/main/skills/skill-creator) and [OpenAI](https://github.com/openai/skills/tree/main/skills/.system/skill-creator) even provides their own ! |
| 34 | + |
| 35 | +Let's generate it (codex-cli 0.130.0, gpt-5.4 medium): |
| 36 | + |
| 37 | +> $skill-creator create a SIMPLE skill to enforce the usage of useTemplateRef instead |
| 38 | +of ref when coding with vue.js, make sure to check vue version before |
| 39 | +enforcing the rule. |
| 40 | +> |
| 41 | +> Keep it short and not codex specific. |
| 42 | +> |
| 43 | +> https://vuejs.org/api/composition-api-helpers.html#usetemplateref |
| 44 | +> https://vuejs.org/guide/typescript/composition-api.html#typing-template-refs |
| 45 | +> https://vuejs.org/guide/typescript/composition-api.html#typing-component-template-refs |
| 46 | +
|
| 47 | +Here is our very own first skill ! it's not perfect, since type can be auto-infered, but it was to show how to use it with the skill-creator. |
| 48 | + |
| 49 | + |
| 50 | +~~~markdown[.agents/skills/use-use-template-ref/SKILL.md] |
| 51 | +--- |
| 52 | +name: vue-use-template-ref |
| 53 | +description: Prefer `useTemplateRef()` over `ref()` for Vue template refs when editing Vue code, Vue SFCs, or Composition API examples. Use when the task involves DOM refs or component template refs, but check the Vue version first and enforce this only when the project is on Vue 3.5+ or otherwise supports `useTemplateRef()`. |
| 54 | +--- |
| 55 | +
|
| 56 | +# Vue Use Template Ref |
| 57 | +
|
| 58 | +Check the Vue version before changing anything. |
| 59 | +
|
| 60 | +- If Vue is 3.5+ or the project already uses `useTemplateRef()`, prefer `useTemplateRef()` for template refs. |
| 61 | +- If Vue is older, keep `ref()` and do not enforce a migration. |
| 62 | +- Apply this only to template refs. Do not replace ordinary reactive state refs. |
| 63 | +
|
| 64 | +Use patterns like: |
| 65 | +
|
| 66 | +```ts |
| 67 | +const el = useTemplateRef<HTMLInputElement>('el') |
| 68 | +const child = useTemplateRef<InstanceType<typeof ChildComponent>>('child') |
| 69 | +``` |
| 70 | +
|
| 71 | +Avoid patterns like: |
| 72 | +
|
| 73 | +```ts |
| 74 | +const el = ref<HTMLInputElement | null>(null) |
| 75 | +const child = ref<InstanceType<typeof ChildComponent> | null>(null) |
| 76 | +``` |
| 77 | +~~~ |
| 78 | + |
| 79 | +### Validating the skill |
| 80 | + |
| 81 | +Let's not forget to make sure everything is ok, you can use |
| 82 | +- [skill-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref) |
| 83 | +- [agent-ecosystem/skill-validator](https://github.com/agent-ecosystem/skill-validator) (**My recommandation**) and `skill-validator check --strict .agents/skills/vue-use-template-ref` |
| 84 | + |
| 85 | + |
| 86 | +## Testing the skill |
| 87 | + |
| 88 | +To make it short, evals are unit test for LLM behavior. My current idea is to use the [evalite.dev](https://v1.evalite.dev/) framework from the famous [@mattpocock](mattpocock). |
| 89 | + |
| 90 | +### Define the behavior you want |
| 91 | + |
| 92 | +For this Vue skill, I only care about a few concrete behaviors: |
| 93 | + |
| 94 | +- On Vue 3.5+, template refs should be migrated to `useTemplateRef()`. |
| 95 | +- On Vue 3.4, the skill should not force that migration. |
| 96 | +- Ordinary state refs should stay ordinary state refs. |
| 97 | + |
| 98 | +That is already enough to start. You do not need fifty cases on day one. You need a few cases that represent the behavior you actually care about. |
| 99 | + |
| 100 | +### Turn those behaviors into evals |
| 101 | + |
| 102 | +I use Evalite because it makes it easy to define cases, run them repeatedly, and inspect the results. |
| 103 | + |
| 104 | +In practice, each behavior becomes a small eval case: |
| 105 | + |
| 106 | +- a fixture file to edit |
| 107 | +- a user-style request |
| 108 | +- some context, like the Vue version |
| 109 | +- a few rules that tell me whether the result is acceptable |
| 110 | + |
| 111 | +In order to keep this article short, you can find a concrete example on my Github, have a look ! <RichLink href="https://github.com/adrienZ/skill-development-demo" title="adrienZ/skill-development-demo"></RichLink> |
| 112 | + |
| 113 | +## Conclusion |
| 114 | + |
| 115 | +Creating a skill can make a big difference in your everyday life, but they are "just" text and the ouput of you LLM can vary. |
| 116 | + |
| 117 | +As developer we have tools to make this better |
| 118 | +- standard: Open agent skill |
| 119 | +- "linters": skill-ref, skill-validator |
| 120 | +- unit-test: evals |
| 121 | + |
| 122 | +To be honest, my knowledge on evals is quite new, there is things to improve, A/B testing and model temperature could be good way to make a skill more reliable. Current evals systems are also not as structured as traditional unit tests are, this may change in the future ! |
| 123 | + |
| 124 | +If you want to learn more about evals, here some references from people who knows what they are doing 😝 |
| 125 | +- https://platform.claude.com/docs/en/test-and-evaluate/eval-tool |
| 126 | +- https://agentskills.io/skill-creation/evaluating-skills |
| 127 | +- https://developers.openai.com/blog/eval-skills |
| 128 | + |
0 commit comments