Przejdź do treści
Biblioteka skilli
DevOps i chmura · Przegląd i audyt

gh-protect

/gh-protect

Audytuje lub stosuje na GitHubie ochronę gałęzi, reguły tagów, ustawienia bezpieczeństwa repozytorium i wymagania podpisów zgodnie z aktywnym profilem.

Repozytorium
nyann ↗
Licencja
MIT
Ostatnia zmiana repozytorium
22.08.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 22.08.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Audytuje lub stosuje na GitHubie ochronę gałęzi, reguły tagów, ustawienia bezpieczeństwa repozytorium i wymagania podpisów zgodnie z aktywnym profilem.

Wyzwalacze z opisu

check branch protectionaudit GitHub protectionapply branch protectionenforce branch protectionset up branch protectionconfigure branch rulescheck tag protectionaudit repo security
Oryginalny opis (EN)

Audit or apply GitHub branch protection, tag rulesets, repo security settings, and signing requirements based on the active profile. TRIGGER when the user says "check branch protection", "audit GitHub protection", "apply branch protection", "enforce branch protection", "set up branch protection", "configure branch rules", "check tag protection", "audit repo security", "apply GitHub settings", "enable branch protection", "protection audit", "are my branches protected", "/nyann:gh-protect". Do NOT trigger on "is this repo healthy" — that's `doctor` (which includes a protection check among many o

Jak działa

  1. 1. Pre-flight
  2. 2. Resolve profile
  3. 3. Audit first (always)
  4. 4. Offer to apply (if drift found)
  5. 5. Report
  6. When to hand off
Sekcje z nagłówków SKILL.md, w oryginale · 90 linii, 488 słów
Podgląd SKILL.md
---
name: gh-protect
description: >
  Audit or apply GitHub branch protection, tag rulesets, repo security
  settings, and signing requirements based on the active profile.
  TRIGGER when the user says "check branch protection", "audit GitHub
  protection", "apply branch protection", "enforce branch protection",
  "set up branch protection", "configure branch rules", "check tag
  protection", "audit repo security", "apply GitHub settings",
  "enable branch protection", "protection audit", "are my branches
  protected", "/nyann:gh-protect".
  Do NOT trigger on "is this repo healthy" — that's `doctor` (which
  includes a protection check among many other signals).
  Do NOT trigger on "bootstrap this project" — bootstrap applies
  protection as one step of the full pipeline.
---

# gh-protect

Standalone GitHub protection management. Wraps `bin/gh-integration.sh`
in two modes: `--check` (read-only audit) and apply (write). Lets
users manage branch protection, tag rulesets, signing requirements,
and repo-level merge settings independently of bootstrap or doctor.

## 1. Pre-flight

Guard on `gh`:
```
command -v gh && gh auth status
```
If either fails, tell the user `gh` is required for this skill and
stop. Unlike other skills that soft-skip, protection management has
no useful fallback without `gh`.

## 2. Resolve profile

Load the active profile via `bin/load-profile.sh <name>`
(resolves preferences → CLAUDE.md markers → `"default"` fallback).

If the user names a specific profile, use that instead.

## 3. Audit first (always)

Run the read-only check regardless of whether the user asked to audit
or apply — the delta informs what apply would change:

```
bin/gh-integration.sh --target <cwd> --profile <name> --check
```

Output conforms to `schemas/protection-audit.schema.json`. Show the
user a summary table:

| Area | Expected | Actual | Drift |
|---|---|---|---|
| Branch protection (`branches[]`) | from profile | from GitHub API | critical / warn / ok |
| Tag rulesets | `.github.tag_protection_pattern` | GitHub Rulesets API | critical / warn / ok |
| CODEOWNERS gate | `.github.require_code_owner_reviews` | branch protection | critical / warn / ok |
| Signing | `.github.require_signed_commits/tags` | branch protection + local git config | critical / warn / ok |
| Repo settings | `.github.allow_*_merge`, `delete_branch_on_merge` | repo API | warn / ok |
| Security signals | Dependabot, secret scanning, push protection, code scanning | repo API | info |

If everything is `ok`, report "protection matches profile" and stop
(no apply needed).

## 4. Offer to apply (if drift found)

If any drift exists at `critical` or `warn` level, ask:

"Apply protection rules to match the profile? This will update
branch protection via the GitHub API."

On confirmation:
```
bin/gh-integration.sh --target <cwd> --profile <name>
```

The apply mode never downgrades stricter remote rules — it only
tightens. Relay this constraint so the user understands that loosening
protection requires manual GitHub UI changes.

Output is a GhIntegrationResult JSON
(`schemas/gh-integration-result.schema.json`). Report:
- `applied[]` — rules that were created or updated.
- `noop[]` — rules already at or above the expected level.
- `errors[]` — rules that failed to apply (permission issues, etc.).

## 5. Report

After audit-only or audit+apply, end with:
- Protection status per branch (protected / unprotected / partial).
- Tag ruleset status.
- Any `errors[]` that need manual attention.

## When to hand off

- "Check overall repo health" → `doctor` skill (includes protection
  as one signal among many).
- "Set up this repo from scratch" → `bootstrap-project` skill (applies
  protection as part of the full pipeline).
- "I changed my profile's GitHub settings" → re-run this skill to
  apply the updated expectations.
- "Loosen a protection rule" → explain that `gh-integration.sh` never
  downgrades; the user must change the rule via the GitHub UI or API
  directly.

Wersje

W bazie nie ma innych skilli o nazwie gh-protect.

Migawka bazy z 13.11.2026 · wersja paczki dc1c02988029 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 2 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100git-workflow-setup
    Konfiguruje Git Flow lub GitHub Flow z ochroną gałęzi i ustawieniami bezpieczeństwa.
  • 85repository-protection
    Opisuje, jak stosować i synchronizować reguły gałęzi i tagów, wymagane sprawdzenia oraz workflow bootstrapu w repozytorium.
  • 100repo-settings
    Ujednolica ustawienia repozytorium GitHub: opis, metody scalania, reguły gałęzi, etykiety, Dependabot i profil społeczności.
  • 100github
    Obsługuje operacje na repozytorium GitHub: PR-y, zgłoszenia, wydania, ochronę gałęzi, CODEOWNERS, Dependabota i audyty ustawień repozytorium.
  • 100repo-setup
    Przygotowuje nowe lub publiczne repozytorium GitHub: pliki wspólnoty, licencję, ochronę gałęzi, CI, szablony i zgłoszenia podatności.
  • 100okhp3-repository-settings
    Audytuje i konfiguruje ustawienia repozytorium GitHub, w tym ochronę gałęzi, Actions, Pages, środowiska i przegląd Copilota, weryfikując każdy zapis.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.