Sub-skill of sync: Error Handling.
Scanned 9/9/2026
Install to Claude Code
npx -y skills add vamseeachanta/workspace-hub --skill error-handling --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Error Handling?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/vamseeachanta-error-handling-1904577a)More formats (shields.io, HTML) on the badges page.
---
name: sync-error-handling
description: 'Sub-skill of sync: Error Handling.'
version: 1.0.0
category: workspace
type: reference
scripts_exempt: true
---
# 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
```
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Understand the components, mechanics, and constraints of context in agent systems. Use when designing agent architectures, debugging context-related failures, or optimizing context usage.