Loading lesson…
Custom slash commands are how teams encode 'the way we do X.' Building one well takes thinking about the prompt, the context, and the output shape — not just the name.
Most teams' first custom slash commands are too vague to be useful. The prompt says 'review this code' or 'write tests' without specifying which code, what kind of review, what test framework. The command runs, the model improvises, and nobody's quite sure if the output is good. Useful commands are precise contracts.
--- name: pr-summary description: Generate a PR description from the diff against main. Triggers when the user asks for a PR description, summary, or changelog for the current branch. --- # PR Summary 1. Run `git diff mainHEAD` to get the changes. 2. Run `git log main..HEAD --oneline` to get the commit messages. 3. Group changes into: Features, Fixes, Refactors, Docs, Tests, Other. 4. Write a summary in this format: ## Summary <2-3 sentences on what shipped and why> ## Changes - [Feature/Fix/Refactor]: short description ## Test plan - [ ] [explicit verification steps] 5. Skip noise: lockfile changes, formatting-only commits. 6. End with: `Generated by Claude Code via /pr-summary`. Do NOT push, commit, or open a PR — just print the summary.A self-contained PR-summary command. Note the explicit shape of the output and the explicit boundary at the end.The big idea: a useful slash command is a precise contract — not a vibes prompt with a name.
8 questions · take it digitally for instant feedback at tendril.neural-forge.io/learn/quiz/end-claude-code-build-command-creators
What is the main idea of "Building A Custom Slash Command End-To-End"?
Which concept is most central to "Building A Custom Slash Command End-To-End"?
Which use of AI fits this topic best?
What should a careful learner remember about "Write the contract first"?
You want to use AI after this lesson. What is the safest next step?
How should AI output about custom command be treated?
Name one way to verify an AI answer about custom command.
Which action would help you apply "Building A Custom Slash Command End-To-End" responsibly?