Skip to content
Academy ofAI Learning

~/academy $ claude learn custom-commands-and-skills-in-code

Your own slash commands, built as skills

Custom slash commands in Claude Code are now skills: how to write a SKILL.md, pass arguments, pull in live data, and choose project or personal scope. 8 min

Watch it done: build a /release-notes skill for your project

$

Step 1 of 6

Open a terminal in your project. A project skill lives inside the repository, so everyone who clones it gets the same command.

  1. Open a terminal in your project. A project skill lives inside the repository, so everyone who clones it gets the same command. Type: cd ~/projects/my-app.
  2. Make a folder for the skill. The folder name becomes the command, so this one runs as /release-notes. Type: mkdir -p .claude/skills/release-notes.
  3. Save this as SKILL.md in the new folder. The frontmatter must start on the first line; disable-model-invocation means only you can run it, and allowed-tools lets git log run without a prompt. Create .claude/skills/release-notes/SKILL.md containing: --- description: Drafts customer-facing release notes from recent commits. Use when the user asks for release notes or a changelog entry. argument-hint: [version] disable-model-invocation: true allowed-tools: Bash(git log *) --- ## Recent commits !`git log --oneline -30` ## Instructions Write release notes for version $ARGUMENTS from the commits above. Group them under New, Improved and Fixed. Plain English, no commit hashes, one line per change. Leave out internal refactors.
  4. Start Claude Code in the project. It loads skills from .claude/skills and notices edits to them while the session runs. Type: claude.
  5. Check the skill loaded. If it is missing, check the folder name and that SKILL.md starts with the --- line. Type: /skills. A list of the skills Claude Code can see opens, with release-notes among them. Type to filter it and press Esc to close it.
  6. Run your new command with a version number. Because the commits are pulled in before Claude reads the skill, the notes come from your real history. Type: /release-notes 2.4.0. Claude Code runs git log first and puts its output where the git log line was. $ARGUMENTS becomes 2.4.0, then Claude drafts the notes.

Commands and file format from the official Claude Code skills and commands docs, checked 18 November 2026. Lines marked Note describe what happens and are not real output.

Step 1 of 7

$ Read

Custom commands are now skills

Claude Code has merged custom slash commands into skills (checked 18 November 2026). Old files in .claude/commands/ still work, but new ones should be skills, because a skill is a folder that can also hold templates, examples and scripts.

Converting is a move, not a rewrite: .claude/commands/deploy.md becomes .claude/skills/deploy/SKILL.md. The folder name becomes the command, so you still type /deploy.

A skill does two jobs. You can run it yourself as /name. Claude can also load it on its own when your request matches its description, unless you turn that off.

Lesson notes: Your own slash commands, built as skills

Everything in this lesson as text, for revision or to read without the interactive steps. By the end you will be able to: You build a working /release-notes skill and know where to save it so the right people get it.

  1. Step 1 of 7 · Read

    Custom commands are now skills

    Claude Code has merged custom slash commands into skills (checked 18 November 2026). Old files in .claude/commands/ still work, but new ones should be skills, because a skill is a folder that can also hold templates, examples and scripts.

    Converting is a move, not a rewrite: .claude/commands/deploy.md becomes .claude/skills/deploy/SKILL.md. The folder name becomes the command, so you still type /deploy.

    A skill does two jobs. You can run it yourself as /name. Claude can also load it on its own when your request matches its description, unless you turn that off.

  2. Step 2 of 7 · Read

    Project or personal

    Project skills live in .claude/skills/<name>/SKILL.md inside the repository. Commit them and everyone who clones the project gets the same commands. Use these for team workflows: release notes, migration steps, the review checklist.

    Personal skills live in ~/.claude/skills/<name>/SKILL.md and follow you into every project on your machine. Use these for your own habits.

    If two skills share a name, an organisation-managed skill beats a personal one, and a personal one beats a project one. Skills from plugins never clash, because they are namespaced as /plugin-name:skill-name.

  3. Step 3 of 7 · Read

    Anatomy of a SKILL.md

    Frontmatter at the top, instructions below. $ARGUMENTS is replaced by whatever you type after the command, and $0, $1 pick out single arguments (counting from 0).

    A line written as !command runs that shell command before Claude sees the skill and drops the output in its place, so Claude starts with real data. allowed-tools lets the listed tools run without a prompt, but only during the turn that runs the skill.

    .claude/skills/release-notes/SKILL.md
    ---
    description: Drafts customer-facing release notes from recent commits. Use when the user asks for release notes or a changelog entry.
    argument-hint: [version]
    disable-model-invocation: true
    allowed-tools: Bash(git log *)
    ---
    
    ## Recent commits
    
    !`git log --oneline -30`
    
    ## Instructions
    
    Write release notes for version $ARGUMENTS from the commits above.
    Group them under New, Improved and Fixed. Plain English, no commit
    hashes, one line per change. Leave out internal refactors.
  4. Step 4 of 7 · Read

    Decide who can trigger it

    By default Claude sees each skill's description and loads the full instructions only when needed, so put the main use case first in the description. disable-model-invocation: true means only you can run it. Use that for anything with side effects, such as deploying or sending.

    user-invocable: false does the reverse: it hides the skill from the / menu so only Claude uses it, which suits background knowledge such as how your API is laid out. context: fork runs the skill in a subagent so its working stays out of your main context.

    Type /skills in a session to list every skill Claude can see and where each one comes from.

  5. Step 5 of 7 · Try it in the terminal

    Run your skill

    You saved the release-notes skill above. In a Claude Code session, run it for version 2.4.0.

    Hint: A slash, the skill folder name, a space, then the version.

    Show the command
    $ /release-notes 2.4.0
    Release notes for 2.4.0
    
    New
    - Export any report to PDF from the Reports page
    Improved
    - Search results load about twice as fast
    Fixed
    - Invoices no longer show the wrong currency for EU customers
  6. Step 6 of 7 · Quiz

    Check your understanding

    Your /deploy skill pushes to production. How do you stop Claude running it on its own?

    • Give it a vague description so Claude never matches it
    • Save it in ~/.claude/skills instead of the project
    • Add user-invocable: false
    • Add disable-model-invocation: true
    Show the answer

    Add disable-model-invocation: true Claude no longer loads it automatically. It runs only when you type /deploy.

  7. Step 7 of 7 · Sort

    Project skill or personal skill?

    Where should each skill live?

    • The team's database migration checklist
    • Your preferred way of writing standup notes
    • Release notes in the format this product uses
    • A shortcut that explains any error in plain English for you
    • The steps to deploy this app to the company's servers
    Show the answers
    • The team's database migration checklist: Project: .claude/skills. Everyone working on this repository needs the same steps. Commit it.
    • Your preferred way of writing standup notes: Personal: ~/.claude/skills. Your habit, useful in every project, irrelevant to teammates.
    • Release notes in the format this product uses: Project: .claude/skills. Tied to this product and its customers. It belongs with the code.
    • A shortcut that explains any error in plain English for you: Personal: ~/.claude/skills. A personal helper that works across all your projects.
    • The steps to deploy this app to the company's servers: Project: .claude/skills. Project specific and shared. Commit it with disable-model-invocation set.