By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
Every Friday, an engineer asks Claude Code to draft release notes from the git log. Every engineer phrases it differently. One answer is a bullet list, the next is three paragraphs, and the third forgets the breaking change. The reviewer rewrites all three.
The prompt is the problem. It lives in someone's shell history, so it cannot be reviewed, versioned or improved. Move it into the repository as a slash command.
A slash command is a markdown file that you invoke by typing /name. The body of the file becomes the prompt. A block of frontmatter on top adds metadata; frontmatter is the set of key: value lines between two --- markers at the start of the file.
They see it only if the file is committed in the repository. A command under .claude/commands/ belongs to the project and travels with a clone. A command under ~/.claude/commands/ belongs to your machine and travels with nobody. That is the first question to ask about any Claude Code artifact: does this need to be shared?
| Artifact | Path | Who gets it | How it starts |
|---|---|---|---|
| Project command | .claude/commands/<name>.md | Everyone who clones | You type /name |
| Personal command | ~/.claude/commands/<name>.md | You | You type /name |
| Project skill | .claude/skills/<name>/SKILL.md | Everyone who clones | Claude selects it, or you type /name |
| Personal skill | ~/.claude/skills/<name>/SKILL.md | You | Claude selects it, or you type /name |
---
description: Draft release notes from the commits since the last tag
argument-hint: [version]
allowed-tools: Bash(git log:*), Read, Grep
---
Draft release notes for version $ARGUMENTS.
1. Read the commits with `git log --oneline <previous-tag>..HEAD`.
2. Group them under Added, Changed and Fixed.
3. Quote the pull request number for every item.
4. Leave out commits whose message starts with `chore:`.
Return the notes only. Do not edit any file.$ARGUMENTS is replaced by whatever follows the command name, so one file serves every release. The body is ordinary instructions: a short numbered procedure and one line about what not to do.
A skill is a folder with a SKILL.md inside it. It is for a capability rather than a fixed prompt: a procedure that needs a few decisions, loaded when the work calls for it.
---
name: dependency-audit
description: Audit a Python service for outdated and vulnerable dependencies. Use when the user asks for a dependency review or a security pass.
context: fork
allowed-tools: Read, Grep, Bash(pip list:*), Bash(pip-audit:*)
---
## Procedure
1. Read `pyproject.toml` and list the direct dependencies.
2. Run `pip list --outdated` and note every major-version gap.
3. Run `pip-audit` and record every advisory id.
4. Report a table with four columns: package, current, latest, action.
Do not upgrade anything. This skill reports; a human decides.Claude chooses a skill by reading its description, so say when to use it, not only what it does. A forked context is a separate conversation that starts from the skill's instructions and returns a result. It keeps a long audit from filling the transcript you are working in.
| You need | Use | Why |
|---|---|---|
| The same prompt, the same shape, every time | Slash command | You invoke it and the body is fixed |
| A capability Claude should choose by itself | Skill | The description is the trigger |
| A fact that applies to every request | CLAUDE.md or a rule | Always loaded, or loaded by path |
| A narrower tool surface for one workflow | allowed-tools on either | The permission travels with the artifact |
A common mistake is to put a long deciding procedure in a command and expect the same result every time. Commands are good at a fixed shape. Skills are good at a procedure that branches.
Create .claude/commands/changelog.md in a repository you own. Add description and argument-hint.
Limit allowed-tools to the two or three tools the command truly needs.
Run it twice with different arguments. The shape should match both times.
Write a skill for a review you do by hand, with context: fork and a description that says when to use it.
Ask a teammate to run the command from a fresh clone without your help.
Definition of done: the command works from a clean clone, and a teammate can use it without asking you what to type.
Key takeaways
A slash command is a markdown file in .claude/commands/, invoked by name.
Frontmatter fields such as description, argument-hint and allowed-tools are the policy.
A skill is .claude/skills/<name>/SKILL.md, chosen by its description.
context: fork runs a skill in a separate context so it does not crowd the main one.
Name the tools you need. A wildcard permission is a promise you cannot keep.
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.