| name | repo-status |
| description | Comprehensive workspace status report — every peer repo's branch + clean state, every cached install path, every open PR across the agentteamland org, with stale-merged-branch warnings and one-line cleanup commands. Use when the user asks "are all repos on main", "any open PRs", "is the working tree clean", "anything pending", "what's the state", or whenever the user wants to verify nothing has drifted. Self-contained — no follow-up prompts, just runs the checks and reports. |
/repo-status — workspace state monitor
Purpose
Give the user a single command to verify:
- Workspace itself — branch, clean state, distance from main
- Peer repos under
repos/ — each one's branch, clean state, ahead/behind
- Cached install paths under
~/.claude/repos/agentteamland/ — same checks (these can drift independently from repos/)
- Open PRs across the
agentteamland/ org — what's awaiting review or merge
- Stale-merged branches — local branches still checked out where the remote PR was already merged (this is the recurring drift problem)
Output is structured for quick scanning. Action items are listed at the bottom with copy-pasteable commands.
Why this exists — the incident
On 2026-04-25 a session shipped three PRs (design-system-team@0.5.0, workspace state snapshot, core@1.4.0). After all three were merged, six local repos remained checked out on the now-stale feature branches. No work was lost, but the working tree was misleading: the user had to ask "are we on main and clean everywhere?" to surface the drift. This skill exists so the answer to that question is one command away, anytime.
Trigger phrases
Run this skill whenever the user asks something like:
- "are all repos on main?"
- "any open PRs?"
- "is the working tree clean everywhere?"
- "anything pending?"
- "is anything left over?"
- "/repo-status" (explicit invocation)
Trigger semantically — Claude maps equivalent phrasings (in any language) to the intent above.
If the user invokes /repo-status literally, run unconditionally.
Steps
1. Workspace itself
The skill is invoked from within the workspace, so git resolves the repo root automatically from any subdirectory — no cd to a hard-coded path needed.
git fetch origin --prune --quiet
echo "Branch: $(git branch --show-current)"
echo "Status: $(git status --porcelain | wc -l | xargs) uncommitted change(s)"
git log --oneline @{u}..HEAD 2>/dev/null | sed 's/^/Unpushed: /'
git log --oneline HEAD..@{u} 2>/dev/null | sed 's/^/Behind: /'
If the cwd somehow drifted outside the workspace, recover with cd "$(git rev-parse --show-toplevel)" — but that's a fallback, not the normal path.
2. Peer repos under workspace/repos/
Use the existing helper (one liner):
./scripts/status.sh
This returns a table with REPO / BRANCH / AHEAD / BEHIND / STATUS columns. Read it and parse for anomalies.
3. Cached install paths under ~/.claude/repos/agentteamland/
./scripts/status.sh does NOT cover the cached paths — they're independent clones that atl uses for skill/rule resolution. Loop manually:
for repo in ~/.claude/repos/agentteamland/*/; do
name=$(basename "$repo")
[[ -d "$repo/.git" ]] || { echo "[non-git] $name"; continue; }
cd "$repo" >/dev/null
branch=$(git branch --show-current)
ahead=$(git rev-list --count @{u}..HEAD 2>/dev/null || echo "?")
behind=$(git rev-list --count HEAD..@{u} 2>/dev/null || echo "?")
dirty=$(git status --porcelain | wc -l | xargs)
printf "%-30s %-40s ahead=%s behind=%s dirty=%s\n" "$name" "$branch" "$ahead" "$behind" "$dirty"
cd - >/dev/null
done
4. Open PRs across the org
for repo in atl workspace .github atl-e2e-team; do
prs=$(gh pr list --repo "agentteamland/$repo" --state open --json number,title,headRefName --jq '.[] | " #\(.number) [\(.headRefName)] \(.title)"' 2>/dev/null)
if [[ -n "$prs" ]]; then
echo "agentteamland/$repo:"
echo "$prs"
fi
done
5. Detect stale-merged branches
For every local branch that's NOT main/master in the workspace + each peer repo + each cached path: check if the remote tracking branch was deleted (= the PR was merged and the branch was removed from the remote).
git for-each-ref --format='%(refname:short) %(upstream:track)' refs/heads/ | grep -v '^main\|^master' | while read branch track; do
if [[ "$track" == *"gone"* ]]; then
echo " STALE: $branch (upstream gone — likely merged + deleted on remote)"
fi
done
A "stale" branch is harmless if you're not on it (it just sits there); it becomes a problem if you're CURRENTLY checked out on it, because:
- New work would go onto a branch named after old work
atl update --silent-if-clean pulls the branch you're on, not main
- Your local view of "what's the latest" is wrong by N commits
6. Compose the report
Output structure:
╔══════════════════════════════════════════════════════════════╗
║ Workspace status — {ISO timestamp} ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ 📍 Workspace itself ║
║ branch: {current} ║
║ clean: {yes/no} ║
║ ahead: {N commits} behind: {M commits} ║
║ ║
║ 📦 Peer repos (workspace/repos/) ║
║ [table from ./scripts/status.sh, with annotations] ║
║ ║
║ 🗂 Cached install paths (~/.claude/repos/agentteamland/) ║
║ [parallel table] ║
║ ║
║ 📬 Open PRs across the org ║
║ [list grouped by repo, or "(none)"] ║
║ ║
║ ⚠ Stale-merged branches ║
║ [list — branch name + which repo + how to clean up] ║
║ or "(none — clean)" ║
║ ║
║ ✅ Suggested actions ║
║ [copy-pasteable commands for any drift detected] ║
║ ║
╚══════════════════════════════════════════════════════════════╝
Use this exact framing — the box drawing makes the report visually distinct from regular conversation. Length is fine; user is asking specifically for this view.
7. Suggested actions section
Always include this section. Categories:
- "Switch to main" — for every repo on a stale-merged feature branch. One-liner per repo.
- "PR awaiting review" — for every open PR authored by us. Include URL.
- "Behind remote" — for repos behind their tracked branch.
git pull per repo.
- "Stray non-git artifacts" — e.g., the
https: directory under ~/.claude/repos/agentteamland/ from a botched clone. Surface but don't auto-delete.
If there are no actions, say "(no action needed — everything clean)" explicitly so the user gets unambiguous confirmation.
Important rules
- Read-only. This skill never modifies anything. It only reports. Cleanup commands are surfaced as suggestions for the user to run (or to ask Claude to run with explicit consent).
- Don't skip the cached paths. They are a known drift source — they got missed in past sessions because
./scripts/status.sh doesn't cover them. The drift report IS the value.
- Don't skip
winget-pkgs. Just call out that it's expected to be far behind microsoft's master. Confusing-but-correct state needs to be acknowledged, not hidden.
- No auto-cleanup. Even if drift is glaringly obvious, don't switch branches or delete things without the user's explicit go-ahead. The whole point of this skill is to give visibility, not to act.
- Run fast. No web requests beyond
gh pr list. No fancy analysis. The user invokes this often — keep latency low.
Recovery patterns the skill should recognize
When drift is detected, the report should include the specific recovery command. Common patterns:
Output mode
The skill is invoked, runs the checks, and produces a single block of output as Claude's response. No follow-up prompts. The user reads, acts (or doesn't), conversation continues.
If the report is "(everything clean)" — keep it short. Three lines max. Don't pad.