Skip to content

0x0w1/jig / .claude/skills/github-sync

github-sync

Verified

Use when synchronizing this repository's GitHub setup: main/develop branches, optional branch protection, and the managed local guards (the git pre-push hook plus the native Codex and Antigravity push hooks), including guard cleanup before uninstalling jig. Do not use for creating a release.

FileKindSize
SKILL.mdskill md17.7 KB
assets/guard-push.shexecutablescript2.5 KB
assets/pre-pushexecutablescript1.9 KB
scripts/classify-protection.shexecutablescript5.0 KB
scripts/manage-native-hooks.shexecutablescript14.4 KB
scripts/manage-pre-push.shexecutablescript4.2 KB
scripts/plan-protection.shscript1.3 KB
scripts/protection-request.jqother3.1 KB

assets/pre-push

View on GitHub
#!/bin/sh
# jig:pre-push v3
# jig local guard. Blocks force pushes to and deletion of main/develop, and
# direct pushes to main that come from neither develop nor a hotfix branch.
# Server-side branch
# protection remains the final defense. Do not bypass with --no-verify.

zero=0000000000000000000000000000000000000000

while read -r local_ref local_sha remote_ref remote_sha; do
  case "$remote_ref" in
    refs/heads/main|refs/heads/develop) ;;
    *) continue ;;
  esac

  if [ "$local_sha" = "$zero" ]; then
    echo "jig pre-push: deleting $remote_ref is blocked. Protected branches are never deleted." >&2
    exit 1
  fi

  if [ "$remote_ref" = "refs/heads/main" ]; then
    case "$local_ref" in
      refs/heads/develop) ;;
      refs/heads/hotfix/?*)
        # A hotfix lands exactly one squashed commit on top of the released main.
        # More than one means the branch did not start from main -- most often it
        # started from develop and would carry unreleased work into the release.
        if [ "$remote_sha" != "$zero" ] && git cat-file -e "$remote_sha" 2>/dev/null; then
          ahead=$(git rev-list --count "$remote_sha..$local_sha" 2>/dev/null || echo unknown)
          if [ "$ahead" != "1" ]; then
            echo "jig pre-push: a hotfix push must be exactly one commit ahead of main, found $ahead. Branch from origin/main and squash with: git reset --soft origin/main" >&2
            exit 1
          fi
        fi
        ;;
      *)
        echo "jig pre-push: direct push to main is blocked. Release with: git push origin develop:main, or hotfix-flow with: git push origin hotfix/<slug>:main" >&2
        exit 1
        ;;
    esac
  fi

  if [ "$remote_sha" != "$zero" ] && git cat-file -e "$remote_sha" 2>/dev/null; then
    if ! git merge-base --is-ancestor "$remote_sha" "$local_sha"; then
      echo "jig pre-push: non-fast-forward push to $remote_ref is blocked. Never force push a protected branch." >&2
      exit 1
    fi
  fi
done

exit 0
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 321kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 321kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 321kUpdated Claude CodeCodexVerifiedInstall