Set up or align a repository's GitHub collaboration and delivery surface: repo settings, branch/ruleset policy, PR and security templates, Actions hardening, GitHub Environments, release workflows, and deploy workflows. Use when standardizing GitHub setup for repos, CI/CD, GitHub Actions, branch protection, release or publish pipelines, publishing versioned packages, or deploying running apps; route app deploy details to deploy references and package publish details to release references.
—
—
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Make GitHub the boring, enforceable shell around a repo: settings, templates, Actions, secrets, releases, and deploys should all point at the same delivery contract.
This skill owns GitHub policy and workflow shape. It does not own product architecture, provider-specific infrastructure internals, app security review, or repo boot/readiness setup.
It also owns baseline existence and template shape for GitHub-facing collaboration files such as PR templates, issue templates, SECURITY.md, and CONTRIBUTING.md.
.github/workflows/.github/actions/.github/pull_request_template.md.github/ISSUE_TEMPLATE/SECURITY.mdCONTRIBUTING.md<owner>/.github default community-health
files, when that defaults repository existsdocs/gh repo view --json defaultBranchRef,mergeCommitAllowed,rebaseMergeAllowed,squashMergeAllowed,deleteBranchOnMergegh api repos/{owner}/{repo}/actions/permissionsgh api repos/{owner}/{repo}/private-vulnerability-reportinggh api repos/{owner}/{repo}/vulnerability-alertsgh api repos/{owner}/{repo}/automated-security-fixesgh api repos/{owner}/{repo}/environmentsgh api repos/{owner}/{repo}/rulesetsREADME.md, CONTRIBUTING.md, SECURITY.md, AGENTS.md, and docs/ current when GitHub changes affect contributor or operator workflows.main is continuously releasable or deployable after verification passes.main run verification before release or deploy.Read repo settings when changing merge policy, branch protections, rulesets, tag protection, Actions permissions, Environment settings, or repository descriptions.
Default posture (pair each change with a live probe or write):
gh repo edit --enable-squash-merge --enable-delete-branch-on-merge; disable unused methods with --enable-merge-commit=false / --enable-rebase-merge=false unless history preservation requires them.gh repo view --json squashMergeAllowed,deleteBranchOnMerge,mergeCommitAllowed,rebaseMergeAllowed.gh api repos/{owner}/{repo}/rulesets).main must remain allowed, prefer branch protection with conversation resolution rather than forcing all default-branch changes through PRs by accident. A no-bypass PR or required-check rule is incompatible with arbitrary direct pushes; inventory every human and automated writer first.commit_author.use_github_app_token for Homebrew updates. Use a generic API
commit action only when the release tool has no native signed path. Before a
source writeback, reject superseded runs whose analyzed SHA is no longer the
live default-branch head. That check narrows stale runs but is not atomic:
require either a concrete external branch lease that blocks every merge and
direct push from before release analysis through the API ref update, or an
App-signed API implementation with the analyzed SHA as an expected-head
precondition. Actions concurrency and a preflight check are not that lease.Read templates when creating or aligning PR templates, issue templates, SECURITY.md, or contributor-facing GitHub guidance.
Default posture:
<owner>/.github fallback files for genuinely shared community
policy; keep visibility-specific or repository-specific guidance local.SECURITY.md should be private-first and avoid public issue reporting for vulnerabilities.SECURITY.md, so the documented route works.CONTRIBUTING.md should describe contributor setup, validation, and PR workflow only when the repo accepts outside or cross-team contributions.Read Actions security before editing workflows that execute code, load secrets, publish artifacts, sign binaries, or deploy.
Hard defaults:
Do not use pull_request_target for workflows that check out, install, build, test, package, publish, sign, deploy, or execute project code.
Default workflow permissions to read-only or {} and grant scopes per job (permissions: {} at workflow top; widen per job).
Pin high-trust release, publish, upload, signing, and deploy actions to full commit SHAs with same-line version comments when the repo can maintain them.
Enable sha_pinning_required after reading current policy:
gh api repos/{owner}/{repo}/actions/permissions
gh api --method PUT repos/{owner}/{repo}/actions/permissions --input - <<'EOF'
{"enabled": true, "allowed_actions": "all", "sha_pinning_required": true}
EOFPreserve any intentional allowed_actions / allowlist values from the GET.
Run actionlint for syntax and zizmor for GitHub Actions security before inventing bespoke validators.
Run repository-history secret detection in a dedicated GitHub Actions workflow.
Keep workflow YAML boring: prefer maintained actions and repo-owned commands over large inline shell/JavaScript blocks.
Keep untrusted PR caches separate from privileged push, release, deploy, signing, or publish caches.
Enable vulnerability alerts and automatic Dependabot security updates broadly; they do not require a dependabot.yml:
gh api --method PUT repos/{owner}/{repo}/vulnerability-alerts
gh api --method PUT repos/{owner}/{repo}/automated-security-fixesAdd .github/dependabot.yml only when the repository contains a supported package manifest, lockfile, or GitHub Actions workflow. Do not add inert boilerplate to content-only or empty repositories.
Match each update entry to the actual ecosystem and manifest directory. Include github-actions only when workflows exist.
Prefer a low-noise default for scheduled version updates: monthly cadence, one-day cooldown, and separate patch/minor and major groups. Preserve repo-specific release or compatibility constraints.
Treat Dependabot PRs like ordinary advisory maintenance unless the repository already requires PR checks. Do not introduce PR-only rules or mandatory checks merely to enable dependency updates.
Read back both settings after writes and confirm the config exists on the default branch. Run the repository's normal validation when adding or changing the config.
Use this route for versioned packages, libraries, CLIs, marketplace actions, Homebrew-published tools, Swift/CocoaPods packages, Go/Rust releases, and registry publishes.
Core shape:
pull request -> verification
push to main -> verification -> prepare signed version commit when needed
-> assemble and verify release -> publish immutable
-> verify registry/tap/default-branch parityRead only the target-specific references needed:
Before enabling immutable releases at repository or organization scope, audit every workflow that creates a GitHub Release. Metadata-only releases are usually compatible; workflows that upload or replace assets after publication must move to a draft-first transaction described in the release workflow reference. Do not call a rollout complete from a green workflow alone: require one real release for every distinct release shape, exercising each applicable package, version-file, registry, and tap path. Read back immutability, release attestation, signed writebacks, default-branch containment, and downstream state for every surface that applies to that repository.
Use this route for running apps and services: static sites, SST apps, Cloudflare, containers, APIs, and hosted frontends.
Core shape:
push to main
-> detect changes
-> run lane verification and build immutable payload
-> e2e against that payload
-> deploy through GitHub Environment
-> monitoring and rollback handoffRead only the deploy references needed:
Report the setup compactly:
If live GitHub settings were not checked, say so. Do not present inferred settings as confirmed.
Example:
files changed: .github/workflows/release.yml, SECURITY.md
settings: live rulesets not checked; require manual confirmation
target: npm package release from verified main
evidence: actionlint, npm test
risks: publish token environment still needs maintainer update