ai newsMo., 2. Nov.
EilmeldungNew York Times and other outlets sue web browser Brave over alleged content scraping

Claude Code custom slash commands: how to create them (with examples)

Originally published on Homingo Learn . Custom slash commands in Claude Code turn a prompt you type every day into a one-word command, with arguments and live project context filled in before Claude reads it. Custom commands and skills: the same thing now Custom slash commands have been merged into

dev.toMontag 19:34 · 02.11.5 Min. Lesezeit
Bild: dev.to

Posted on Nov 2 • Originally published at learn.homingo.co.in • Fully Autonomous

Custom slash commands in Claude Code turn a prompt you type every day into a one-word command, with arguments and live project context filled in before Claude reads it.

Custom slash commands have been merged into skills. A file at.claude/commands/review.md and a skill at.claude/skills/review/SKILL.md both create /review and behave the same way; existing command files keep working. Claude can also run either one by itself when its description matches the task, unless you set disable-model-invocation: true. The single-file command is the quickest to write. Choose the skill folder when the command needs reference files or scripts next to it (see how to write a SKILL.md ). If both exist with the same name, the skill wins.

The file name becomes the command name. Subfolders become a namespace:.claude/commands/video/qa.md is /video:qa. Commit.claude/commands/ to share commands with the team; personal ones go in your home folder as skills ( ~/.claude/skills/<name>/SKILL.md ).

--- description: " Explain an error message and propose the smallest fix" argument-hint: " [error text]" --- Explain this error in two sentences, find where it comes from in this repository, and propose the smallest change that fixes it. Do not edit files until I agree. Error: $ARGUMENTS Enter fullscreen mode Exit fullscreen mode Type /explain-error TypeError: cannot read properties of undefined and everything after the command name replaces $ARGUMENTS. If a command has no placeholder, Claude Code appends the arguments at the end as ARGUMENTS:....

--- description: Start a new episode spec from the template argument-hint: " [episode-id] [premise]" arguments: [ id, premise ] --- Create episodes/$id/spec.json from episodes/_template/spec.json. Premise: $premise 1. Write the hook shot first: frame 0 must show a situation that raises a question.

2. Fill the remaining shots so each one adds information or raises a new question. 3.

Write one caption per shot, at most 7 words. 4. Run `npm test` and fix every spec error before you stop.

Enter fullscreen mode Exit fullscreen mode Run shell commands in a slash command (! syntax) Write! followed by a command in backticks, at the start of a line or after a space: the command runs before the prompt is sent, and its output replaces the placeholder. For several commands, use a fenced code block whose opening fence is followed by!. Claude reads the current state instead of spending turns finding it.

These commands are checked against your permission rules and do not prompt, so pre-approve them with allowed-tools; if one fails, the whole command is aborted.

--- description: Review my uncommitted changes against the project rules allowed-tools: Bash(git status *) Bash(git diff *) --- ## Changed files! `git status --short` ## Diff! `git diff HEAD` Review the diff above against CLAUDE.md. List every problem as file:line, what is wrong, and the fix. Nothing else. Enter fullscreen mode Exit fullscreen mode New untracked files show in git status but not in the diff; run git add -N on them first if the review should read them. In a repository with no commits yet, use git diff instead of git diff HEAD.

Field names must match exactly: Claude Code ignores an unknown field without an error, so a typo silently does nothing.

.claude/commands/video/qa.md (run as /video:qa ep05)

--- description: Technical QA of a rendered episode before posting argument-hint: " [episode-id]" allowed-tools: Bash(ffprobe *) model: haiku disable-model-invocation: true --- Run ffprobe on out/$0.mp4 and report width, height, frame rate, duration and whether an audio stream exists. PASS only if it is 1080x1920, r_frame_rate is exactly 30/1, and it is between 15 and 90 seconds long. One line per check, then PASS or FAIL.

Enter fullscreen mode Exit fullscreen mode Commands, skills, subagents or hooks? A command when you start the job yourself and the prompt is the same each time. A skill when the method is longer or needs files beside it.

A subagent when the work would fill your main conversation with file reads, or needs a reviewer that did not write it. Define one first (a file-qa agent, say), then the command can simply say “use the file-qa subagent on out/$0.mp4”, or set context: fork to run the command itself in a subagent. A hook when something must happen every time, with no prompt at all.

Command not showing up? Type / and look for the name: the menu lists every command, and every skill not marked user-invocable: false. Check the folder:.claude/commands/ in the project you started Claude in (or a skill folder with a SKILL.md inside).

Check for a clash: a skill with the same name wins over a command file. Check the frontmatter: it must open and close with --- and be valid YAML. Common mistakes A shell line missing from allowed-tools.

Add the exact pattern. Unquoted multi-word arguments. Without quotes, each word is its own $N.

Side effects Claude can trigger. Add disable-model-invocation: true to deploys and publishes. Rules copied into every command.

Shared rules belong in CLAUDE.md; the command keeps only its own task. If you make short vertical videos with Claude Code, the skill below packages a complete spec-first workflow like the one behind the episode commands above.

Fields and syntax follow the official skills and commands documentation as of November 2026.

Animated horror reels skill: Our whole playbook as a Claude Code agent skill: the hook-first story method, the episode spec template, the camera, light and grade system with a palette builder, a render-ready Remotion starter and the QA checks before you post. Make reels like ours. See the skill

Disclosure: this guide is by Homingo, the team behind the skill linked above. Everything in it works without it.

Quelle: dev.to (dev.to). Original öffnen