Commit Workflow
Systematic commit process with pre-commit checks, atomic commits, and conventional commit messages
What this skill does
# Commit Workflow
## Overview
Structured commit process ensuring code quality through pre-commit verification, atomic commit composition, and conventional commit message formatting.
## Quick Reference
**Before committing:**
1. Check staging status
2. Review diff to understand changes
3. Analyze for atomic commit opportunities
**Commit composition:**
1. Split multiple distinct changes into separate commits
2. Use conventional commit format
3. Follow project git guidelines
**Note:** Quality gates (PostToolUse, SubagentStop hooks) automatically enforce pre-commit checks, so code quality is already verified.
## Implementation
### Prerequisites
Read these before committing:
- `${CLAUDE_PLUGIN_ROOT}standards/conventional-commits.md` - Commit message format
- `${CLAUDE_PLUGIN_ROOT}standards/git-guidelines.md` - Git workflow standards
### Step-by-Step Workflow
**Note:** Pre-commit quality checks (linters, tests, build) are enforced automatically by quality gates (PostToolUse, SubagentStop hooks). By the time you're committing, gates have already verified code quality.
#### 1. Check staging status
**Review what's staged:**
```bash
git status
```
**If 0 files staged:**
- Automatically add all modified and new files: `git add .`
- Or selectively stage: `git add <specific-files>`
#### 2. Review diff
**Understand what's being committed:**
```bash
# See staged changes
git diff --staged
# See all changes (staged + unstaged)
git diff HEAD
```
**Analyze for logical grouping:**
- Are multiple distinct features/fixes present?
- Can this be split into atomic commits?
#### 3. Determine commit strategy
**Single commit:** All changes are logically related (one feature, one fix)
**Multiple commits:** Multiple distinct changes detected:
- Feature A + Bug fix B → Split into 2 commits
- Refactoring + New feature → Split into 2 commits
- Multiple unrelated changes → Split into N commits
**If splitting, stage selectively:**
```bash
# Stage specific files
git add file1.py file2.py
git commit -m "..."
# Stage remaining files
git add file3.py
git commit -m "..."
```
#### 4. Write conventional commit message
**Format (from standards/conventional-commits.md):**
```
<type>(<optional-scope>): <description>
[optional body]
[optional footer]
```
**Common types:**
- `feat`: New feature
- `fix`: Bug fix
- `refactor`: Code change that neither fixes bug nor adds feature
- `docs`: Documentation changes
- `test`: Adding or updating tests
- `chore`: Maintenance tasks
**Example messages:**
```bash
git commit -m "feat(auth): add password reset functionality
Implement forgot-password flow with email verification.
Includes rate limiting to prevent abuse."
git commit -m "fix: handle null values in user profile endpoint"
git commit -m "refactor: extract validation logic into separate module
Improves testability and reduces duplication across endpoints."
```
#### 5. Commit changes
**Execute commit:**
```bash
git commit -m "type(scope): description"
```
**Verify commit:**
```bash
git log -1 --stat
```
## What NOT to Skip
**NEVER skip:**
- Reviewing full diff before committing
- Analyzing for atomic commit opportunities
- Following conventional commit format
- Verifying commit was created correctly
**Common rationalizations that violate workflow:**
- "Small change" → Review diff and follow format anyway
- "Will fix message later" → Write correct message now
- "Mixing changes is faster" → Atomic commits are worth the time
- "Don't need to verify" → Always check commit with git log
**Note:** Pre-commit quality checks are enforced by quality gates automatically - no need to run them manually at commit time.
## Testing This Skill
See `test-scenarios.md` for pressure tests validating this workflow resists shortcuts.
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.