git-sync-manager-3-repository-status-check
Sub-skill of git-sync-manager: 3. Repository Status Check (+1).
Best use case
git-sync-manager-3-repository-status-check is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of git-sync-manager: 3. Repository Status Check (+1).
Teams using git-sync-manager-3-repository-status-check 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/3-repository-status-check/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How git-sync-manager-3-repository-status-check Compares
| Feature / Agent | git-sync-manager-3-repository-status-check | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of git-sync-manager: 3. Repository Status Check (+1).
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
# 3. Repository Status Check (+1)
## 3. Repository Status Check
Get detailed status for multiple repositories:
```bash
#!/bin/bash
# ABOUTME: Check git status across multiple repositories
# ABOUTME: Reports uncommitted, unpushed, and behind-remote states
check_repo_status() {
local repo="$1"
if [[ ! -d "$repo/.git" ]]; then
echo "not_git"
return
fi
cd "$repo" || return
# Check for uncommitted changes
if ! git diff --quiet 2>/dev/null || ! git diff --cached --quiet 2>/dev/null; then
echo "uncommitted"
return
fi
# Check for unpushed commits
local branch
branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
local ahead
ahead=$(git rev-list --count "origin/$branch..HEAD" 2>/dev/null || echo "0")
if [[ "$ahead" -gt 0 ]]; then
echo "unpushed"
return
fi
# Check if behind remote
git fetch origin "$branch" --quiet 2>/dev/null
local behind
behind=$(git rev-list --count "HEAD..origin/$branch" 2>/dev/null || echo "0")
if [[ "$behind" -gt 0 ]]; then
echo "behind"
return
fi
echo "clean"
}
# Batch status check
batch_status() {
local repos=("$@")
printf "%-30s %-15s %s\n" "Repository" "Status" "Branch"
printf "%s\n" "────────────────────────────────────────────────────────"
for repo in "${repos[@]}"; do
local status
status=$(check_repo_status "$repo")
local branch="N/A"
if [[ -d "$repo/.git" ]]; then
branch=$(cd "$repo" && git rev-parse --abbrev-ref HEAD 2>/dev/null)
fi
local color=""
case "$status" in
clean) color="${GREEN}" ;;
uncommitted) color="${YELLOW}" ;;
unpushed) color="${CYAN}" ;;
behind) color="${RED}" ;;
*) color="${NC}" ;;
esac
printf "%-30s ${color}%-15s${NC} %s\n" "$repo" "$status" "$branch"
done
}
```
## 4. Category-Based Operations
Filter repositories by category (Work/Personal):
```bash
#!/bin/bash
# ABOUTME: Category-based repository filtering
# ABOUTME: Parse categories from .gitignore comments
declare -A REPO_CATEGORIES
# Parse categories from .gitignore comments
# Format: repo_name/ # Category
parse_categories() {
local gitignore="$1"
while IFS= read -r line; do
if [[ "$line" =~ ^([a-zA-Z0-9_-]+)/[[:space:]]*#[[:space:]]*(Personal|Work|Both)$ ]]; then
local name="${BASH_REMATCH[1]}"
local category="${BASH_REMATCH[2]}"
REPO_CATEGORIES["$name"]="$category"
fi
done < "$gitignore"
}
# Get repos by category
get_repos_by_category() {
local target_category="$1"
local repos=()
for repo in "${!REPO_CATEGORIES[@]}"; do
local category="${REPO_CATEGORIES[$repo]}"
if [[ "$category" == "$target_category" ]] || \
[[ "$target_category" == "all" ]] || \
[[ "$category" =~ $target_category ]]; then
repos+=("$repo")
fi
done
printf '%s\n' "${repos[@]}" | sort
}
# Usage
parse_categories ".gitignore"
echo "Work repositories:"
get_repos_by_category "Work"
echo "Personal repositories:"
get_repos_by_category "Personal"
```Related Skills
worktree-pre-push-bypass-for-tier1-checks
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
Class-level branch, worktree, dirty-main, stash, sync, and hook hygiene for workspace-hub style multi-repo work.
repo-sync
Smart repository synchronization across workspace-hub ecosystem — diagnoses and fixes pull failures (detached HEAD, diverged branches, uncommitted changes)
multi-repo-sync-diagnosis-repair
Diagnose and repair failed pulls across multi-repo ecosystems with stale locks, submodule conflicts, and untracked files
multi-repo-sync-diagnosis-and-repair
Systematic approach to diagnosing and repairing failures across a multi-repo workspace
workspace-hub-sync-root-churn-catchup
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
Handle repository_sync cleanup when workspace-hub root is being mutated by concurrent Codex/Codex/Gemini sessions.
user-approved-plan-state-sync
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
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
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
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.
background-service-manager
Create and manage long-running background processes with start/stop/status controls, logging, and monitoring. Use for batch processing jobs, data pipelines, continuous services, or any long-running tasks.