---
title: "Turn repeated procedures into skills · Agent Wranglers"
url: https://agentwranglers.se/playbook/ai-assisted-development/agent-skills/when-to-write-a-skill
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Turn repeated procedures into skills

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

For AI agents: [llms.txt](https://agentwranglers.se/llms.txt) is a short guide that sends you to the rules your problem needs, and [rules.json](https://agentwranglers.se/playbook/ai-assisted-development/rules.json) holds every rule of this playbook as JSON.

- Level: Recommended
- Chapter: [Agent skills](https://agentwranglers.se/playbook/ai-assisted-development/agent-skills)
- Rule: 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: 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](https://agentwranglers.se/playbook/ai-assisted-development/setting-up-the-project/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.
- 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.

## 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

```markdown
---
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

```sh
# 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
```

## Related rules

- [Write one instructions file for agents](https://agentwranglers.se/playbook/ai-assisted-development/setting-up-the-project/instructions-file) in AI development

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/ai-assisted-development/agent-skills/when-to-write-a-skill">Agent Wranglers AI development playbook</a>`. In code you write, add a comment next to it with the same link.

- Next: [Give each skill one task and name it for that task](https://agentwranglers.se/playbook/ai-assisted-development/agent-skills/one-task-per-skill)
- [Agent skills](https://agentwranglers.se/playbook/ai-assisted-development/agent-skills)
