git-sync-manager-1-always-check-before-operating

Sub-skill of git-sync-manager: 1. Always Check Before Operating (+4).

5 stars

Best use case

git-sync-manager-1-always-check-before-operating is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of git-sync-manager: 1. Always Check Before Operating (+4).

Teams using git-sync-manager-1-always-check-before-operating should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/1-always-check-before-operating/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_core/bash/git-sync-manager/1-always-check-before-operating/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/1-always-check-before-operating/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How git-sync-manager-1-always-check-before-operating Compares

Feature / Agentgit-sync-manager-1-always-check-before-operatingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of git-sync-manager: 1. Always Check Before Operating (+4).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 1. Always Check Before Operating (+4)

## 1. Always Check Before Operating

```bash
# Check for uncommitted changes before destructive operations
if ! git diff --quiet; then
    echo "Error: uncommitted changes"
    exit 1
fi
```


## 2. Use --no-verify for Batch Commits

```bash
# Skip hooks in batch operations for speed
git commit -m "message" --no-verify
```


## 3. Handle Offline/Network Errors Gracefully

```bash
# Suppress errors and provide fallback
if ! git pull --quiet 2>/dev/null; then
    echo "Warning: could not pull (offline?)"
fi
```


## 4. Track Operation Statistics

```bash
# Always maintain counters for summary
SUCCESS=0; FAILED=0; SKIPPED=0
# Update appropriately in each operation
```


## 5. Validate Git Repositories

```bash
# Always check .git directory exists
[[ -d "$repo/.git" ]] || continue
```

Related Skills

worktree-pre-push-bypass-for-tier1-checks

5
from vamseeachanta/workspace-hub

Handle workspace-hub integration-branch pushes from isolated git worktrees when the pre-push hook incorrectly assumes sibling tier-1 repos exist under the worktree path.

worktree-branch-sync-hygiene

5
from vamseeachanta/workspace-hub

Class-level branch, worktree, dirty-main, stash, sync, and hook hygiene for workspace-hub style multi-repo work.

verify-Codex-run-commit-vs-working-tree-before-closing

5
from vamseeachanta/workspace-hub

After a Codex implementation run, verify the claimed file set against the actual commit and working tree before treating the issue as fully complete.

repo-sync

5
from vamseeachanta/workspace-hub

Smart repository synchronization across workspace-hub ecosystem — diagnoses and fixes pull failures (detached HEAD, diverged branches, uncommitted changes)

multi-repo-sync-diagnosis-repair

5
from vamseeachanta/workspace-hub

Diagnose and repair failed pulls across multi-repo ecosystems with stale locks, submodule conflicts, and untracked files

multi-repo-sync-diagnosis-and-repair

5
from vamseeachanta/workspace-hub

Systematic approach to diagnosing and repairing failures across a multi-repo workspace

workspace-hub-sync-root-churn-catchup

5
from vamseeachanta/workspace-hub

Catch up workspace-hub root changes that continue to appear during repo sync because live review/agent processes keep writing files after commits

workspace-hub-sync-concurrent-writer-blocks

5
from vamseeachanta/workspace-hub

Handle repository_sync cleanup when workspace-hub root is being mutated by concurrent Codex/Codex/Gemini sessions.

user-approved-plan-state-sync

5
from vamseeachanta/workspace-hub

Reconcile GitHub and local repo state when a plan has been user-approved, including direct approval messages that require creating the local marker and moving the issue to status:plan-approved.

repo-sync-deleted-remote-branch-and-unrelated-history-recovery

5
from vamseeachanta/workspace-hub

Recover multi-repo sync failures caused by deleted upstream branches, stale git index locks, and local branches with unrelated history to the remote default branch.

plan-rerun-review-state-sync

5
from vamseeachanta/workspace-hub

Keep iterative plan-review reruns truthful by syncing prompt files, canonical review artifacts, and the plan's own review-summary narrative after each adversarial wave.

gh-work-execution-checklist

5
from vamseeachanta/workspace-hub

Compact live-execution checklist companion for approved GitHub issue work. Use during active implementation as a fast operational route; gh-work-execution remains the canonical source of truth.