github-enforcement

Audits branch protection posture and wires required status checks on GitHub repositories.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/chris-prener/dev-kit --skill github-enforcement-chris-prener
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github-enforcement
Source: https://github.com/chris-prener/dev-kit/tree/main/dev-kit/skills/github-enforcement
Command: npx skills add https://github.com/chris-prener/dev-kit --skill github-enforcement-chris-prener

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Personal and solo GitHub repositories have no branch protection configured by default, and it is hard to know what enforcement is actually in place without manually inspecting settings. This Skill makes the live enforcement posture visible and reproducibly wires CI jobs as required status checks. ## Core Features & Use Cases - Enforcement audit: Reads the live branch protection state via the GitHub API and reports signed commits, force-push blocking, deletion blocking, admin policy, active CI workflows, and required status checks in a structured table. - Required check wiring: Adds a CI workflow job as a required status check on the default branch while preserving any previously configured checks. - Plan-aware error handling: Distinguishes a missing configuration (HTTP 404) from branch protection being unavailable on the repo's plan (HTTP 403), reporting each as a distinct outcome. - Use Case: After bootstrapping a new personal repository, run an audit to confirm nothing is enforced yet, then wire your CI workflow's test job as a required check once the workflow has run at least once. ## Quick Start Ask Claude to audit the enforcement posture of the current repository and report which branch protection settings are configured.

Frequently Asked Questions about github-enforcement

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

FAQPage Schema
How do I check branch protection settings on a GitHub repo?▼

Run the audit operation, which queries the GitHub API for the repo's default branch protection and reports signed commits, force-push blocking, deletions, admin enforcement, and required status checks in a table. It works on the current repo or a remote repo via --repo.

How do I make a CI workflow a required status check on GitHub?▼

Use the configure-checks operation with the workflow name and job name. It verifies the workflow has run on the default branch, confirms branch protection exists, then patches the required_status_checks endpoint while preserving existing checks.

Why does branch protection return a 403 error on my private repo?▼

GitHub does not offer branch protection on private repositories under the free plan, so the API returns HTTP 403. The audit reports this as a distinct UNAVAILABLE outcome; you must make the repo public or upgrade the plan before configuring protection.

Can this skill create branch protection rules from scratch?▼

No. It audits existing protection and extends the required-checks list once protection exists, but it does not enable branch protection on a repo that has none. That initial configuration is a deliberate manual change via GitHub settings or the API.

Does the audit assume the default branch is main?▼

No. Both operations resolve the repository's actual default branch through the GitHub API before running any checks, so repos using master or other default branch names are handled correctly.