skills/sync/SKILL.md
Sync local repository with origin/main. Use before starting new work, after completing a PR, or when needing latest upstream changes. Safely stashes uncommitted changes, fetches and pulls origin/main, restores stash, and cleans up stale local branches (merged or with deleted remotes). Invoke when switching contexts or preparing for new feature work.
npx skillsauth add slamb2k/mad-skills 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.
When this skill is invoked, IMMEDIATELY output the banner below before doing anything else. Pick ONE tagline at random — vary your choice each time. CRITICAL: Reproduce the banner EXACTLY character-for-character. The first line of the art has 4 leading spaces — you MUST preserve them.
{tagline}
⠀ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗
██╔╝██╔════╝╚██╗ ██╔╝████╗ ██║██╔════╝
██╔╝ ███████╗ ╚████╔╝ ██╔██╗ ██║██║
██╔╝ ╚════██║ ╚██╔╝ ██║╚██╗██║██║
██╔╝ ███████║ ██║ ██║ ╚████║╚██████╗
╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═════╝
Taglines:
After the banner, display parsed input:
┌─ Input ────────────────────────────────────────
│ {Field}: {value}
│ Flags: {parsed flags or "none"}
└────────────────────────────────────────────────
Pre-flight results:
── Pre-flight ───────────────────────────────────
✅ {dep} {version or "found"}
⚠️ {dep} not found → {fallback detail}
❌ {dep} missing → stopping
──────────────────────────────────────────────────
Stage/phase headers: ━━ {N} · {Name} ━━━━━━━━━━━━━━━━━━━━━━━━━
Status icons: ✅ done · ❌ failed · ⚠️ degraded · ⏳ working · ⏭️ skipped
Synchronize local repository with the remote default branch using a deterministic bash script — no LLM subagent needed since all steps are pure git commands.
Parse optional flags from the request:
--no-stash: Don't auto-stash uncommitted changes--no-cleanup: Don't delete stale local branches--no-rebase: Use merge instead of rebase when on a feature branchBefore starting, check all dependencies in this table:
| Dependency | Type | Check | Required | Resolution | Detail |
|-----------|------|-------|----------|------------|--------|
| git | cli | git --version | yes | stop | Install from https://git-scm.com |
For each row, in order:
Before launching the subagent, detect the remote and default branch:
REMOTE=$(git remote | head -1) # usually "origin"
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/$REMOTE/HEAD 2>/dev/null | sed 's|.*/||')
Fallback chain if symbolic-ref fails:
git show-ref --verify refs/heads/main → use maingit show-ref --verify refs/heads/master → use masterPass {REMOTE} and {DEFAULT_BRANCH} into the subagent prompt.
Run the sync script directly — no LLM subagent needed since all steps are deterministic git commands:
# Resolve skill root (plugin install or direct install)
for SKILL_ROOT in \
"${CLAUDE_PLUGIN_ROOT:-}" \
"$HOME/.claude/plugins/marketplaces/slamb2k" \
"$(dirname "$(readlink -f "$0")")/.."
do
[ -f "$SKILL_ROOT/skills/sync/scripts/sync.sh" ] && break
done
bash "$SKILL_ROOT/skills/sync/scripts/sync.sh" \
"{REMOTE}" "{DEFAULT_BRANCH}" {FLAGS}
Parse the output between SYNC_REPORT_BEGIN and SYNC_REPORT_END markers.
Extract key=value pairs for the report fields: status, remote,
default_branch, main_updated_to, current_branch, stash, rebase,
branches_cleaned, errors.
Exit codes: 0=success, 1=fatal error, 2=partial success (conflict warnings).
Parse the subagent's SYNC_REPORT and present a clean summary:
┌─ Sync · Report ────────────────────────────────
│
│ ✅ Sync complete
│
│ 🌿 Main: {commit} — {message}
│ 🔀 Branch: {current_branch}
│ 📦 Stash: {restored|none|conflict}
│ 🧹 Cleaned: {branches or "none"}
│
└─────────────────────────────────────────────────
If errors occurred:
│ ❌ {error description}
│ {suggested resolution}
testing
Run the full OMC idea-to-merged-PR pipeline — cancel + deep-interview + ralplan + autopilot + mad-skills:ship — in a single invocation. Explicit-only; this skill never auto-activates. Only run when the user literally types /launch. Do not invoke on phrases like "launch this", "ship it", "full pipeline", or similar — none of those should trigger this skill.
testing
Ship changes through the full PR lifecycle. Use after completing feature work to commit, push, create PR, wait for checks, and merge. Handles the entire workflow: syncs with main, creates feature branch if needed, groups commits logically with semantic messages, creates detailed PR, monitors CI, fixes issues, squash merges, and cleans up. Invoke when work is ready to ship.
development
Generate container-based release pipelines that build once and promote immutable artifacts through environments (dev → staging → prod). Detects your stack, interviews for infrastructure choices, then outputs deterministic CI/CD files (Dockerfile, workflows, deployment manifests) that run without an LLM. Use when setting up deployment pipelines, containerizing an app, creating release workflows, or connecting CI to container-friendly infrastructure (Azure Container Apps, AWS Fargate, Google Cloud Run, Kubernetes, Dokku, Coolify, CapRover, etc.).
development
Initialize any project directory with a standard scaffold for AI-assisted development. Creates specs/ and context/ directories, a project CLAUDE.md with development workflow and guardrails, .gitignore, and branch protection. Recommends claude-mem for persistent memory. Idempotent — safe to run on existing projects. Triggers: "init project", "setup brace", "brace", "initialize", "bootstrap", "scaffold".