commit
This skill should be used when the user asks to "commit", "create a commit", "write a commit message", "commit my changes", "commit the changes", or needs help crafting a well-structured git commit message following best practices.
What this skill does
# Commit Skill
Create well-crafted git commit messages following established best practices.
## Purpose
Generate commit messages that effectively communicate context about changes to fellow developers and future maintainers. A diff shows _what_ changed; the commit message explains _why_.
## Workflow
### 1. Analyze Changes
Run these commands to understand the current state:
```bash
git status
git diff --staged
git diff
git log --oneline -5
```
Review:
- What files are modified, added, or deleted
- The nature of the changes (bug fix, feature, refactor, docs, etc.)
- Recent commit message style in the repository
### 2. Stage Appropriate Files
**Critical**: Only commit files modified during the current session. Never use `git add -A` or `git add .` unless explicitly instructed.
```bash
git add <specific-file-paths>
```
### 3. Craft the Commit Message
Apply the seven rules from `references/git-commit-guide.md`:
1. **Separate subject from body** with a blank line
2. **Limit subject to 50 characters** (72 hard limit)
3. **Capitalize the subject line**
4. **No period** at end of subject
5. **Use imperative mood** in subject ("Add feature" not "Added feature")
6. **Wrap body at 72 characters**
7. **Explain what and why**, not how
#### Subject Line Test
A proper subject completes this sentence:
> If applied, this commit will _[your subject line]_
Examples:
- "Add user authentication middleware" ✓
- "Fix race condition in connection pool" ✓
- "Added new feature" ✗ (not imperative)
- "Fixing bug" ✗ (not imperative)
### 4. Commit Format
For simple changes (no body needed):
```bash
git commit -m "Fix typo in README installation section"
```
For changes requiring explanation:
```bash
git commit -m "$(cat <<'EOF'
Refactor database connection handling
The previous implementation created a new connection for each query,
causing performance issues under load. This change introduces connection
pooling with a configurable pool size.
- Add ConnectionPool class with acquire/release methods
- Update DatabaseClient to use pool instead of direct connections
- Add pool_size configuration option (default: 10)
Resolves: #234
EOF
)"
```
### 5. Verify
After committing:
```bash
git log -1
git status
```
## Quick Reference
| Rule | Good | Bad |
|------|------|-----|
| Imperative | "Add tests" | "Added tests" |
| Capitalized | "Fix bug" | "fix bug" |
| No period | "Update docs" | "Update docs." |
| Length | "Add user auth" (13) | "Add user authentication system with JWT tokens and refresh capability" (71) |
## Additional Resources
For detailed guidelines and examples, consult:
- **`references/git-commit-guide.md`** - Complete guide with the seven rules explained in depth, examples of good and bad commits, and references to authoritative sources
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.