Agent skill

sync-error-handling

Sub-skill of sync: Error Handling.

Stars 4
Forks 4

Install this agent skill to your Project

npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/workspace-hub/sync/error-handling

SKILL.md

Error Handling

Error Handling

Detached HEAD

bash
cd "$WORKSPACE_ROOT/$repo"
git checkout main 2>/dev/null || git checkout master
git pull --rebase origin main

Diverged History (force-pushed remote)

bash
# Detect: behind > 0 AND ahead > 0
# DO NOT auto-resolve — ask user:
echo "$repo has diverged: $BEHIND behind, $AHEAD ahead"
echo "Options: merge, reset --hard origin/main, or skip"

Stash Pop Conflict

bash
# Report to user, do NOT auto-resolve
echo "Stash pop conflict in $repo — manual resolution required"
git stash list

CRLF / Line Ending Issues

bash
# Fix shell scripts to LF
git config core.autocrlf input
# Or per-file: dos2unix script.sh

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results