gate-repo

Deploys GitHub default-branch protection rulesets from a controls register with explicit confirmation.

1|Updated Aug 16, 2026
One-click install
npx skills add https://github.com/Eaiger-Ent/ee-standard --skill gate-repo-eaiger-ent
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gate-repo
Source: https://github.com/Eaiger-Ent/ee-standard/tree/main/plugins/control-register/skills/gate-repo
Command: npx skills add https://github.com/Eaiger-Ent/ee-standard --skill gate-repo-eaiger-ent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Branch protection is often declared in a file but never actually enforced on the platform, leaving the default branch writable without review or passing checks. This Skill records the required GitHub ruleset in the repository and applies it through the GitHub API, closing the gap between stated policy and enforced protection. ## Core Features & Use Cases - Register-driven ruleset generation: Reads CI-001 requirements from controls.yaml and renders them into a stamped .github/rulesets/default-branch.json record, so the register is the single source of truth. - Confirmed platform mutation: Creates or replaces GitHub rulesets via the API only after an explicit per-call confirmation of blast radius, and migrates legacy classic branch protection safely. - Checker-based verification: Runs register-check run --control CI-001 afterwards and reports its verdict verbatim, distinguishing verified enforcement from credential-skipped checks. - Use Case: While adopting a control standard across a repository, you need the default branch to require pull requests and passing status checks. Run this Skill to record the ruleset, confirm the change, apply it to GitHub, and verify enforcement in one audited flow. ## Quick Start Ask the assistant to deploy gate-repo against the current repository so the default branch is protected by the ruleset the register requires.

Frequently Asked Questions about gate-repo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I protect the default branch with a GitHub ruleset?▼

Run the gate-repo skill, which reads CI-001 requirements from controls.yaml, writes a stamped ruleset record to .github/rulesets/default-branch.json, and applies it via the GitHub API after you confirm the blast radius. Verification runs through register-check afterwards.

How to migrate from classic branch protection to GitHub rulesets?▼

The skill detects existing classic branch protection, applies the new ruleset first, confirms it is active, then asks separately whether to remove the classic rule. Both apply simultaneously until removal, so protection is never reduced during migration.

Does this skill work without a GitHub admin token?▼

No. Applying rulesets requires a token with administration: write scope, which a human with repository admin must grant. Without it, the skill stops before writing anything rather than leaving a repository that looks protected but is not.

Why does the ruleset file in my repo not protect the branch?▼

GitHub does not read ruleset files from your repository; only the API call enforces them. The recorded file is a reviewable record of intent, and the skill applies it through the API and verifies enforcement separately.

What happens if a ruleset with the same name already exists?▼

The skill reads the existing ruleset, names exactly what a PUT replacement would drop, and asks for confirmation before updating. It never creates a duplicate ruleset or silently discards rules a human added.