PROMPT · tooling-foundation

Slash command: /release-notes

A user-invoked skill that injects the real git log at invocation time and produces grouped, breaking-change-aware release notes.

✓ verified 2026-06-10 · stack: claude-code, git, java · source

A skill that defines /release-notes: the directory name sets the command slug. disable-model-invocation: true means only a human can trigger it: release artifacts are a decision, not something Claude should produce mid-task on its own initiative. The !`command` line is dynamic context injection: it runs as preprocessing when the skill is invoked, and its output replaces the placeholder before Claude reads the skill, so the commit list arrives as data rather than as an instruction to go and fetch it.

.claude/skills/release-notes/SKILL.md
---
description: Generate release notes from git history since a given tag.
argument-hint: [last-release-tag]
disable-model-invocation: true
allowed-tools: Bash(git log *), Bash(git diff *)
---
# Release notes
Commits since $ARGUMENTS:
!`git log --oneline --no-merges $ARGUMENTS..HEAD`
Produce release notes in markdown from the commits above:
1. Group by conventional-commit type, in this order: Breaking changes,
Features, Fixes, Performance, Other. Derive the type from the commit
prefix (feat:, fix:, perf:); anything unparseable goes in Other.
2. Breaking changes: any commit with a ! suffix on its type or BREAKING
CHANGE in its body. If the oneline output is ambiguous, inspect the full
message with git log before classifying.
3. AWS service impact: add a final section listing any changes that touch
infrastructure or AWS service usage (IaC paths, SDK client changes,
IAM/queue/topic configuration), so reviewers can assess deployment risk.
4. Write for a reader of the changelog, not the git history: one line per
change, imperative mood, no commit hashes, reference PR numbers where
present in the subject.
5. Output only the release notes document, starting with a heading naming
the range ($ARGUMENTS..HEAD).

Usage: /release-notes v2.4.0. Commit the directory and the command exists for the whole team on next pull.

What it does

  • Injects ground truth. The git log runs before Claude sees the skill body, so the notes are generated from the actual commit list: no tool round-trip, no risk of the model summarising from memory.
  • $ARGUMENTS substitutes the invocation argument (the previous release tag) into both the injected command and the instructions; argument-hint: [last-release-tag] makes the slash-menu autocomplete say what is expected.
  • allowed-tools pre-approves the scoped git reads the skill needs for step 2’s deeper inspection, so the workflow never stalls on a permission prompt, and approves nothing beyond read-only git.
  • disable-model-invocation: true removes the skill from Claude’s self-invocation pool; it runs only when a human types the command.

Failure modes

  • No argument given. $ARGUMENTS substitutes empty, the injected command becomes git log --oneline --no-merges ..HEAD, and git’s output for that degenerate range drives the result. Invoke with the tag, or harden the injected line to fail loudly: substitution is textual, so [ -n "$ARGUMENTS" ] || echo "ERROR: pass the last release tag" injected ahead of the log command surfaces the misuse to Claude.
  • Huge ranges inject huge context. The preprocessing output lands in the prompt verbatim; a thousand-commit range costs accordingly. For long-lived release branches, summarise in stages or tighten the range.
  • Injection runs with your shell, unsandboxed by the skill. The !`command` content executes as preprocessing on invocation. Treat skill bodies as code in review: anyone who can merge a SKILL.md can make every invoker run a shell command.
  • Portability is partial. The SKILL.md format is the Agent Skills open standard, but dynamic injection and invocation-control frontmatter are Claude Code behaviour. On other adopters the !`...` line may arrive as literal text. Keep that in mind before sharing it as a cross-tool skill.
  • Non-conventional commit history. Grouping degrades to a long Other section. The skill still works; the fix is commit discipline, not the skill.

Verified against the SKILL.md frontmatter reference (disable-model-invocation, argument-hint, allowed-tools), the $ARGUMENTS substitution, and the !`command` dynamic-injection preprocessing at code.claude.com/docs/en/skills, 2026-06-10.