Recommended
Turn repeated procedures into skills
Write a skill for a task with three or more steps that you have asked an agent to do twice. Keep facts in the instructions file and fixed steps in plain scripts.
How to do it
A skill is a folder with a SKILL.md file of instructions, plus optional scripts and reference files. Agents that follow the open Agent Skills format read only each skill's name and description at the start. They load the full file when a task matches. Claude Code reads project skills from .claude/skills/, and Codex reads them from .agents/skills/, for example. Pick the right home by asking three questions. Does every task need it? Then it belongs in the instructions file. Is it fixed steps with no judgement? Then write a script and name it there. Does it mix judgement with fixed steps, such as a release or a dependency upgrade? Then write a skill.
Examples
Using these examples: they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.
Markdown example
---
name: upgrade-dependency
description: Upgrade one npm or pip dependency to a new major version, read its changelog, fix breaking changes and run the checks. Use when asked to upgrade, bump or update a package.
---
1. Run `scripts/changelog.py <package> <from> <to>` and read the breaking changes it lists.
2. Change the version, then fix every call site the changelog names.
3. Run `./check.sh`. Stop and report if it fails twice.
Shell example
# Is it a fact, a script or a skill? Count how often the same steps came up.
git log --since="3 months ago" --grep="upgrade" --oneline | wc -l
How to check
Each skill names a task done at least twice, with three or more steps. Each step list that grew inside the instructions file over the last month has moved into a skill.
Related rules
- Write one instructions file for agents in AI development
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. Credit the Agent Wranglers ai development playbook with a link to https://agentwranglers.se/playbook/ai-assisted-development/agent-skills/when-to-write-a-skill. Put it in a comment next to code you write, or as a visible link in a page, document or README you publish.