How this skill is triggered — by the user, by Claude, or both
Slash command
/pair:commitThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a Conventional Commits message from the currently staged changes (auto-staging working tree first) and create the commit. Scope is extracted from the current branch name (Jira / Azure DevOps ticket id).
Generate a Conventional Commits message from the currently staged changes (auto-staging working tree first) and create the commit. Scope is extracted from the current branch name (Jira / Azure DevOps ticket id).
$1 — language for the commit subject (default: en). Examples: en, pt-BR, es.Resolve language. If $1 is empty, use en. Otherwise use $1 verbatim.
Get current branch name.
git rev-parse --abbrev-ref HEAD
Extract ticket id from the branch name to use as commit scope. Try these regex patterns in order, stop at the first match:
[A-Z][A-Z0-9]+-\d+ — e.g. JIRA-1234, PROJ-567, ABC123-45. Uppercase prefix is required.AB#\d+ or #\d+ — e.g. AB#1234, #567.feat/1234-desc → 1234.If a ticket is extracted, use it verbatim as the scope. Never invent or normalize a scope that was not present in the branch.
Stage and capture the diff.
git add .
git diff --cached
Save the diff for inspection.
mkdir -p ./tmp
Write the diff output from step 4 to ./tmp/diff.txt.
Generate the commit message following these rules:
type(scope): subject if a ticket was extracted, otherwise type: subject.feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert.JIRA-1234).type(scope): subject).$1.Create the commit.
git commit -m "<generated message>"
Report back in plain text:
no ticket detected).git rev-parse HEAD or the git commit output).feat/JIRA-1234-add-some-feature → feat(JIRA-1234): add some feature to some placebugfix/PROJ-567-null-check → fix(PROJ-567): guard against null userfeature/AB#890-login-timeout → fix(AB#890): extend login timeoutfeat/1234-new-page → feat(1234): add new pagefeat/add-login (no ticket) → feat: add login formCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub danprates/pair-ai --plugin pair