
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 (per-task ops) and /gh-bootstrap (one-shot gh api config of a single repo) — this skill is for org-scale settings as code that reconciles continuously.
- Installs
- 57
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/paulnsorensen/skillz-that-grillz --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/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) | /gh |
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, delete-on-merge, plus a default-branch ruleset with merge queue and required reviews. Read references/schema.md for the full key catalog and how the layering works.
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/safe-settings cp .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 --body "$(cat private-key.pem)" --repo "<org>/<admin-repo>"
gh secret set SAFE_SETTINGS_GITHUB_CLIENT_SECRET --body "<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 sync logs every change it would apply; subsequent runs are quiet unless something has drifted.
6. Validate guardrails
safe-settings comes with two safety nets — make sure both are wired:
- Dry-run on PRs — when someone opens a PR against the admin repo modifying settings, the app posts a status check showing what would change. Don't merge if the check fails.
- Validators —
assets/settings.ymlincludes avalidator.patternfor repo names. Customize it for the org's naming convention so safe-settings refuses to apply settings to mis-named repos.
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 — use
/gh - Local git work — use
/plate - 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 touches every repo in the org on every run. For huge orgs (>1000 repos) the run can take an hour and burn Actions minutes — use the hosted Probot path or scope by suborg.- 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. - When you change the org-level
settings.yml, every repo gets the change on next sync. There is no "stage to a few repos first" toggle short of usingenforcement: evaluateon rulesets. 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. To remove a label, listing it under
labels.excludeis required; 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 (per-task ops) and /gh-bootstrap (one-shot gh api config of a single repo) — this skill is for org-scale settings as code that reconciles continuously.
How do I install safe-settings?
Run npx skills add https://github.com/paulnsorensen/skillz-that-grillz --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/skillz-that-grillz. It has 57 recorded installs.
More from paulnsorensen/skillz-that-grillz
github-copilot-personal-instructions
paulnsorensen/skillz-that-grillz
Open the skill to read its SKILL.md instructions.
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。