By now, you’ve worked with a terminal agent through whole tasks: a fresh session per job, an instruction file it loads every time, small tasks with a done-when, and a review of every change before you keep it. That loop holds up well for one task at a time.
However, some jobs come back every day in the same shape. Typing the same procedure into a chat each time is slow, and a step you leave out one evening is a step the agent never hears about.
In this lesson, you’ll package one of those jobs as a skill, a folder of instructions your agent can load when a task needs it. You’ll write it for a real repository, see how the agent decides whether to use it, and fix the part that decides. Start with the repository and the job you’ll repeat.
Meet the Festival’s Lost-Property Desk
In every lesson, you’ll work on the same small project, so you need it running before anything else. The project is the lost-property desk of a small folk festival. Volunteers log items found around the site, and visitors search for theirs.
It’s a Node.js 26 web app with no framework, built with an agent in a real session, so treat it as a reference version. Your agent will produce different code when you change it, and that’s expected.
If you haven’t set it up yet, unzip the course’s download and open a terminal in the folder it creates, then install, test, and start the app in its lost-property folder with npm:
$ cd lost-property
$ npm install
$ npm test
$ npm start
The npm test summary should report no failing tests. Then npm start serves the search page at http://localhost:3000. Open it, search for “fiddle”, and you’ll see two results that volunteers logged: a green fiddle case with a ribbon and keys on a fiddle-shaped keyring. Stop the server with Ctrl+C when you’re done.
The download is a Git repository with its history, so git status should report a clean working tree on main. These are the parts you’ll meet in this lesson:
data/items.json: Every logged item, with a description, a category, where it was found, and whether it’s been claimedsrc/andpublic/: The code that adds and searches items, and the search pagedocs/issues.md: Four open issues, which you’ll work on in later lessonsCHANGELOG.md: One entry per festival day, saying what changed in the appdocs/map.md: The project map, saying what each part does and which decisions were made and why, kept up to date as the code changes
The project also has an instruction file, which every session loads before your first message. It holds the commands to test and run the app and the few rules every task needs. One file serves Codex and Claude Code:
The rules live in AGENTS.md, which Codex reads. CLAUDE.md is a single line, @AGENTS.md, which imports the same file for Claude Code.
Because the instruction file loads in every session, each line in it costs context in every task, including tasks that have nothing to do with that line. Keep that in mind for the job ahead.
One more habit before your first session: the agent asks before it acts. In this course, every session asks before it edits a file, runs a command, or calls a tool, so you see each step and approve it. That’s your usual approval mode, and later lessons count on it when they say to approve one call or to keep the asking mode. Agents don’t all start that way, so set it now. Open the version for your agent, checked in December 2026:
Start each session with claude --permission-mode manual. In Manual mode, Claude Code asks before edits, commands, and tool calls. Recent versions start new sessions in auto mode, where a classifier approves calls instead of you. In a running session, press Shift+Tab until the mode below your prompt shows manual mode.
Codex’s default mode lets the agent edit files in the project without asking. At the start of each session, type /permissions and choose Read Only, so Codex asks before edits and commands. It pairs a read-only sandbox with on-request approvals.
Spot the Job That Repeats
At the end of each festival day, someone writes that day’s entry in CHANGELOG.md, so the volunteer coordinators know what changed before the next morning. The job has the same steps every time: check that the tests pass, read the day’s commits, and write the entry in the format the team uses.
You could type those steps into a new session every evening. However, you’d have to remember every one of them, every evening. You could also put the steps in the instruction file. Then every session would load them, including the many sessions that fix a bug or add a category and never touch the changelog.
A skill sits between those two. It’s a folder holding a SKILL.md file and optionally scripts and reference files the instructions point to. SKILL.md starts with front matter, a block of key: value lines between two --- lines. This block gives the skill a name and a description. The instructions follow, in plain Markdown.
What makes a skill cheap is when its parts load. At the start of a session, the agent gets only the name and description of each skill it can find. It loads the instructions only when you invoke the skill by name or when it decides a task matches. So you can have many skills, and each one costs a line or two of context until it’s used.
An agent can only pick a skill it lists, though, and the list has a budget. With many skills installed, an agent may shorten descriptions or leave some out. So when a skill isn’t picked, first check that it’s in your agent’s skill list.
Write a First Skill
Here’s a version of the changelog skill, written the way most people write their first one, with a name and a short label as the description:
---
name: changelog-entry
description: Changelog helper.
---
# Write the Day's Changelog Entry
1. Run `npm test`. If any test fails, stop and report
the failing test. Don't write an entry.
2. Find the commits made since CHANGELOG.md last changed.
3. Add an entry at the top of CHANGELOG.md, under a
heading with today's date, such as
`## Saturday, July 18`.
4. Group the changes under `### For volunteers` and
`### For visitors`, one plain-language line each.
5. When a commit fixes an issue from docs/issues.md, end
its line with the issue number, such as (#1).
6. Show me the entry. Don't commit it.
The instructions are the procedure and nothing else. Each step is something you’d otherwise have to remember to say. The folder’s name matches the skill’s name, which uses lowercase letters and hyphens.
Where the folder goes, how you invoke a skill by name, and how you see the skill list depend on your agent. The instructions below were checked in December 2026. Open the version for your agent. Both versions also say how to tell whether a session loaded the skill, which you’ll need in a moment:
Create the file at .claude/skills/changelog-entry/SKILL.md in the repository. A skill in ~/.claude/skills/ would be available in every project instead, which this one doesn’t need. Older custom commands in .claude/commands/ still work, but skills have replaced them.
To invoke the skill by name, type /changelog-entry in a session. To see the skills a session found, ask it, “Which skills are available?” When Claude Code uses a skill, by name or on its own, the session shows a line naming the skill before the steps it runs.
Commit the new skill by its path:
$ git add .claude/skills/changelog-entry
$ git commit -m "Add changelog-entry skill"
Create the file at .agents/skills/changelog-entry/SKILL.md in the repository. A skill in ~/.agents/skills/ would be available in every project instead, which this one doesn’t need. Codex’s older custom prompts are deprecated, and skills have replaced them.
To invoke the skill by name, type $changelog-entry in your message, or pick it from the list that /skills shows, which is also how you see the skills a session found. When Codex uses a skill, by name or on its own, the session shows it reading the skill’s SKILL.md before the steps it runs.
Commit the new skill by its path:
$ git add .agents/skills/changelog-entry
$ git commit -m "Add changelog-entry skill"
Now try the skill the way you’d use it on a tired evening. Start a new session in the repository in your asking mode, so it picks up the new skill, and ask for the job in your own words without naming the skill:
Write up today's changes for the festival team.
Watch what the session does before it writes anything, and approve what it asks to run and edit, because you’ll undo the trial afterward. Then read what it wrote. The only commit since the last entry may be the one that added your skill, so the entry may be short or describe only that. For now, you’re only checking whether the skill loaded.
Make the Description Do Its Job
Your session went one of three ways, and each is normal. The agent may have used your skill: the session showed it loading, the agent ran npm test first, and the entry had the dated heading and the two groups. It may have summarized the commits in the chat or a new file, without the skill. Or it may have edited CHANGELOG.md in its own format, with no test run first.
Check your session for the signs listed above in the instructions for your agent. If you can’t tell, the button below opens a conversation with Code Mentor. Paste your request and the part of the session that shows what the agent loaded and ran, and Code Mentor can help you work out which of these happened:
An entry in the right format doesn’t show that the skill was used, because the commits might lead an agent to a similar entry anyway. Look for the skill loading before the steps.
Why would the agent pass over a skill whose instructions describe this exact job? When it decided, it didn’t have the instructions. It had changelog-entry and Changelog helper., and your request didn’t mention a changelog. The link between “write up today’s changes” and that one-line label is a guess. Even if your agent did pick the skill, it picked it from those few words, and a request phrased differently tomorrow could go the other way.
So the description is what decides whether a skill is ever used on its own. A good one says what the skill does and when to use it, in the words a request would use. It can run over several lines, with continuation lines indented under description::
---
name: changelog-entry
description: Writes the festival day's entry in
CHANGELOG.md from the commits since the last entry,
after npm test passes. Use when asked to update the
changelog, write up today's changes, or write release
notes for the festival team.
---
The first sentence names the task, the file, and the check that comes first. The second lists the ways a person asks for it, including the phrase you typed. Those words give the agent what it needs to match a request. They make a match likely, not certain, because the choice is still the model’s.
Undo the trial first, so the next run starts from the same place. Run git status and git log -1 to see everything the agent changed, including a commit or a new file.
If git log -1 shows a commit your agent made, not your own skill commit, run git reset HEAD~1 first. It removes that commit but leaves its changes in your files as uncommitted edits, so the steps below undo them too. Do the same each time this lesson asks you to undo a trial. Most often, though, only the changelog has changed:
$ git restore CHANGELOG.md
Delete any new file after you’ve read it. Then edit the description, start a new session, and send the same request.
This time, the session will likely show the skill loading. If it doesn’t, you haven’t made a mistake. That’s “likely, not certain” at work. Check that the skill is in your agent’s skill list, and add the words you used to the description.
Whether or not the skill loaded, undo the trial again, and then try the skill by name, with your agent’s command from the version above. Invoking by name loads the skill whatever the description says, so it’s the dependable way to run a job you know you want. The description matters for the times you don’t name it.
Before you commit the new description, test it against a few more ways you’d phrase the job:
When you’re happy with it, undo the last trial’s changes. Check that git status shows only your SKILL.md as changed, and then commit it with git commit -am "Describe when to use the changelog skill".
Check Your Understanding
Answer these before you open the answers:
- A project has a skill whose front matter is
name: releaseanddescription: Release stuff.. Its instructions say to collect the merged pull requests since the last tag and write aCHANGELOG.mdentry. You ask, “Write the changelog entry for 2.3.” What does the agent have to go on when it decides whether to use this skill? - Rewrite that description so the request in question 1 would likely load the skill.
- Your teammate’s skill works every time they type its name, but never when they ask in their own words. What’s the likely cause, and where do you look first?
- Only the name,
release, and the description,Release stuff.. The steps aren’t loaded until the skill is chosen, and nothing in that name or description mentions a changelog, so the agent may well pass it over. Invoking it by name would load it regardless. - One version: “Writes a
CHANGELOG.mdentry from the pull requests merged since the last tag. Use when writing a changelog or release notes.” It says what the skill does and when to use it, in the words a request would use. - Most likely the description. Invoking by name loads a skill whatever its description says, but a plain request depends on the description matching the words they use. Check that the skill is in the agent’s skill list, and then compare its description with the requests they make.
You now have a changelog skill with a description that names the task and the words a request would use. You’ve tried it by name and with a plain request.
One question is still open. The instructions say to stop when a test fails, but they’re text the model reads, so a session can still skip that step. In the next lesson, Decide Where Guidance Lives, you’ll work out which steps belong in the instruction file, which in a skill, and which in a script that runs every time.