ring:committing-changes
Committing working-tree changes as atomic conventional commits: analyzes the diff, groups it into coherent commits, confirms the plan, then creates GPG-signed commits carrying the mandatory X-Lerian-Ref trailer and offers to push. Use when the user says 'commit' or has changes ready to record. Skip when the tree is clean, work is still in progress, or the user wants raw git commands without grouping.
What this skill does
# Smart Commit Organization
## When to use
- User asks to commit changes or says "commit"
- Working directory has staged or unstaged changes ready to commit
- End of a development task where changes need to be recorded
## Skip when
- No changes in working directory
- Changes are still work-in-progress
- User explicitly wants raw git commands without smart grouping
Analyze changes, group into coherent atomic commits, create signed commits following repository conventions.
## Smart Commit Organization
Analyze → Group → Order → Confirm → Execute.
**Grouping principles:**
| Pattern | Group |
|---------|-------|
| Implementation + tests | Together (same commit) |
| package.json, *-lock.json | Dependency changes |
| *.md, docs/ | Documentation |
| Same module/directory | Often related |
**Commit order:** dependencies first → core changes → tests with implementation → docs last.
**Single commit when:** all changes are one coherent feature/fix, or user provides a specific message.
**Multiple commits when:** changes span different concerns.
## ⛔ HARD STOP — TRAILER RULES
**THE MOST COMMON MISTAKE:** Putting trailer text INSIDE the `-m` quotes.
```bash
# ❌ WRONG — trailer text INSIDE -m quotes
git commit -m "feat: add feature
X-Lerian-Ref: 0x1"
# ✅ CORRECT — --trailer is a SEPARATE argument OUTSIDE quotes
git commit -S -m "feat: add feature" --trailer "X-Lerian-Ref: 0x1"
```
**Checkpoint before writing any commit command:**
- [ ] `-m "..."` contains ONLY the commit message (no trailer text inside)
- [ ] `--trailer` is OUTSIDE and AFTER all `-m` parameters
- [ ] Structure: `git commit -S -m "msg" --trailer "X-Lerian-Ref: 0x1"`
## MANDATORY RULES
1. **NEVER include in commit message body:** emoji signatures, hashtags, `Co-Authored-By`, "Generated by", `X-Lerian-Ref` text, or any system markers.
`-m` contains ONLY the commit description. Period.
2. **ALWAYS use `--trailer "X-Lerian-Ref: 0x1"`** — separate command-line argument after all `-m` parameters.
3. **ALWAYS use `-S` for GPG signing** — skip only if GPG key not configured.
## Commit Process
### Step 1: Gather Context
```bash
git status
git diff && git diff --cached
git log --oneline -10 # reference style
```
### Step 2: Analyze and Group
Determine type (feat/fix/chore/docs/refactor/test/perf/ci), scope, and logical group for each file.
### Step 3: Present Plan and Confirm
```
Proposed Commit Plan:
1. feat(auth): add OAuth2 refresh token support
- src/auth/oauth.ts, src/auth/oauth.test.ts
2. chore(deps): update authentication dependencies
- package.json, package-lock.json
Proceed? [Execute plan / Single commit / Let me review]
```
Use AskUserQuestion to confirm. **MANDATORY: get confirmation before executing.**
### Step 4: Draft Commit Messages
- Subject: max 50 chars, imperative mood ("add" not "added")
- Body: wrap at 72 chars, explain motivation (optional)
- NO emoji, hashtags, markers of any kind in the body
### Step 5: Execute Commits
For each group:
```bash
git add <file1> <file2>
git commit -S \
-m "<type>(<scope>): <subject>" \
-m "<optional body>" \
--trailer "X-Lerian-Ref: 0x1"
```
### Step 6: Verify
```bash
git log --oneline -<N>
git log --show-signature -1 # if signed
git status # confirm clean
```
### Step 7: Offer Push
Ask user: push to remote? If yes: `git push` (or `git push -u origin <branch>` if no upstream).
## Examples
```bash
# Feature
git commit -S -m "feat(auth): add OAuth2 refresh token support" --trailer "X-Lerian-Ref: 0x1"
# Bug fix
git commit -S -m "fix(api): handle null response in user endpoint" --trailer "X-Lerian-Ref: 0x1"
# Chore
git commit -S -m "chore(deps): update authentication dependencies" --trailer "X-Lerian-Ref: 0x1"
```
## Trailer Query
```bash
git log --all --format="%H %s %(trailers:key=X-Lerian-Ref,valueonly)" | grep "0x1"
git log -1 --format="%(trailers)"
```
## When User Provides Message
Skip grouping. Use their message as subject. Still sign with `-S` and add trailer.
```bash
git commit -S -m "fix: fix login bug" --trailer "X-Lerian-Ref: 0x1"
```
## Anti-Patterns (FORBIDDEN)
```bash
# ❌ Trailer text inside -m
git commit -m "feat: add feature\n\nX-Lerian-Ref: 0x1"
# ❌ Emoji/hashtags in body
git commit -m "feat: add feature\n\n🤖 Generated with Claude Code"
# ❌ Co-Authored-By in body
git commit -m "feat: add feature\n\nCo-Authored-By: System <[email protected]>"
# ❌ Hashtag tracking
git commit -m "feat: add feature #0x1"
```
All of these pollute the commit message body. Use `--trailer` as a separate flag — always.
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.