git
Git operations and worktree management
What this skill does
# Git Mode **Recommended model tier:** balanced (sonnet) - this skill performs straightforward operations Expert git operations including worktree management for parallel work. ## Commit Guidelines ### Message Format ``` <type>: <short description> [optional body] ``` Types: `feat`, `fix`, `refactor`, `docs`, `test`, `chore` ### Commit Process 1. Check status: `git status` 2. Review diff: `git diff` 3. Stage specific files (not `git add .`) 4. Write descriptive message 5. Never skip hooks unless explicitly asked ## Worktree Management ### Create Worktree ```bash # For feature work git worktree add ../feature-branch -b feature/name # For parallel tasks git worktree add ../aide-worktrees/task-1 -b aide/task-1 ``` ### List Worktrees ```bash git worktree list ``` ### Remove Worktree ```bash git worktree remove ../feature-branch git branch -d feature/name # if merged ``` ## Common Operations ### Feature Branch Workflow ```bash git checkout -b feature/name # ... work ... git add <specific-files> git commit -m "feat: add feature" git push -u origin feature/name ``` ### Rebase onto Main ```bash git fetch origin git rebase origin/main # resolve conflicts if any git push --force-with-lease ``` ### Cherry-Pick ```bash git cherry-pick <commit-hash> ``` ### Stash ```bash git stash push -m "description" git stash list git stash pop ``` ## Safety Rules **Never run without explicit user request:** - `git push --force` (use `--force-with-lease` if needed) - `git reset --hard` - `git clean -f` - `git checkout .` or `git restore .` **Safe operations:** - `git status`, `git diff`, `git log` - `git add <specific-files>` - `git commit` - `git push` (without force) - `git worktree` operations ## Failure Handling ### Commit failures: 1. **Pre-commit hook failure** - Read the error, fix the issue, create NEW commit (never amend after hook failure) 2. **Merge conflict** - Report conflicts, do not auto-resolve without explicit request 3. **Push rejected** - Fetch and rebase, report if conflicts arise ### Worktree failures: 1. **Branch already exists** - Use different name or checkout existing 2. **Dirty working tree** - Stash or commit before worktree operations 3. **Locked worktree** - Check `git worktree list` for stale entries, use `git worktree prune` ### Recovery commands: ```bash # Recover from bad merge (before commit) git merge --abort # Recover from bad rebase (before complete) git rebase --abort # Prune stale worktrees git worktree prune ``` ## Verification Criteria ### After commit: ```bash # Verify commit was created git log -1 --oneline # Verify expected files changed git show --stat HEAD ``` ### After push: ```bash # Verify remote updated git log origin/<branch> -1 --oneline ``` ### After worktree creation: ```bash # Verify worktree exists git worktree list | grep <worktree-path> # Verify branch created git branch -a | grep <branch-name> ``` ## Change Context with Findings When reviewing diffs or preparing commits, use findings tools to understand the quality context of changed code: - `mcp__plugin_aide_aide__findings_search` — Search for known issues (complexity, secrets, clones) in changed files - `mcp__plugin_aide_aide__findings_list` — List all findings for a specific file to understand its health - `mcp__plugin_aide_aide__findings_stats` — Quick overview of finding counts across the project This helps surface pre-existing issues in files you're touching, and can inform whether a commit should also address nearby problems. ## Parallel Work Pattern For swarm mode or parallel features: ```bash # Setup git worktree add ../work-1 -b feature/part-1 git worktree add ../work-2 -b feature/part-2 # Work in parallel (different terminals/agents) cd ../work-1 && # ... implement part 1 cd ../work-2 && # ... implement part 2 # Merge git checkout main git merge feature/part-1 git merge feature/part-2 # Cleanup git worktree remove ../work-1 git worktree remove ../work-2 git branch -d feature/part-1 feature/part-2 ```
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.