commit
Create well-formatted commits with conventional commit messages and emoji
What this skill does
# Claude Command: Commit Your job is to create well-formatted commits with conventional commit messages and emoji. ## Instructions CRITICAL: Perform the following steps exactly as described: 1. **Branch check**: Checks if current branch is `master` or `main`. If so, asks the user whether to create a separate branch before committing. If user confirms a new branch is needed, creates one using the pattern `<type>/<username>/<description>` (e.g., `feature/leovs09/add-new-command`) 2. Unless specified with `--no-verify`, automatically runs pre-commit checks like `pnpm lint` or simular depending on the project language. 3. Checks which files are staged with `git status` 4. If 0 files are staged, automatically adds all modified and new files with `git add` 5. Performs a `git diff` to understand what changes are being committed 6. Analyzes the diff to determine if multiple distinct logical changes are present 7. If multiple distinct changes are detected, suggests breaking the commit into multiple smaller commits 8. For each commit (or the single commit if not split), creates a commit message using emoji conventional commit format ## Best Practices for Commits - **Verify before committing**: Ensure code is linted, builds correctly, and documentation is updated - **Atomic commits**: Each commit should contain related changes that serve a single purpose - **Split large changes**: If changes touch multiple concerns, split them into separate commits - **Conventional commit format**: Use the format `<type>: <description>` where type is one of: - `feat`: A new feature - `fix`: A bug fix - `docs`: Documentation changes - `style`: Code style changes (formatting, etc) - `refactor`: Code changes that neither fix bugs nor add features - `perf`: Performance improvements - `test`: Adding or fixing tests - `chore`: Changes to the build process, tools, etc. - **Present tense, imperative mood**: Write commit messages as commands (e.g., "add feature" not "added feature") - **Concise first line**: Keep the first line under 72 characters - **Emoji**: Each commit type is paired with an appropriate emoji: - โจ `feat`: New feature - ๐ `fix`: Bug fix - ๐ `docs`: Documentation - ๐ `style`: Formatting/style - โป๏ธ `refactor`: Code refactoring - โก๏ธ `perf`: Performance improvements - โ `test`: Tests - ๐ง `chore`: Tooling, configuration - ๐ `ci`: CI/CD improvements - ๐๏ธ `revert`: Reverting changes - ๐งช `test`: Add a failing test - ๐จ `fix`: Fix compiler/linter warnings - ๐๏ธ `fix`: Fix security issues - ๐ฅ `chore`: Add or update contributors - ๐ `refactor`: Move or rename resources - ๐๏ธ `refactor`: Make architectural changes - ๐ `chore`: Merge branches - ๐ฆ๏ธ `chore`: Add or update compiled files or packages - โ `chore`: Add a dependency - โ `chore`: Remove a dependency - ๐ฑ `chore`: Add or update seed files - ๐งโ๐ป `chore`: Improve developer experience - ๐งต `feat`: Add or update code related to multithreading or concurrency - ๐๏ธ `feat`: Improve SEO - ๐ท๏ธ `feat`: Add or update types - ๐ฌ `feat`: Add or update text and literals - ๐ `feat`: Internationalization and localization - ๐ `feat`: Add or update business logic - ๐ฑ `feat`: Work on responsive design - ๐ธ `feat`: Improve user experience / usability - ๐ฉน `fix`: Simple fix for a non-critical issue - ๐ฅ `fix`: Catch errors - ๐ฝ๏ธ `fix`: Update code due to external API changes - ๐ฅ `fix`: Remove code or files - ๐จ `style`: Improve structure/format of the code - ๐๏ธ `fix`: Critical hotfix - ๐ `chore`: Begin a project - ๐ `chore`: Release/Version tags - ๐ง `wip`: Work in progress - ๐ `fix`: Fix CI build - ๐ `chore`: Pin dependencies to specific versions - ๐ท `ci`: Add or update CI build system - ๐ `feat`: Add or update analytics or tracking code - โ๏ธ `fix`: Fix typos - โช๏ธ `revert`: Revert changes - ๐ `chore`: Add or update license - ๐ฅ `feat`: Introduce breaking changes - ๐ฑ `assets`: Add or update assets - โฟ๏ธ `feat`: Improve accessibility - ๐ก `docs`: Add or update comments in source code - ๐๏ธ `db`: Perform database related changes - ๐ `feat`: Add or update logs - ๐ `fix`: Remove logs - ๐คก `test`: Mock things - ๐ฅ `feat`: Add or update an easter egg - ๐ `chore`: Add or update .gitignore file - ๐ธ `test`: Add or update snapshots - โ๏ธ `experiment`: Perform experiments - ๐ฉ `feat`: Add, update, or remove feature flags - ๐ซ `ui`: Add or update animations and transitions - โฐ๏ธ `refactor`: Remove dead code - ๐ฆบ `feat`: Add or update code related to validation - โ๏ธ `feat`: Improve offline support ## Guidelines for Splitting Commits When analyzing the diff, consider splitting commits based on these criteria: 1. **Different concerns**: Changes to unrelated parts of the codebase 2. **Different types of changes**: Mixing features, fixes, refactoring, etc. 3. **File patterns**: Changes to different types of files (e.g., source code vs documentation) 4. **Logical grouping**: Changes that would be easier to understand or review separately 5. **Size**: Very large changes that would be clearer if broken down ## Examples Good commit messages: - โจ feat: add user authentication system - ๐ fix: resolve memory leak in rendering process - ๐ docs: update API documentation with new endpoints - โป๏ธ refactor: simplify error handling logic in parser - ๐จ fix: resolve linter warnings in component files - ๐งโ๐ป chore: improve developer tooling setup process - ๐ feat: implement business logic for transaction validation - ๐ฉน fix: address minor styling inconsistency in header - ๐๏ธ fix: patch critical security vulnerability in auth flow - ๐จ style: reorganize component structure for better readability - ๐ฅ fix: remove deprecated legacy code - ๐ฆบ feat: add input validation for user registration form - ๐ fix: resolve failing CI pipeline tests - ๐ feat: implement analytics tracking for user engagement - ๐๏ธ fix: strengthen authentication password requirements - โฟ๏ธ feat: improve form accessibility for screen readers Example of splitting commits: - First commit: โจ feat: add new solc version type definitions - Second commit: ๐ docs: update documentation for new solc versions - Third commit: ๐ง chore: update package.json dependencies - Fourth commit: ๐ท๏ธ feat: add type definitions for new API endpoints - Fifth commit: ๐งต feat: improve concurrency handling in worker threads - Sixth commit: ๐จ fix: resolve linting issues in new code - Seventh commit: โ test: add unit tests for new solc version features - Eighth commit: ๐๏ธ fix: update dependencies with security vulnerabilities ## Command Options - `--no-verify`: Skip running the pre-commit checks (lint, build, generate:docs) ## Branch Naming Convention When committing on `master` or `main`, the command will ask if you want to create a new branch. If yes, it creates a branch following this pattern: ``` <type>/<git-username>/<description> ``` **Components:** - `<type>`: The commit type (feature, fix, docs, refactor, perf, test, chore, etc.) - `<git-username>`: Your git username (obtained from `git config user.name` or the system username) - `<description>`: A kebab-case description of the change (e.g., `add-user-auth`, `fix-login-bug`) **Examples:** - `feature/leovs09/add-new-command` - `fix/johndoe/resolve-memory-leak` - `docs/alice/update-api-docs` - `refactor/bob/simplify-error-handling` - `chore/charlie/update-dependencies` **Workflow:** 1. Command detects you're on `master` or `main` 2. Asks: "You're on the main branch. Do you want to create a separate branch?" 3. If "No": Proceeds with commit on current branch 4. If "Yes": Analyzes your changes to determine the type, asks for a brief description, creates the branch, and proceeds with commit ## Important Notes - By default, pre-commit checks (`pnpm lint`, `pnpm build`, `pnpm generate:docs`) will run to ensure code quality - If these checks fail, you'll be asked if you want to proceed with t
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.