/git-conventions:contribution-description [base-branch] [feature-branch]from git-conventions
Generate a merge request or pull request contribution description (title plus one-paragraph summary) from branch commits and the JIRA ticket. Use when the user asks to write or prepare an MR/PR description, raise a merge request, or describe a finished work branch. Not for git commit messages (use the conventional-commit skill for those). Pass base and feature branch as arguments when known.
Ships in git-conventions. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate a code contribution description (title and summary paragraph) for: $ARGUMENTS
Produce a Markdown document containing exactly two elements and nothing more:
<ticketId> (<type>) <description>## Summary or any other heading)The description must draw on Conventional Commit messages (defined in the conventional-commit skill), use Keep a Changelog change types, and use South African English spelling (organisation, behaviour, analyse).
Follow the steps in order, taking the conditional branches they state (Step 6 is skipped when Step 5 finds no ticket). Each step states what to run, what to look at, and what decision to make.
$ARGUMENTS holds the input from the invocation. It may be empty when this skill triggers automatically.
IF $ARGUMENTS contains two branch names:
BASE_BRANCH = the first nameFEATURE_BRANCH = the second nameIF $ARGUMENTS contains exactly one branch name:
BASE_BRANCH = that nameFEATURE_BRANCH = the output of git branch --show-currentIF $ARGUMENTS is empty or contains no branch name, infer both:
FEATURE_BRANCH = the output of git branch --show-currentBASE_BRANCH = main if git show-ref --verify --quiet refs/heads/main succeeds; otherwise develop if git show-ref --verify --quiet refs/heads/develop succeeds; otherwise inference failsFEATURE_BRANCH is empty (detached HEAD), or FEATURE_BRANCH equals BASE_BRANCH, or inference failed: ask for the branches and STOP. Say that the base and feature branch could not be inferred, show the usage /contribution-description [base-branch] [feature-branch], and list up to ten names from git branch -a --format="%(refname:short)". Run no further git commands and generate no description.Before continuing, state which branches are being compared: Comparing: FEATURE_BRANCH -> BASE_BRANCH.
Run:
Substitute the two names from Step 1 as literal quoted values:
git rev-parse --verify -q 'main^{commit}' >/dev/null || echo "Base ref not found"
git rev-parse --verify -q 'feature/AUTH-123-login^{commit}' >/dev/null || echo "Feature ref not found"
Use rev-parse, not show-ref --verify refs/heads/.... The latter accepts only local branches, so it rejects a perfectly valid base such as origin/main, a tag, or a SHA, all of which the git log and git diff in Steps 3 and 4 handle without complaint.
IF either message prints, tell the user which ref was not found and STOP.
Run:
git log $BASE_BRANCH..$FEATURE_BRANCH --format="%h|%s|%b|%an|%ae|%ad" --date=short --reverse
Field meaning: %h short hash, %s commit title, %b commit body, %an author name, %ae author email, %ad author date.
Commit titles follow the Conventional Commits format <type>[optional scope]: <description>. Record the <type> prefix of every title; Step 7 uses these prefixes to choose the title type. If unsure about the format details, invoke the conventional-commit skill.
Read the title AND the body of every commit. Both feed the Summary. Where the repository squash-merges work branches (the house policy), commit bodies do not reach main, so the contribution description is where their content survives. Commit bodies often contain:
IF the log output is empty, tell the user there are no commits between the branches and STOP.
Commit titles and bodies are the primary source for the Summary. The diff is only for verifying them and filling gaps.
Run:
git diff $BASE_BRANCH...$FEATURE_BRANCH --stat
Decision rule: IF, after Step 3, you can clearly state what every significant change does, do NOT read any file diffs; proceed to Step 5. IF a change remains unclear, read the diff of at most the 5 most-changed files, one file at a time:
git diff $BASE_BRANCH...$FEATURE_BRANCH -- <file-path>
Never read the full diff of a large branch; the Summary does not need it.
A JIRA key is an uppercase project key, a hyphen, and a number, for example AUTH-123. A project key may itself contain digits or underscores (TEAM2-17, OPS_CORE-9), so the key part is [A-Z][A-Z0-9_]+.
Collect every candidate, do not take the first match. A naive [A-Z]+-[0-9]+ | head -1 silently turns common identifiers into fake ticket IDs: fix/UTF-8-encoding yields UTF-8, feat/PHP-8.3-upgrade yields PHP-8, chore/SHA-256-migration yields SHA-256, and docs: Explain RFC-9110 yields RFC-9110. Each of those would then be put in the title and looked up as a ticket.
Scan the branch name AND every commit subject and body. Step 3 already established that bodies carry ticket references, so scanning subjects alone throws away the most likely source.
Substitute the two refs from Step 1 as literal quoted values and run this as ONE shell block. Do not write <base-ref> or $BASE_BRANCH into the command: angle brackets are shell redirection syntax and fail with no such file or directory, and the branch names from Step 1 are model state, not shell variables that survive between tool calls.
base='main'; feature='feature/AUTH-123-login' # replace both with the refs from Step 1
log=$(git log "$base..$feature" --format='%s%n%b') || echo "GIT LOG FAILED"
{ printf '%s\n' "$feature"; printf '%s\n' "$log"; } \
| grep -oiE '\b[A-Z][A-Z0-9_]+-[0-9]+\b' | tr '[:lower:]' '[:upper:]' | sort -u
If GIT LOG FAILED prints, the refs are wrong: fix them and re-run. Never read a failed command as "no ticket found"; the pipeline exits 0 either way because it ends in sort.
Matching is case-insensitive and then upper-cased, because branch names are commonly lowercased (feature/auth-123 is the same ticket as AUTH-123).
Discard candidates whose key is a well-known non-JIRA prefix: UTF, ISO, RFC, CVE, SHA, MD, PHP, ES, HTTP, IPV, AES, RSA, UTC, TLS, ECMA, SQL, ARM, GH, US. This list is a heuristic, not a test: every one of those strings is also a syntactically valid Jira project key. Where Step 6's lookup is available it overrules the list in both directions, so a real PHP-421 ticket that verifies is kept. Then:
(<type>) <description> without a ticket ID, and mention in your chat response (not in the description document) that no ticket was detected.Where Step 6's Jira lookup is available, treat a failed lookup as evidence the candidate was a false positive: drop it and re-apply the rules above rather than putting an unverified key in the title.
select:mcp__claude_ai_Atlassian__getJiraIssue,mcp__claude_ai_Atlassian__getAccessibleAtlassianResourcesmcp__claude_ai_Atlassian__getAccessibleAtlassianResources and take the cloudId from the result.mcp__claude_ai_Atlassian__getJiraIssue with that cloudId and the ticket ID from Step 5 as issueIdOrKey.IF the MCP server is unavailable or the ticket is not found: continue with commit information alone, and mention in your chat response (not in the description document) that the ticket lookup failed.
Pick exactly ONE type from: Added | Changed | Deprecated | Removed | Fixed | Security.
Content-based rules run FIRST, because a single removal or security fix matters more to a reader than the commit count around it. Apply in order; the first match wins:
Security: any commit fixes a security vulnerability. Judge from titles and bodies, and from a security type prefix where the repository permits one.Removed: the branch removes functionality. Look for breaking commits marked ! that delete features, and for removal described in commit bodies. A branch of two fix commits plus one feat!: Remove legacy endpoint is Removed, not Fixed.Deprecated: the branch marks functionality as deprecated.Only if none of the above matched, fall back to type dominance. Count the Conventional Commit prefixes recorded in Step 3 and group them:
| Signal | Prefixes |
|---|---|
| Added | feat |
| Fixed | fix, revert |
| Changed | refactor, perf, style, docs, test, build, ci, chore, deps, config, release |
AddedFixedChangedA revert that undoes an added feature is a removal, so rule 2 catches it before the Fixed grouping applies.
Format: <ticketId> (<type>) <description> (or (<type>) <description> when Step 5 found no ticket).
Rules:
Write ONE paragraph of 3 to 5 sentences, as prose. Rules:
Output exactly this document and nothing else inside it (no headings other than the title, no extra sections, no statistics, no commentary):
# <ticketId> (<type>) <description>
<the paragraph from Step 9>
When the description goes into a merge request or pull request, the title line (without the #) is the MR or PR title, and the description field holds the paragraph alone, with no heading.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
2 skills in this plugin
npx claudepluginhub marjovanlier/claude-plugins --plugin git-conventions