
safe-settings
Set up GitHub's safe-settings (a Probot-based GitHub App from the github org) for declarative, org-wide repository policy as code. Use when the user says "settings as code", "safe-settings", "manage repos declaratively", "centralize repo settings", "org-level branch protection", "scaffold an admin repo", "github settings app", or invokes /safe-settings on an org that wants to manage repo settings, branch protection, rulesets, labels, teams, environments, and collaborators from one admin repo. Scaffolds the admin-repo layout (settings.yml + suborgs/ + repos/), the GitHub App installation steps, and a scheduled full-sync GitHub Actions workflow. Distinct from /gh-bootstrap (one-shot gh api config of a single repo) — this skill is for org-scale settings as code that reconciles continuously. Not for per-task GitHub ops (PRs, issues, CI status) or local git work — those are out of this catalog's scope.
- Installs
- 69
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/paulnsorensen/git-gouda --skill safe-settings- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads safe-settings automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
safe-settings
Onboard github-community-projects/safe-settings — a Probot GitHub App that reconciles repo settings, branch protection, rulesets, labels, teams, environments, and collaborators from YAML files in a single admin repo.
Use this skill when an org wants to manage repository policy declaratively at scale, instead of clicking through each repo's settings page or running gh api one-shot scripts.
When to reach for safe-settings vs alternatives
| Situation | Tool |
|---|---|
| Single repo, one-time policy lockdown | /gh-bootstrap (gh CLI, imperative) |
| Many repos, central policy that must stay in sync, drift detection, dry-run on PR | safe-settings (this skill) |
| Per-task GitHub ops (PRs, issues, CI status) | out of this catalog's scope |
safe-settings is the right answer when policy is shared across repos and you want PRs + dry-run gating on policy changes themselves. It's overkill for a single repo.
What gets configured (by safe-settings, after this skill runs)
- Repo metadata (description, homepage, topics, visibility, default branch, feature toggles)
- Merge button settings (squash / merge / rebase, delete-on-merge, auto-merge, update-branch)
- Security toggles (vulnerability alerts, automated security fixes)
- Branch protection (classic) and rulesets (modern)
- Labels (with rename via
oldname, exclusion patterns) - Milestones
- Collaborators (per-user, with
include/excluderepo lists) - Teams (with permissions, visibility)
- Environments and deployment rules
- Custom properties
- Autolinks (Jira-style references)
The same YAML schema is layered org → suborg → repo, with repo-level files taking precedence.
Protocol
1. Pick the admin repo and confirm scope
safe-settings reads its config from a single admin repo in the org. Two common layouts:
| Admin repo | When |
|---|---|
<org>/.github | Quickest — the org already has this repo for community health files. Set ADMIN_REPO=.github. |
<org>/admin (dedicated) | Cleaner for large orgs where a dedicated policy team owns the repo. Set ADMIN_REPO=admin. |
Confirm with the user:
- Org name (
gh api user --jq '.login'if it's a user,gh api orgs/<org>to verify org) - Admin repo choice (
.githubis the common default) - Sub-org grouping needed? (e.g. group repos by team for different policy)
- Will deployment be GitHub Actions cron (simplest) or hosted Probot app (real-time webhooks)?
2. Scaffold the admin repo layout
The standard layout under the admin repo:
<admin-repo>/
└── .github/
├── settings.yml # org-level baseline — applies to all repos
├── suborgs/ # optional — overrides for groups of repos
│ └── <suborg-name>.yml
└── repos/ # optional — per-repo overrides
└── <repo-name>.yml
Files to copy from assets/:
assets/settings.yml→.github/settings.yml— minimal, opinionated org baseline (see below)assets/suborg.yml→.github/suborgs/example.yml— commented sub-org templateassets/repo.yml→.github/repos/example.yml— commented per-repo override template
The org baseline in assets/settings.yml mirrors the gh-bootstrap defaults: squash-only merging, PR-title commit subjects, and delete-on-merge. Its ruleset starts disabled; narrow the repository selector, observe real check names, and obtain explicit authorization before activation. Add a merge_queue rule only when the target organization and plan support it. Read references/schema.md for the full key catalog and layering behavior.
3. Choose the deployment path
GitHub Actions cron (recommended starting point)
- Lowest setup cost — no hosting, no webhook tunnel
- Reconciles every N hours via
npm run full-sync - Drift gets fixed within the cron interval, not in real time
- Copy
assets/full-sync.yml→<admin-repo>/.github/workflows/safe-settings.yml
Hosted Probot app
- Real-time response to webhook events (push to
.github/settings.yml, repo created, etc.) - Needs hosting (AWS Lambda, Docker, Heroku, k8s) and a public URL for webhooks
- Use this once the cron path is proven and the org wants instant reconciliation
- See
references/deploy.mdfor the deployment matrix and env-var reference
The skill defaults to the GHA cron path. Only switch to hosted if the user asks.
4. Create the GitHub App
Both deployment paths need a GitHub App installation. Walk the user through the manifest flow:
- Clone safe-settings locally:
git clone https://github.com/github-community-projects/safe-settings cd safe-settingscp .env.example .env, setGH_ORG=<org>npm install && npm run dev- Open the printed URL → "Register a GitHub App" → install on the org
- Save these values:
- App ID →
vars.SAFE_SETTINGS_APP_ID(repo or org variable) - Private key (downloaded
.pem) →secrets.SAFE_SETTINGS_PRIVATE_KEY(paste the file contents) - Client ID →
vars.SAFE_SETTINGS_GITHUB_CLIENT_ID - Client secret →
secrets.SAFE_SETTINGS_GITHUB_CLIENT_SECRET - Webhook secret →
secrets.SAFE_SETTINGS_WEBHOOK_SECRET(only needed for hosted Probot)
- App ID →
The GitHub App needs admin access to the org's repos to manage settings. The manifest flow requests the right permissions automatically — don't hand-roll the permission list.
5. Wire and test
For the GHA path:
# Set the variables and secrets on the admin repo (or org-wide).
gh variable set SAFE_SETTINGS_GH_ORG --body "<org>" --repo "<org>/<admin-repo>"
gh variable set SAFE_SETTINGS_APP_ID --body "<app-id>" --repo "<org>/<admin-repo>"
gh variable set SAFE_SETTINGS_GITHUB_CLIENT_ID --body "<client-id>" --repo "<org>/<admin-repo>"
gh secret set SAFE_SETTINGS_PRIVATE_KEY --repo "<org>/<admin-repo>" < private-key.pem
gh secret set SAFE_SETTINGS_GITHUB_CLIENT_SECRET --repo "<org>/<admin-repo>"
Trigger the first sync manually via workflow_dispatch:
gh workflow run safe-settings.yml --repo "<org>/<admin-repo>"
gh run watch --repo "<org>/<admin-repo>"
Check the run output. The first full-sync reconciles repositories immediately and logs the changes it applies. Confirm the affected organization and settings scope before this first run.
6. Validate guardrails
safe-settings can provide two safety nets, but the deployment must wire them:
- Hosted-app PR dry-run — the hosted Probot webhook path can post a status check for settings changes. The default cron and
workflow_dispatchworkflow does not provide this PR guardrail. Report it as unavailable unless the hosted path is configured. - Validators —
assets/settings.ymlincludes avalidator.patternfor repo names. It only adds avalidation-errortopic to a mis-named repo; it does not block settings reconciliation. To exclude a repo from sync, configure the deployment'srestrictedRepossetting instead.
For a more rigorous setup, add enforcement: evaluate on new rulesets to test them in shadow mode before flipping to active. See references/schema.md.
Idempotency
safe-settings is reconciliation-shaped — running full-sync on an unchanged config is a no-op. The skill itself is also idempotent:
- File scaffolding: diff against
assets/templates and ask before overwriting any existing file - Variables/secrets:
gh variable setandgh secret setare idempotent (last write wins); the skill should ask before overwriting an existing value - The GHA workflow file: same diff-and-ask treatment
Re-running the skill on a partially-set-up admin repo should fill in only the missing pieces.
What this skill is NOT for
- Setting policy on a single one-off repo with no org behind it — use
/gh-bootstrap - Running PR / issue / CI ops, or local git work — out of this catalog's scope
- Authoring new safe-settings rules upstream — this skill consumes the released app, doesn't develop it
- Migrating from the older
github/settingsapp — safe-settings is the supported successor; the skill assumes you're starting fresh or already offgithub/settings
Gotchas
- The admin repo path matters. By default safe-settings looks for config under
.github/inADMIN_REPO; if you put it elsewhere, setCONFIG_PATHto the directory. - The GitHub App needs admin access to manage settings on member repos. A user-installed token won't cut it — it has to be the App, installed on the org.
full-syncvia GHA visits every repo installed for the App on every run — suborg files only select which override applies per repo, they do not narrow the set of repos visited. For huge orgs (>1000 repos) the run can take an hour and burn Actions minutes — configure the deployment'srestrictedRepossetting or install the App on fewer repos to cut the workload.- The same YAML key can mean different things at different layers.
branchesat org level applies to every repo; at repo level it overrides only that repo. The merge order is deep — readreferences/schema.mdbefore writing complex overrides. - The org-level
settings.ymlasset ships with rulesets disabled and a narrowrepository_name.include: ["example-repo"]placeholder. Replace it with an observed, narrow selector and obtain explicit authorization before activation; active org rulesets cannot be weakened by lower-scope files. settings.ymlships itslabelsblock commented out. It reconciles by deleting every unlisted label org-wide duringfull-sync. Before enabling it, inventory existing labels across the org and get the operator's approval for the include/exclude list.- Before the first sync, protect the admin repo itself: an active ruleset on its default branch with at least one required review and code-owner review for the config paths, plus a
CODEOWNERSfile, and confirm who has write access. The admin repo is the trust boundary — anyone who can push to it controls every repo in the org through the App. force_create: truein arepos/<name>.ymlwill create the repo if it doesn't exist. This is powerful and dangerous — use it deliberately.- safe-settings does not unset every API field by default.
labels.excludepreserves matching labels; it does not delete them. To remove a collaborator, you typically delete the entry and run sync. Read the schema before assuming "remove from YAML" means "remove from GitHub". - The merge queue is a
merge_queuerule inside arulesetsentry — not a top-level toggle. Same shape as/gh-bootstrap's ruleset payload, just expressed in YAML and applied org-wide.
FAQ
What does the safe-settings skill do?
Set up GitHub's safe-settings (a Probot-based GitHub App from the github org) for declarative, org-wide repository policy as code. Use when the user says "settings as code", "safe-settings", "manage repos declaratively", "centralize repo settings", "org-level branch protection", "scaffold an admin repo", "github settings app", or invokes /safe-settings on an org that wants to manage repo settings, branch protection, rulesets, labels, teams, environments, and collaborators from one admin repo. Scaffolds the admin-repo layout (settings.yml + suborgs/ + repos/), the GitHub App installation steps, and a scheduled full-sync GitHub Actions workflow. Distinct from /gh-bootstrap (one-shot gh api config of a single repo) — this skill is for org-scale settings as code that reconciles continuously. Not for per-task GitHub ops (PRs, issues, CI status) or local git work — those are out of this catalog's scope.
How do I install safe-settings?
Run npx skills add https://github.com/paulnsorensen/git-gouda --skill safe-settings in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/safe-settings/ (personal) or .claude/skills/safe-settings/ (project).
Which AI agents can use safe-settings?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is safe-settings safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains safe-settings?
It is published by paulnsorensen in paulnsorensen/git-gouda. It has 69 recorded installs.
More from paulnsorensen/git-gouda
config-review-bot
paulnsorensen/git-gouda
Open the skill to read its SKILL.md instructions.
gh-bootstrap
paulnsorensen/git-gouda
One-time GitHub repository configuration via the gh CLI: lock the default branch with PR and CI rules, optionally enable a supported merge queue, lock merging to squash-only with PR-title commit messages, scaffold automatically-generated release notes (.github/release.yml), and optionally add a tag-driven release workflow. Use when the user says "set up the repo", "configure the merge queue", "enable squash merging", "lock down main", "set up branch protection", "configure release notes", "scaffold releases", "set up release tagging", or invokes /gh-bootstrap on a fresh or loosely-configured GitHub repository. Idempotent — safe to re-run on already-configured repos to bring missing pieces in line. This skill covers one-time repo policy, not per-task GitHub operations, local git commands, or project task running.
prek
paulnsorensen/git-gouda
Onboard prek (Rust-powered pre-commit) into any project and suggest hooks tailored to the language/framework. Use when the user says "add prek", "set up pre-commit hooks", "configure prek", "what hooks should I use", or when you notice a project without a prek.toml that would benefit from pre-commit checks. Also trigger when the user wants to add new hooks to an existing prek.toml, audit their hook config, or migrate from pre-commit to prek. Covers Rust, Python, TypeScript/JavaScript, Go, Ruby, and Shell projects. Do NOT use for husky, lint-staged, or CI pipeline hook configuration — this skill is specifically for prek.
oss-hygiene
paulnsorensen/git-gouda
Open the skill to read its SKILL.md instructions.
github-copilot-repo-instructions
paulnsorensen/git-gouda
Add, audit, or fix GitHub Copilot repository custom instructions — .github/copilot-instructions.md (repo-wide) and .github/instructions/.instructions.md (path-specific) — so Copilot Chat, Copilot code review, and the Copilot coding agent all pick up project-wide guidance. Also covers AGENTS.md, CLAUDE.md, and GEMINI.md as alternate agent instruction files. Use when the user says "add Copilot instructions", "set up copilot-instructions.md", "audit our Copilot config", "make Copilot follow our conventions", "configure Copilot code review", "add path-specific Copilot rules", "applyTo glob", "excludeAgent", "Copilot is ignoring our guidance", or invokes /github-copilot-repo-instructions. Do NOT use for personal (per-user) Copilot instructions; those are out of scope for this skill. For AGENTS.md authoring guidance beyond file layout, see the agents-md skill.
branch-cleanup
paulnsorensen/git-gouda
Open the skill to read its SKILL.md instructions.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.