/ratchet-github:github-repository-settingsfrom ratchet-github
Use when creating or hardening a public open-source repository, limiting pull requests to collaborators, deciding when fork pull requests may run Actions, or auditing or cleaning up labels, milestones, and projects. Restricts who can open pull requests and run CI, with the REST calls to read, set, and roll back each setting, and audits issue taxonomy for sprawl and drift.
Ships in ratchet-github. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read every applicable AGENTS.md first. Repository-local policy overrides these defaults.
These settings decide who can put a change in front of the repository's CI. Apply them to every public repository. Read each setting before changing it, and read it back after.
GitHub's "Pull requests: Collaborators only" setting lets only users with write, maintain, or admin access open a pull request. Everyone else can still fork and open issues.
gh api repos/<owner>/<repo> --jq .pull_request_creation_policy # default: all
gh api -X PATCH repos/<owner>/<repo> -f pull_request_creation_policy=collaborators_only
gh api -X PATCH repos/<owner>/<repo> -f pull_request_creation_policy=all # roll back
has_pull_requests=false for this. It turns pull requests off for everyone, bots
included.By default, only a first-time contributor's fork pull request waits for a maintainer to approve its workflow runs. Require approval for every outside contributor, so a contributor with one merged typo fix cannot run arbitrary code in CI later.
gh api repos/<owner>/<repo>/actions/permissions/fork-pr-contributor-approval --jq .approval_policy
gh api -X PUT repos/<owner>/<repo>/actions/permissions/fork-pr-contributor-approval \
-f approval_policy=all_external_contributors
The default is first_time_contributors. Approve a run only after reading the workflow files and
scripts the pull request changes.
Set these up when the repository is created, before the first outside pull request:
LICENSE file and the package manifest. It is short, permissive, and
read the same way by everyone who might use the code.github-actions-authoring says how.actions/labeler on pull requests to label them by the paths they change.dependabot skill, and the linters and actionlint, per
static-code-analysis.Read issue taxonomy audit when asked to review or clean up labels, milestones, or projects. It is read-only unless the request authorizes a change. It checks near-duplicate and one-off labels, drift from the declared label source, and milestone and project overlap.
allow_forking only applies to private
repositories.dependabot skill describes.As of integrations/github 6.13.0, the OpenTofu and Terraform provider has no attribute or
resource for either setting, so set them with the REST calls above and record that in the
repository's infrastructure docs. When the provider adds them, move them into infrastructure as
code and delete the manual step.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jongleberry/ratchet-stack --plugin ratchet-github11 skills in this plugin
/dependabotUse when writing or reviewing dependabot.yml or a workflow that runs on Dependabot pull requests, when asked to trigger, re-run, or force a Dependabot run, or when a Dependabot pull request has a conflict, a stale lockfile, or a failing bump. Configures coverage, grouping, cooldowns, and secrets, starts an update check on demand, and repairs a Dependabot pull request./git-commit-checklistUse before every git commit, before a rebase, reset, or force push of a branch another person or agent may push to, when a rebase or merge conflicts in a lockfile, a generated file, or source, when a stacked branch's base has merged, and when git fails on a .lock file. Check scope, staged content, and message, resolve conflicts without taking a side, and force-push or clear a lock safely./github-actions-authoring