swain-sync

Installation
SKILL.md

Before proceeding with any state-changing operation, check for an active session:

REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
bash "$REPO_ROOT/.agents/bin/swain-session-check.sh" 2>/dev/null

If the JSON output has "status" other than "active", inform the operator: "No active session — start one with /swain-init?" Proceed if they dismiss.

Run through the following steps in order without pausing for confirmation unless a decision point is explicitly marked as requiring one.

Delegate this to a sub-agent so the main conversation thread stays clean. Include the full text of these instructions in the agent prompt, since sub-agents cannot read skill files directly.

Step 1 — Detect worktree context and fetch/rebase upstream

First, detect whether you are running in a git linked worktree:

GIT_COMMON=$(git rev-parse --git-common-dir)
Related skills

More from cristoslc/swain

Installs
85
Repository
cristoslc/swain
GitHub Stars
2
First Seen
Mar 13, 2026