git-commit-pro
Write well-structured git commit messages following the Conventional Commits standard. Use when a user asks to commit changes, write a commit message, stage and commit, improve a commit message, or follow commit conventions. Analyzes diffs to produce accurate, meaningful commit messages.
What this skill does
# Git Commit Pro
## Overview
Generate well-structured git commit messages by analyzing staged changes. Follows Conventional Commits format and produces messages that explain what changed and why.
## Instructions
When a user asks you to commit, write a commit message, or improve an existing commit message, follow these steps:
### Step 1: Inspect the changes
```bash
# See what is staged
git diff --cached --stat
# See full staged diff
git diff --cached
# See unstaged changes (in case user wants to stage first)
git status
```
If nothing is staged, help the user stage the right files first. Never use `git add .` unless the user explicitly asks -- prefer adding specific files.
### Step 2: Analyze the diff
Categorize what changed:
- **New files**: What functionality do they add?
- **Modified files**: What behavior changed? Why?
- **Deleted files**: What was removed and why?
- **Renamed/moved files**: What restructuring happened?
Look at the actual code changes, not just file names. Understand the intent behind the changes.
### Step 3: Write the commit message
Use Conventional Commits format:
```
type(scope): short description
Longer explanation of what changed and why. Wrap at 72 characters.
Reference any issues or tickets.
Co-Authored-By: if applicable
```
**Types:**
- `feat`: New feature or capability
- `fix`: Bug fix
- `docs`: Documentation only
- `style`: Formatting, semicolons, whitespace (no logic change)
- `refactor`: Code restructuring without behavior change
- `perf`: Performance improvement
- `test`: Adding or updating tests
- `build`: Build system or dependency changes
- `ci`: CI/CD configuration changes
- `chore`: Maintenance tasks, tooling updates
**Rules for the subject line:**
- Use imperative mood ("add" not "added" or "adds")
- Do not capitalize the first word after the colon
- No period at the end
- Keep under 72 characters
- Scope is optional but helpful (e.g., `feat(auth):`, `fix(api):`)
**Rules for the body:**
- Separate from subject with a blank line
- Explain WHAT and WHY, not HOW (the diff shows how)
- Wrap at 72 characters
- Use bullet points for multiple changes
- Reference issue numbers: `Fixes #123`, `Closes #456`
### Step 4: Execute the commit
```bash
git commit -m "$(cat <<'EOF'
type(scope): subject line here
Body paragraph explaining the change.
EOF
)"
```
### Step 5: Verify
```bash
git log --oneline -1
git status
```
Confirm the commit was created and the working tree is in the expected state.
## Examples
### Example 1: Feature addition
**Staged changes:** New `auth/` directory with login, register, and middleware files.
**Commit message:**
```
feat(auth): add user authentication with JWT
Implement login and registration endpoints with JWT-based session
management. Includes:
- POST /auth/login with email/password
- POST /auth/register with validation
- Auth middleware for protected routes
- Token refresh endpoint
Closes #42
```
### Example 2: Bug fix
**Staged changes:** Modified `src/utils/date.ts` -- changed timezone handling in `formatDate()`.
**Commit message:**
```
fix(utils): correct timezone offset in date formatting
formatDate() was applying the UTC offset in the wrong direction,
causing dates to display one day behind for users in negative UTC
timezones (Americas). The offset is now subtracted instead of added.
Fixes #187
```
### Example 3: Multiple small changes
**Staged changes:** Updated README, added a `.env.example`, fixed a typo in a config file.
**Commit message:**
```
chore: update project setup documentation
- Add .env.example with required environment variables
- Update README with new setup instructions
- Fix typo in webpack.config.js comment
```
## Guidelines
- One commit per logical change. If the diff contains unrelated changes, suggest splitting into multiple commits.
- Never write generic messages like "update files" or "fix stuff." Every commit should be understandable without looking at the diff.
- If the user has an existing commit convention in their repo (check recent `git log`), match that style instead of Conventional Commits.
- For large diffs, focus the subject on the primary change and use the body for secondary changes.
- If the diff includes generated files (lockfiles, build artifacts), mention them briefly but focus on the source changes.
- When amending, always confirm with the user first. Amending rewrites history and can cause issues for shared branches.
- If the changes are too large or unfocused for a single good commit message, tell the user and suggest how to split them.
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.