git-amend
MANDATORY: Use instead of `git commit --amend` - verifies HEAD and push status first
What this skill does
# Git Amend Skill
**Purpose**: Safely amend the most recent commit with proper verification checks.
## Safety Rules
### Only Amend When ALL Conditions Are Met
1. **HEAD commit was created by you** in this session
2. **Commit has NOT been pushed** to remote
3. **You intend to modify HEAD** (not an earlier commit)
```bash
# Check if pushed:
git status
# Look for: "Your branch is ahead of 'origin/main' by X commits"
# "up to date" = already pushed (amending creates divergent history)
```
## Quick Workflow
```bash
# 1. Verify HEAD is the commit you want to amend
git log --oneline -1
# 2. Verify not pushed to remote
git status # Must show "ahead of origin"
# 3. Make your changes (edit files, stage new files)
git add <files>
# 4. Amend the commit
git commit --amend
# Or with new message:
git commit --amend -m "New message"
# Or keep same message:
git commit --amend --no-edit
```
## Common Use Cases
### Fix a typo in the last commit
```bash
# Edit the file
vim file.txt
# Stage and amend
git add file.txt
git commit --amend --no-edit
```
### Add forgotten file to last commit
```bash
git add forgotten-file.txt
git commit --amend --no-edit
```
### Change commit message only
```bash
git commit --amend -m "Better commit message"
```
## Dangerous Situations
```bash
# Only amend unpushed commits
git push origin main
git commit --amend # Creates divergent history!
# Only amend your own commits
git pull # Pulls teammate's commit
git commit --amend # Rewrites their work!
# If you must amend after push (with explicit permission):
git commit --amend
git push --force-with-lease # Safer than --force
```
## Amending Earlier Commits
To modify a commit that's NOT at HEAD, use interactive rebase:
```bash
# 1. Start interactive rebase
git rebase -i <commit>^ # Parent of commit to edit
# 2. Change 'pick' to 'edit' for the target commit
# 3. Make changes when rebase stops
git add <files>
git commit --amend
# 4. Continue rebase
git rebase --continue
```
## Error Recovery
```bash
# If amend was wrong, check reflog for original:
git reflog
git reset --hard HEAD@{1} # Go back to before amend
```
## Success Criteria
- [ ] Verified HEAD is the commit to amend
- [ ] Verified commit not pushed to remote
- [ ] Changes staged before amend
- [ ] Commit message is appropriate
- [ ] No force push required (unless explicitly intended)
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.