By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
Every deploy on your team follows six steps. Someone pasted them into a chat session in June. Since then each engineer types a slightly different version, and a session under time pressure skips step four.
A teammate copied the checklist into CLAUDE.md. Now every session carries six steps it needs once a week, and a hotfix deploy still skipped the fourth one. The instruction was not too weak. It was in the wrong mechanism.
Claude Code gives you five ways to teach it how your team works. Each one loads at a different moment, and that moment is the whole difference.
A command or a Skill, because both start at the beginning of a task. Read on to see which one the helper script forces.
The table below is the whole mental model. Read it by the second column, because the trigger is what the exam asks about.
| Mechanism | Who starts it | Where it lives | What it costs |
|---|---|---|---|
| Command | You, by typing /name | .claude/commands/<name>.md | The body, once you invoke it |
| Skill | The model, when the description matches the task | .claude/skills/<name>/SKILL.md | A name and a description every turn; the body on use |
| Rule | The path of the file being read or edited | .claude/rules/<topic>.md | Nothing until a matching file opens |
| Agent | The model, by delegating a task | .claude/agents/<name>.md | A delegation message; the worker gets its own context |
| Memory | Every session, at launch | CLAUDE.md at four levels | Every token, on every turn |
A command waits for you. A Skill waits for a matching task. A rule waits for a matching file. An agent waits for a delegation. Memory never waits at all, which is why it is the most expensive row.
Slash commands are the typed entry point. Some ship with the tool, such as /clear, /compact, /init and /context, and run fixed behaviour. The rest are files you write. Both kinds share one namespace, so a file of yours that uses a built-in name replaces that command in a terminal session.
A command is a markdown file whose body becomes your prompt. You type /release-check web, and the body is sent with your arguments filled in. Frontmatter declares the description, the argument hint and the tools the command may use.
---
description: Run the release checklist for one service before a deploy
argument-hint: <service-name>
allowed-tools: Read, Grep, Bash(git status *), Bash(git log *)
---
Run the release checklist for $ARGUMENTS. Work through the items in order and
stop at the first one that fails.
1. Confirm the branch is `release/$ARGUMENTS`, not `main`.
2. List the last three commits, and flag any change to a database migration.
3. Check that no `.env` file is staged.
4. Run the test command from `CLAUDE.md` and paste the last ten lines.
5. List the open risk items in `docs/release/$ARGUMENTS.md`.
6. Print the next step a person must take, or `ready to deploy`.A Skill is a folder with a SKILL.md and any files the procedure needs. Only the name and the description sit in context by default. The body loads when the model decides that the task matches, or when you type the name yourself.
---
name: release-notes
description: Writes release notes from merged pull requests. Use when the user asks for release notes, a changelog or a summary of what shipped since the last tag.
allowed-tools: Read, Grep, Bash(git log *), Bash(gh pr list *)
---
## Merged work since the last tag
!`git log --oneline $(git describe --tags --abbrev=0)..HEAD`
Group the changes above into Added, Changed and Fixed. Put the pull request
number on every line. Leave out internal refactors and test-only changes.
Use the template in `templates/notes.md` for the heading.The description is a routing rule. Name the request that should load the Skill, and name the nearby request that should not. Write it for the model, not for your teammates.
A command and a Skill look alike, and the exam asks you to tell them apart. The test is who starts the work. A command is explicit: a person types it. A Skill is discovered: its description has to win the model's attention.
A rule is a convention that applies to some files, not all of them. Put it in .claude/rules/ with a paths list of glob patterns. The rule loads when the session reads, writes or edits a matching file.
---
paths:
- "src/api/**/*.{ts,tsx}"
- "tests/api/**/*.ts"
---
# API conventions
- Every handler validates its input with the shared `parseBody` helper.
- Errors return `{ "error": { "code", "message" } }`, never a bare string.
- A new endpoint needs one test in `tests/api/` and one OpenAPI comment.
- Money is stored in integer cents. Never use a float for an amount.Rules save context. Twelve conventions loaded at launch cost every session. The same twelve behind globs cost nothing until they apply. Use a rule for a convention, and CLAUDE.md for the facts that matter in every session.
A rule that loads at launch is fine too: omit paths. The exam wants the distinction, not an assumption that every rule carries a glob.
An agent is a separate session with its own system prompt, its own tool list and its own model. The main conversation hands over a task and receives a summary. Four thousand lines of test output never enter your context.
---
name: test-runner
description: Runs the test suite and reports only the failing tests, with the shortest log that explains each failure. Use after a change under src/ or tests/.
tools: Read, Grep, Bash(npm test *)
model: haiku
---
Run `npm test`. Report each failing test on one line: file, test name and the
assertion that failed. Then add the smallest section of the log that explains
the cause. Do not propose fixes and do not paste stack traces.Keep the description short. Every agent description sits in context on every turn, and Claude Code warns when the combined set grows past its limit. The body loads only when the worker starts.
Use an agent when the work is self-contained and verbose. Keep the task in the main conversation when it needs back-and-forth, because a worker that starts fresh has to rebuild the context it needs.
Memory is what you want in every session: the build command, a naming convention, the rule that a migration needs a review. You write it in CLAUDE.md, and it loads at launch. Step 35 covers the four levels.
Claude can also keep its own notes in auto memory, which is a separate store per project. Read or edit it with /memory. Auto memory holds what the model learned from your corrections; CLAUDE.md holds what you decided.
Memory is the only mechanism that costs context on every turn. Keep it to facts, keep it short, and move anything with steps or a path into the mechanism that loads on demand.
CLAUDE.md.Key takeaways
A command is typed, a Skill is discovered, a rule is path-scoped, an agent is delegated, and memory is always on.
A Skill keeps a name and a description in context and loads the body only when the task matches.
A rule in .claude/rules/ uses a paths glob list and loads on the first matching file.
An agent gets its own context, tool list and model, so verbose work stays out of the main conversation.
Memory costs every turn, so it holds facts, not procedures.
Write every Skill and agent description as a routing rule: when to use it, and when not to.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.