Skip to content
← Inforjota
Cursos Inforjota Português

Lesson 2 of 7 · 13 min · Checked on 6 October 2026

Commands, skills and repeatable tasks

By the end of this lesson you will be able to:

  • Use the commands that come built into Claude Code and Codex
  • Create a skill with fixed instructions and call it in both tools
  • Choose between a skill, AGENTS.md and a script, depending on whether the result must come out the same every time

Every Monday, Fátima, at the junta de freguesia (parish council), prepares the week's notice: opening hours of the office, bulky-waste collection, the mass for the village festivities. Before she posts it, she asks the agent to review it.

And every week she writes the same request: “European Portuguese, old spelling, do not change the names, show me what you changed.” (“Old spelling” means the European-Portuguese spelling from before the 1990 Orthography Agreement.) One week she forgets the spelling part, and the notice comes out with “ação” and “projeto”.

The problem is not the agent. It is the request, which changes a little each time it is typed by hand.

The commands that already exist

Both tools come with ready-made commands. Type / at the start of the line and the list appears. Keep typing letters to filter it.

A few you will use in this level, with the same name in Claude Code and in Codex:

  • /diff shows what changed in the files.
  • /review asks for a review of the changes made.
  • /model changes the model (lesson 2/06).
  • /compact summarises the conversation to free up space (lesson 2/05).
  • /init creates the project's instructions file (lesson 1/07).
  • /skills lists the available skills.

A command like these always does the same thing. You are missing one that does your task: reviewing Fátima's notice.

The concept: the skill

A skill is a folder with a file called SKILL.md. The file has a short header (name and description) and, below it, the instructions for the task, written the way you would write them in a request.

The format follows an open standard, Agent Skills. The same file works in Claude Code and in Codex; only the folder you put it in changes.

Example

The SKILL.md file of the skill rever-texto (“review-text”):

---
name: rever-texto
description: Reviews a text in European Portuguese using the spelling from before the 1990 Orthography Agreement. Use when the user asks to review or correct a text.
---

Review the file the user points to.
1. Correct spelling and grammar in European Portuguese, using the spelling from before the 1990 Agreement (projecto, actual, acção, facto; month names with a capital letter, like Outubro).
2. Do not change the meaning or the tone. Do not add sentences.
3. Do not change proper names, numbers or amounts.
4. Before saving, show the list: old word → new word.
5. Save only after I say yes.

The description does two jobs. It tells you what the skill is for. And it lets the agent use the skill on its own when your request fits, for example “review this notice”. So write it with the words you would use when asking.

A skill beats a request typed by hand in three ways: the instructions are always the same, you call it with one word, and it improves in one place only. If the agent changes a street name, you add the rule to SKILL.md and it is fixed for next time.

The alternative: AGENTS.md

In lesson 1/07 you put rules in AGENTS.md or CLAUDE.md. Those files are read at the start of every session. They are for what is always true: “always write in European Portuguese, old spelling”.

A five-step procedure that you use once a week is better as a skill. In AGENTS.md it would take up space in every conversation, even those that have nothing to do with notices. A skill only comes in when it is needed.

Tip

Quick rule: if it is always true, it goes in AGENTS.md. If it is a task with steps that you do from time to time, it is a skill.

What “repeatable” means

A task is repeatable when the same request gives the same result. The skill fixes the request. But the agent is still a language model: two reviews of the same text can come out with small differences.

When the result has to be exactly the same every time (a table with the same columns, a count, a file to print), ask the agent to write a small script, with tests (lesson 2/01). Then you run the script. The Codex documentation says the same: instructions in general, scripts when you need deterministic behaviour.

Watch out

A skill is a list of orders your agent will follow. If you copy a skill made by someone else, read the whole SKILL.md first, and also any scripts that come in the folder. A hidden line like “send the file to this address” would be followed like the others (lesson 2/04).

How it is done today

This is how it looks on 6 October 2026; your screen may differ. Look for the button with the same name.

Claude Code. The skill goes in .claude/skills/rever-texto/SKILL.md, inside the project. You call it with /rever-texto aviso.md (aviso means “notice”). What you type after the name is handed to the skill. If the .claude/skills folder did not exist when you opened the session, run /reload-skills or restart. Older versions used .claude/commands/rever-texto.md, which still works, but the documentation recommends skills.

Codex. The skill goes in .agents/skills/rever-texto/SKILL.md. You call it by typing $rever-texto aviso.md, or by picking it in /skills. The old “custom prompts” are discontinued; use skills. If the skill does not appear, restart Codex.

To create the folders, inside the project:

mkdir -p .claude/skills/rever-texto
mkdir -p .agents/skills/rever-texto

On Windows (PowerShell), drop the -p and swap / for \. Then create SKILL.md in each folder, with the content of the example.

Tip

For Claude Code to use the skill only when you call it, add disable-model-invocation: true to the header, below the description. Useful for tasks that change files.

Tip

Both tools have a helper for creating skills: in Codex, type $skill-creator; in Claude Code, you can ask “create a skill for…”. Always read the result before you save it.

Exercise

How I know it worked before saving, the agent shows a list with ação → acção, projeto → projecto, atividade → actividade and outubro → Outubro. “Ribeira Seca” and “12” stay the same. The file only changes after your “yes”.

If it didn't work

  • The skill does not appear in the list: the file has to be called SKILL.md, in capital letters, inside a folder with the name of the skill. Restart the session.
  • Codex does not find it: the folder is .agents, with an “s”, and Codex has to be opened inside the project.
  • The header gives an error: it has to start and end with a line of three dashes ---.
  • The agent saved without asking: check that step 5 is in the SKILL.md. If it is, restore the notice with git (lesson 1/05) and make the rule clearer.

Sources:

Videos

Claude Code: MCPs e Skills - Tutorial Completo
Hashtag Programação · 40 min · PT-BR · subtitles · Watch on YouTube
In the specified section: what skills are in Claude Code, three ways to create one, a code review skill, using it with a slash command and importing someone else's skill.
What are skills?
Claude · 2 min · EN · subtitles · Watch on YouTube
An official Anthropic video, under three minutes: what skills are, how they work, where they are stored and when to use them.

Test what you learned

1. Every week you write the same six-line request to review the notice from the junta de freguesia (parish council). Sometimes you forget a line. What is the best solution?
2. The list of people signed up for the outing has to come out every day with the same columns, in the same order, to be printed. What do you do?
3. You created .claude/skills/rever-texto/SKILL.md with the Claude Code session open, but /rever-texto does not appear. What do you try first?