commit
ALWAYS use this skill when committing code changes — never commit directly without it. Creates commits following Sentry conventions with proper conventional commit format and issue references. Trigger on any commit, git commit, save changes, or commit message task.
About this skill
This AI agent skill streamlines the Git commit process by enforcing specific conventions, particularly those used in Sentry projects. It ensures that every commit adheres to a conventional commit format, which includes a type (e.g., `feat`, `fix`), an optional scope, a concise subject line, and proper references to associated issues (e.g., `Closes #123`). Beyond just formatting, the skill also intelligently manages branches: if the agent is currently on `main` or `master`, it will automatically create a new feature branch for the commit, unless explicitly instructed by the user to commit directly to `main`. This prevents accidental direct commits to protected branches and promotes a clean, organized commit history. By automating these best practices, the `commit` skill significantly improves code consistency, traceability, and team collaboration.
Best use case
Contributing to Sentry projects, maintaining a consistent and traceable Git commit history, enforcing team coding standards, automating developer workflows for an AI assistant, ensuring all commits reference relevant issues.
ALWAYS use this skill when committing code changes — never commit directly without it. Creates commits following Sentry conventions with proper conventional commit format and issue references. Trigger on any commit, git commit, save changes, or commit message task.
A successfully executed Git commit operation resulting in a commit message that strictly adheres to Sentry's conventional commit format (e.g., `feat(scope): Subject line\n\nBody\nCloses #issue`). The commit will be made on an appropriate branch, either a newly created feature branch (if on main/master) or the current branch, promoting a clean and organized commit history.
Practical example
Example input
Commit the changes I've made to `src/config.py` to add new API endpoints. Reference issue #789.
Example output
The agent first checks the current branch. If on `main` or `master`, it creates a new branch (e.g., `feature/add-api-endpoints`). It then performs the commit, resulting in a Git commit with a message similar to: ``` feat(api): Add new API endpoints for data retrieval. Closes #789 ```
When to use this skill
- Any time code changes need to be committed, especially in projects following Sentry's conventions or requiring conventional commit standards. Triggered by phrases like 'commit changes', 'git commit', 'save changes', or any 'commit message task'.
When not to use this skill
- When the user explicitly instructs to bypass all conventional commit standards or Sentry-specific conventions. When a raw, unformatted commit is explicitly required for a temporary or draft purpose that does not need to adhere to project standards. When the user explicitly wants to commit directly to `main` or `master` *and* override the automatic branch creation logic (though the skill allows direct commits to main if explicitly asked).
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/commit/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How commit Compares
| Feature / Agent | commit | Standard Approach |
|---|---|---|
| Platform Support | Claude | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
ALWAYS use this skill when committing code changes — never commit directly without it. Creates commits following Sentry conventions with proper conventional commit format and issue references. Trigger on any commit, git commit, save changes, or commit message task.
Which AI agents support this skill?
This skill is designed for Claude.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Top AI Agents for Productivity
See the top AI agent skills for productivity, workflow automation, operational systems, documentation, and everyday task execution.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# Sentry Commit Messages Follow these conventions when creating commits for Sentry projects. ## When to Use - The user asks to commit code, prepare a commit message, or save changes in git. - You need Sentry-style commit formatting with conventional commit structure and issue references. - The task requires enforcing branch safety before committing, especially avoiding direct commits on `main` or `master`. ## Prerequisites Before committing, always check the current branch: ```bash 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. The `create-branch` skill will still propose a branch name for the user to confirm. Use the `create-branch` skill to create the branch. After `create-branch` completes, verify the current branch has changed before proceeding: ```bash git branch --show-current ``` If still on `main` or `master` (e.g., the user aborted branch creation), stop — do not commit. ## Format ``` <type>(<scope>): <subject> <body> <footer> ``` 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 ## 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 (like Claude Code), include the Co-Authored-By attribution in the commit footer: ``` Co-Authored-By: Claude <noreply@anthropic.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: Claude <noreply@anthropic.com> ``` ### 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](https://develop.sentry.dev/engineering-practices/commit-messages/)
Related Skills
nft-standards
Master ERC-721 and ERC-1155 NFT standards, metadata best practices, and advanced NFT features.
nextjs-app-router-patterns
Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.
new-rails-project
Create a new Rails project
networkx
NetworkX is a Python package for creating, manipulating, and analyzing complex networks and graphs.
network-engineer
Expert network engineer specializing in modern cloud networking, security architectures, and performance optimization.
nestjs-expert
You are an expert in Nest.js with deep knowledge of enterprise-grade Node.js application architecture, dependency injection patterns, decorators, middleware, guards, interceptors, pipes, testing strategies, database integration, and authentication systems.
nerdzao-elite
Senior Elite Software Engineer (15+) and Senior Product Designer. Full workflow with planning, architecture, TDD, clean code, and pixel-perfect UX validation.
nerdzao-elite-gemini-high
Modo Elite Coder + UX Pixel-Perfect otimizado especificamente para Gemini 3.1 Pro High. Workflow completo com foco em qualidade máxima e eficiência de tokens.
native-data-fetching
Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, React Query, SWR, error handling, caching, offline support, and Expo Router data loaders (useLoaderData).
n8n-workflow-patterns
Proven architectural patterns for building n8n workflows.
n8n-validation-expert
Expert guide for interpreting and fixing n8n validation errors.
n8n-node-configuration
Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between get_node detail levels, or learning common configuration patterns by node type.