ALWAYS use this skill when committing code changes — never commit directly without it. Creates commits following Sentry conventions with proper conventional…
Sentry Commit Messages Follow these conventions when creating commits for Sentry projects. Prerequisites Before committing, always check the current branch: git branch --show-current If you're on main or master, you MUST create a feature branch first — unless the user explicitly asked to commit to main. Do not ask the user whether to create a branch; just proceed with branch creation, then re-check the current branch before committing. If still on main or master, stop — do not commit. Format <type>(<scope>): <subject> The header is required. Scope is optional. All lines must stay under 100 characters. Commit Types Type Purpose feat New feature fix Bug fix ref Refactoring (no behavior change) perf Performance improvement docs Documentation only test Test additions or corrections build Build system or dependencies ci CI configuration chore Maintenance tasks style Code formatting (no logic change) meta Repository metadata license License changes Subject Line Rules Use imperative, present tense: "Add feature" not "Added feature" Capitalize the first letter No period at the end Maximum 70 characters Body Guidelines Explain what and why, not how Use imperative mood and present tense Include motivation for the change Contrast with previous behavior when relevant Use real newlines in commit bodies; never include literal \n sequences Never include customer data — customer/org names, user emails, support ticket contents, or PII. Describe the technical symptom, not who hit it, and if available, reference the internal ticket (e.g. Fixes SENTRY-1234). Commit Command Hygiene When creating commits from the CLI, do not embed escaped newlines like \n inside -m strings. That produces literal backslash characters in the final commit message. Prefer one of these patterns: git commit -m "type(scope): Subject" \ -m "First paragraph with real line wrapping. Second paragraph. Fixes GH-1234 Co-Authored-By: (the agent's name and attribution byline)" git commit Use the editor flow when the message needs careful formatting. Footer: Issue References Reference issues in the footer using these patterns: Fixes GH-1234 Fixes #1234 Fixes SENTRY-1234 Refs LINEAR-ABC-123 Fixes closes the issue when merged Refs links without closing AI-Generated Changes When changes were primarily generated by a coding agent, include the Co-Authored-By attribution in the commit footer. Agents should use their own identity: Co-Authored-By: (the agent's name and attribution byline) Example: Co-Authored-By: Claude Sonnet 4 <noreply@example.com> This is the only indicator of AI involvement that should appear in commits. Do not add phrases like "Generated by AI", "Written with Claude", or similar markers in the subject, body, or anywhere else in the commit message. Examples Simple fix fix(api): Handle null response in user endpoint The user API could return null for deleted accounts, causing a crash in the dashboard. Add null check before accessing user properties. Fixes SENTRY-5678 Co-Authored-By: (the agent's name and attribution byline) Feature with scope feat(alerts): Add Slack thread replies for alert updates When an alert is updated or resolved, post a reply to the original Slack thread instead of creating a new message. This keeps related notifications grouped together. Refs GH-1234 Refactor ref: Extract common validation logic to shared module Move duplicate validation code from three endpoints into a shared validator class. No behavior change. Breaking change feat(api)!: Remove deprecated v1 endpoints Remove all v1 API endpoints that were deprecated in version 23.1. Clients should migrate to v2 endpoints. BREAKING CHANGE: v1 endpoints no longer available Fixes SENTRY-9999 Revert Format revert: feat(api): Add new endpoint This reverts commit abc123def456. Reason: Caused performance regression in production. Principles Each commit should be a single, stable change Commits should be independently reviewable The repository should be in a working state after each commit References Sentry Commit Messages 1f
don't have the plugin yet? install it then click "run inline in claude" again.
added explicit inputs section covering branch state and message components, expanded procedure with detailed step-by-step commit execution including body sanitization and footer formatting, added decision points for branch safety, type validation, character limits, pii filtering, and ai attribution, and included comprehensive output contract and outcome signal sections.
use this skill every time you commit code changes to a sentry project. it enforces conventional commit format, prevents accidental commits to main/master, and ensures commit messages include proper scope, type, subject line, body explanation, and issue references. run this instead of committing directly.
git repository state:
git branch --show-current)commit message components:
type: one of feat, fix, ref, perf, docs, test, build, ci, chore, style, meta, licensescope: optional, describes which part of codebase (e.g., api, alerts, auth)subject: imperative mood, present tense, 1-70 charactersbody: optional but recommended for non-trivial changes, explains what and whyfooter: optional, issue references and co-author attributionexternal context:
verify branch safety: run git branch --show-current. if output is "main" or "master", proceed to step 2. otherwise skip to step 3.
create feature branch if needed: if on main or master, create a new branch via git checkout -b feature/<descriptive-name>. re-run git branch --show-current to confirm you are off main/master. if still on main or master after branch creation, stop and alert the user.
validate commit type: confirm the type is one of: feat, fix, ref, perf, docs, test, build, ci, chore, style, meta, license. if not, reject and ask user to pick a valid type.
type parameterformat subject line: take the subject and ensure it is in imperative mood, present tense, starts with capital letter, has no period, and is under 70 characters. if it exceeds 70 characters, truncate or ask user to rewrite.
build commit header: format as <type>(<scope>): <subject>. if scope is empty, format as <type>: <subject>. verify header is under 100 characters.
compose commit body (if needed): if body text is provided, format it with real line breaks (not literal \n). ensure body explains what and why, not how. check for customer/org names, user emails, support ticket contents, or pii. if found, remove or replace with technical symptom + internal ticket reference (e.g., Fixes SENTRY-1234).
add footer references: format issue references as Fixes GH-1234, Fixes #1234, Fixes SENTRY-1234, or Refs LINEAR-ABC-123. if this is ai-generated code, add Co-Authored-By:
execute git commit: if body and footer are provided, use multi-line -m pattern:
git commit -m "type(scope): subject" \
-m "body paragraph 1.
body paragraph 2.
Footer references here"
if only header + footer, use single -m + footer. if only header, use git commit -m "type(scope): subject". do not embed escaped newlines like \n inside -m strings.
verify commit: run git log -1 --pretty=format:"%H %s" to confirm the commit was created and the subject line is correct.
if on main or master branch: create a feature branch first (step 2). do not ask the user; just proceed. re-check after creation. if still on main/master, stop and do not commit.
if commit type is invalid: reject and ask user to select from the valid type list.
if subject exceeds 70 characters: either truncate (if safe) or ask user to rewrite.
if body contains customer/org names, user emails, pii, or support ticket contents: remove or replace with technical symptom + internal ticket reference (e.g., Fixes SENTRY-1234). do not commit with customer data exposed.
if this is ai-generated code: include Co-Authored-By footer. do not add "Generated by AI" or similar markers in subject or body.
if body text has escaped newlines (\n) instead of real line breaks: reformat using real line breaks before commit.
if multiple issues are referenced: include all in footer using Fixes or Refs patterns. use Fixes only if the commit actually closes the issue.
if scope is omitted: format header as <type>: <subject> instead of <type>(): <subject>.
successful commit output:
<type>(<scope>): <subject> with optional body and footerreturned to user:
git log -1 output (hash + subject)the user knows the commit succeeded when:
git log -1 --pretty=format:"%H %s" displays the correct commit hash and subject linegit status shows "nothing to commit" (staged changes were consumed by the commit)git branch --show-current shows a non-main/non-master branchif any step fails (e.g., invalid type, still on main after branch creation, body contains pii), the skill stops with an error message describing what went wrong and what to fix.