What problem does it solve? Temporarily turning off a GitHub merge gate is risky: a repo can carry both classic branch protection and rulesets at once, reading one without admin rights returns a 404 that looks like "nothing configured", and deleting protection without a verified backup leaves no way to restore it. This Skill makes the whole operation safe by exporting both gate surfaces to a validated file before anything is deleted, and restoring only from that export. ## Core Features & Use Cases - Dual-surface export: Captures classic branch protection, required signed commits, and every ruleset (fetched by id, since the list endpoint omits rules and conditions) into one validated JSON document. - Guarded disable: Refuses to delete anything when a surface is unreadable, a ruleset's scope cannot be determined, or an org/enterprise ruleset would remain — exiting with code 3 and naming exactly what blocked the run. - Restore-only enable: Rebuilds classic protection via PUT (converting GET shapes to PUT shapes), restores signed commits through their own endpoint, and re-POSTs rulesets fresh, skipping ones already present. - Use Case: A release is blocked by "Required status check is expected" on main. Run scripts/merge_gate.sh disable myorg my-repo --branch main --export-to gate-backup.json, merge, then enable --from-export gate-backup.json to put the exact gate back. ## Quick Start Ask the assistant to export the merge gate for your GitHub repo's main branch, temporarily disable branch protection so a blocked PR can merge, and then restore the gate from the export file.