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 main...HEAD` 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.
15 questions · take it digitally for instant feedback at tendril.neural-forge.io/learn/quiz/end-claude-code-build-command-creators
What is the core idea behind "Building A Custom Slash Command End-To-End"?
Which term best describes a foundational idea in "Building A Custom Slash Command End-To-End"?
A learner studying Building A Custom Slash Command End-To-End would need to understand which concept?
Which of these is directly relevant to Building A Custom Slash Command End-To-End?
Which of the following is a key point about Building A Custom Slash Command End-To-End?
Which of these does NOT belong in a discussion of Building A Custom Slash Command End-To-End?
Which statement is accurate regarding Building A Custom Slash Command End-To-End?
Which of these does NOT belong in a discussion of Building A Custom Slash Command End-To-End?
What is the key insight about "Write the contract first" in the context of Building A Custom Slash Command End-To-End?
What is the key insight about "Boundaries belong in the body" in the context of Building A Custom Slash Command End-To-End?
What is the key insight about "From the community" in the context of Building A Custom Slash Command End-To-End?
Which statement accurately describes an aspect of Building A Custom Slash Command End-To-End?
What does working with Building A Custom Slash Command End-To-End typically involve?
Which best describes the scope of "Building A Custom Slash Command End-To-End"?
Which section heading best belongs in a lesson about Building A Custom Slash Command End-To-End?