commit-message
Generate conventional commit messages by analyzing staged git changes. Detects change type, suggests scope, and formats messages following the Conventional Commits specification.
What this skill does
# Commit Message Generator
Generate conventional commit messages from staged git changes.
## Overview
This skill automates commit message generation for development teams. It analyzes staged changes, detects the appropriate commit type (feat, fix, refactor, etc.), suggests a scope based on modified files, and generates a properly formatted message following the Conventional Commits specification.
**What it automates:**
- Analysis of staged git changes
- Commit type detection based on change patterns
- Scope suggestion from file paths
- Message formatting with subject/body/footer
**Time saved:** ~2-5 minutes per commit
## Triggers
Run this skill when:
- You have staged changes ready to commit
- You want a well-formatted conventional commit
- You need to reference issues or breaking changes
## Workflow
### Step 1: Analyze Staged Changes
First, I'll examine what's staged:
```bash
git diff --cached --stat
git diff --cached --name-status
```
This shows:
- Files added (A), modified (M), deleted (D), renamed (R)
- Lines changed per file
- Overall change scope
### Step 2: Detect Commit Type
Based on the changes, I'll determine the appropriate type:
| Pattern | Type | Description |
|---------|------|-------------|
| New feature files | `feat` | New functionality |
| Bug fix in existing code | `fix` | Bug repair |
| Code restructuring | `refactor` | No behavior change |
| Performance improvements | `perf` | Faster/leaner code |
| Test additions/changes | `test` | Test updates |
| Documentation only | `docs` | Documentation |
| Formatting/style | `style` | No code change |
| Build/CI config | `build`/`ci` | Infrastructure |
| Maintenance | `chore` | Other changes |
### Step 3: Suggest Scope
Extract scope from the primary changed directory:
- `src/api/*` → scope: `api`
- `src/components/*` → scope: `components`
- `lib/utils/*` → scope: `utils`
- Multiple areas → omit scope or use parent
### Step 4: Generate Message
Format following Conventional Commits:
```
<type>(<scope>): <description>
<body - explains why, not how>
<footer - issues, breaking changes>
```
**Subject line rules:**
- Maximum 50 characters
- Imperative mood ("Add" not "Added")
- No period at end
- Capitalize first letter
### Step 5: Review and Commit
Present the generated message for your approval, then execute:
```bash
git commit -m "<message>"
```
## Verification
### Success Indicators
- Commit type matches the nature of changes
- Subject line is under 50 characters
- Message uses imperative mood
- Breaking changes are properly noted
- Issue references are included when applicable
### Message Validation
Before committing, I verify:
- [ ] Type is valid (feat, fix, docs, etc.)
- [ ] Subject line <= 50 characters
- [ ] Imperative mood used
- [ ] No trailing period
- [ ] Body wrapped at 72 characters (if present)
- [ ] Footer format correct (if present)
## Examples
### Example 1: Simple Feature
```
User: Generate a commit message for my staged changes
Assistant: Analyzing staged changes...
git diff --cached --name-status:
A src/components/Button.tsx
M src/components/index.ts
Detected: New component file added
Type: feat
Scope: components
Generated message:
feat(components): add Button component
Proceed with this commit? (y/n)
```
### Example 2: Bug Fix with Issue Reference
```
User: /commit - this fixes issue #42
Assistant: Analyzing staged changes...
git diff --cached --name-status:
M src/utils/parser.ts
Detected: Modified existing utility code
Type: fix
Scope: utils
Generated message:
fix(utils): resolve array parsing edge case
Handle empty arrays correctly in parser to prevent
undefined errors when processing user input.
Closes #42
Proceed with this commit? (y/n)
```
### Example 3: Breaking Change
```
User: Generate commit - this changes the API signature
Assistant: Analyzing staged changes...
git diff --cached --name-status:
M src/api/auth.ts
M src/types/auth.ts
Detected: API modification with signature change
Type: feat (with breaking change)
Scope: api
Generated message:
feat(api)!: update authentication flow
Migrate from session-based to JWT authentication.
This changes the login endpoint response format.
BREAKING CHANGE: login() now returns {token, refreshToken}
instead of {sessionId}. All clients must update their
authentication handling.
Proceed with this commit? (y/n)
```
## Configuration
### Commit Types Reference
| Type | When to Use | SemVer Impact |
|------|-------------|---------------|
| `feat` | New feature | Minor bump |
| `fix` | Bug fix | Patch bump |
| `docs` | Documentation only | None |
| `style` | Formatting, no code change | None |
| `refactor` | Code restructure, no behavior change | None |
| `perf` | Performance improvement | None |
| `test` | Adding/updating tests | None |
| `build` | Build system changes | None |
| `ci` | CI configuration | None |
| `chore` | Maintenance tasks | None |
### Breaking Changes
Add `!` after type/scope or include footer:
- `feat!: change API`
- `feat(api)!: update endpoint`
- Footer: `BREAKING CHANGE: description`
## Output Checklist
Before finalizing a commit message:
- [ ] Type accurately reflects the change
- [ ] Scope matches the affected area
- [ ] Subject is imperative mood
- [ ] Subject <= 50 characters
- [ ] Body explains why (if included)
- [ ] Body wrapped at 72 characters
- [ ] Breaking changes documented
- [ ] Issue references includedRelated 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.