skills/git-workflows/skills/sync/SKILL.md
Fetch and show remote changes without modifying local branch
npx skillsauth add dtsong/my-claude-setup Git SyncInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
git fetch --prune which updates remote tracking refs and removes stale ones.., shell metacharacters, or null bytes.--all accepted. Reject arbitrary strings.Fetch the latest changes from remote without modifying your local branch. Shows what's new upstream.
/git-sync # Fetch all remotes and show status
/git-sync origin # Fetch specific remote
/git-sync --all # Fetch all remotes including tags
# Fetch from all remotes with prune
git fetch --all --prune
# Get current branch
git branch --show-current
# Check remote tracking status
git status -sb
# Get the remote tracking branch
REMOTE_BRANCH=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null)
# If tracking branch exists, show difference
if [ -n "$REMOTE_BRANCH" ]; then
# Commits behind (on remote but not local)
git log --oneline HEAD..$REMOTE_BRANCH
# Commits ahead (on local but not remote)
git log --oneline $REMOTE_BRANCH..HEAD
fi
# Files that would change on pull
git diff --stat HEAD..@{u} 2>/dev/null
Fetched from origin, upstream
Current branch: feat/dark-mode
Tracking: origin/feat/dark-mode
Behind by 3 commits:
abc1234 Fix theme persistence
def5678 Update color palette
ghi9012 Add system theme detection
Ahead by 1 commit:
xyz7890 WIP: toggle component
Files that would change on pull:
src/theme/colors.ts | 12 ++++++------
src/hooks/useTheme.ts | 45 +++++++++++++++++++++++++++++++++++++++++++++
Next steps:
/git-pull # Pull the changes
/git-stash # Stash local changes first
Branch 'feat/local-only' has no upstream tracking branch.
To set tracking:
git branch --set-upstream-to=origin/feat/local-only
Or push with tracking:
git push -u origin feat/local-only
Current branch: main
Tracking: origin/main
Already up to date.
Failed to fetch from origin: Could not resolve host: github.com
Check your network connection and try again.
/git-pull to apply the fetched changes/git-stash if you have uncommitted changes to save first/git-branches to see status of all branchesdevelopment
Use when planning implementation steps, deciding commit format, or structuring development approach. Provides brainstorm-plan-implement flow with conventional commits. Triggers on 'how should I approach this', 'commit format'.
development
Security audit checklist for web applications. Use when reviewing, auditing, or hardening a web app's security posture. Covers rate limiting, auth headers, IP blocking, CORS, security middleware, input validation, file upload limits, ORM usage, and password hashing. Triggers on requests like "review security", "harden this app", "security audit", "check for vulnerabilities", or when building/reviewing API endpoints.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.