Skip to content
The 31 guidesFREN中文
Guides
Part 5 · guide 3 of 5 Level: Intermediate Reading time: 12 min

Skills: automating your workflows

When you catch yourself repeating the same instructions to the agent, turn them into a reusable skill. The step that takes you from 'assistant' to 'workshop'.

In this guide
  1. 01Why: repetition is a signal
  2. 02How it works, concretely
  3. 03An example: the /review command
  4. 04The procedure
  5. 05The big picture: your workshop composing itself
  6. 06Frequently asked questions

In short

A skill is a reusable bundle of instructions that the agent runs from a slash command, or loads on its own when the task fits: a folder holding a SKILL.md file (a name, a description, then the instructions). It is now the main mechanism of both Claude Code and Codex, which have put it in place of their old custom commands, and an open format, Agent Skills, that OpenCode, Cursor and Gemini CLI read too. Create one as soon as you type the same instruction twice, and keep the ones that deploy or delete on manual trigger only.

Do this first: Memory files (CLAUDE.md & co)

You’ll recognize the symptom fast. For the third time this week, you’re typing the same long-winded request: “review my diff, look for bugs and secret leaks, list the problems file by file, but don’t fix anything without my approval.” Word for word, every time. That’s precisely the moment to capture that request once and for all, and recall it with a single command.

That’s what a skill is: a reusable bundle of instructions the agent triggers on demand, often via a slash command. Where the memory file is passive context the agent always reads, a skill is an active capability you invoke when you need it. Picture /check-diff (review my diff), /ship (run the tests, bump the version, commit, open the PR), /deploy. One name, and the whole workflow unfolds.

Why: repetition is a signal

The trigger for a skill is always the same: you catch yourself retyping a multi-step instruction. “Run the tests, and if it’s green, commit with a conventional message, then push…” If you’ve written it twice, you’ll write it twenty times.

Capture it once, and you gain three things at a stroke:

  • One command instead of a paragraph. You type /check-diff, done.
  • Consistency. The workflow runs the same every time, you no longer forget the “check for secrets” step because you were in a hurry.
  • Sharing. The skill lives in the repo: your teammates (and their agents) use it as-is.

How it works, concretely

The principle is now the same everywhere: a skill is a folder containing a SKILL.md file. At the top, a small YAML header gives its name and a description; below, your instructions in markdown. The folder can also carry scripts, templates or documentation the agent will consult when needed.

The description matters more than it looks: at startup, the agent reads only the names and descriptions of all your skills, then loads the full content of the one that matches the task. So you can have plenty of them without cluttering its context.

In Claude Code, skills have become the main mechanism. The folder name becomes the command: deploy/SKILL.md gives /deploy.

.claude/skills/<name>/SKILL.md    # project skills (shared via the repo)
~/.claude/skills/<name>/SKILL.md  # global skills (all your projects)

You trigger it yourself with /name, or Claude loads it on its own when your request matches its description. /skills lists the ones available.

The old custom commands (.claude/commands/deploy.md) have been merged into skills: they still work and also create /deploy, but for any new workflow, go with a skill. The fields are detailed in the skills docs.

An example: the /review command

Let’s take the request from the start, your own review. Watch the name: Claude Code already ships a built-in /review (an alias of /code-review, see Review, audit, secure). So give your homemade version another name, check-diff for instance (Codex also has a built-in /review), and write it down once in .claude/skills/check-diff/SKILL.md, or in .agents/skills/check-diff/SKILL.md for Codex and OpenCode:

---
name: check-diff
description: Reviews the current diff and lists the problems without fixing anything. Use when I ask for a review before a merge.
---

Review the current diff against the base branch.

Look for:
- obvious bugs and regressions,
- secret leaks (API key, password, token in plain text),
- unescaped SQL queries or other injections,
- `console.log` and other forgotten debug leftovers.

List the problems grouped by `file:line`, from most serious to most
benign. Be concrete: for each point, say why it's a problem.

Don't fix anything without my approval. End with a verdict: ready to merge, or not.

From then on, /check-diff (or $check-diff in Codex) reruns this exact protocol every time. No more paragraph to retype, no more forgotten step.

The procedure

0 of 4 steps done Your ticks stay in this browser.

  1. Spot the repetition

    The reflex: the moment you think “hey, I’ve typed this before,” stop. That’s your skill candidate. Don’t create it preemptively, wait until the need shows up twice.

  2. Write the instruction once

    Create the skill folder and its SKILL.md in the right place (.claude/skills/deploy/SKILL.md → /deploy). Take care over the description: it’s what tells the agent when to use it. Write the instructions the way you’d say them to the agent: clear, ordered, with the guardrails (“don’t fix anything without my approval”).

  3. Invoke it by name

    In the agent, type /check-diff (in Codex, $check-diff). The skill unfolds. You just turned a paragraph into a single word.

  4. Refine it over time

    As you use it, you’ll see what’s missing or what overflows. Add a criterion, tighten a directive. The skill matures like memory does: through real friction.

The big picture: your workshop composing itself

Sit back and look at what you’ve built across these three guides:

  • Memory (memory files), what the agent knows at all times.
  • Skills: what it knows how to do on command.
  • Framing (framing with an LLM), the quality of what you ask it for in the first place.

Put end to end, this becomes a personal workshop that composes itself. Each project enriches your global memory, leaves you a skill or two to reuse, sharpens your framing patterns. The tenth project starts on the shoulders of the first nine. That’s the whole point: you’re not automating a task, you’re building yourself an environment that makes you a little faster every time.

Frequently asked questions

What is the difference between a skill and the memory file?

The memory file is passive context: the agent reads it every session, and it says what the agent always knows. A skill is an active capability that only wakes up when you call it or when the task fits: it says what the agent does on request. Together, they make up your workshop.

Does having lots of skills clutter the agent's context?

No. At startup, the agent only reads each skill's name and description, then loads the full content only for the one that matches the task. That is why the description matters so much: it tells the agent when to use the skill.

Where do I put a skill so it works in all my projects?

In your agent's global folder, with one subfolder per skill holding its SKILL.md: ~/.claude/skills/ for Claude Code, ~/.agents/skills/ for Codex, ~/.config/opencode/skills/ for OpenCode. A skill stored in the project repository, on the other hand, is shared with your teammates and their agents.

How do I stop the agent from running a deploy or delete skill on its own?

In Claude Code, add the line disable-model-invocation: true to the SKILL.md header: only your explicit call will then trigger it. In Codex, the equivalent goes in an agents/openai.yaml file next to the SKILL.md, with allow_implicit_invocation: false under policy:. A skill that runs commands can do exactly as much damage as a command typed by hand.

Can I name my review skill /review?

Better not: Claude Code already ships a built-in /review, an alias of /code-review, and Codex has one too. Give your version another name, relecture for instance. You then call it with /relecture in Claude Code, or with $relecture in Codex.

Terms in this guide: SkillAgentCommitRepository (repo)MarkdownClaude CodeCodexOpenCode

Spotted a mistake?

A command stopped working, a price changed?

Tools change every month. Tell me what is wrong in this chapter and I will fix it and update its date.

Only the page, your message and the optional contact are kept. Nothing else.

Guide 29 of 31 · part 5 no guides read yet Open the list of guides