github-auto-approve
Sets up and audits secure auto approve for pull requests across a GitHub organization, so that only pull requests genuinely meeting the intended conditions…
Skill by suzuki-shunsuke
Chalk Labs
Need help deploying github-auto-approve?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/suzuki-shunsuke-github-auto-approve
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: cloud, security, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/github-auto-approve
What's inside
- Skill name
github-auto-approve- Description
- Sets up and audits secure auto approve for pull requests across a GitHub organization, so that only pull requests genuinely meeting the intended conditions get approved, and the mechanism cannot be turned into a way to merge anything else. Covers the dedicated machine user and its CODEOWNERS paths, the fine-grained PAT held in AWS Secrets Manager and reachable only through OIDC pinned on the job_workflow_ref sub claim, the protected auto-approve branch, and the branch rulesets that make an approval mean something. Use when building auto approve, when reviewing an existing auto approve setup for holes, or when a workflow fails to assume the approve IAM role.
- License
- MIT
- Instructions
- 138 lines in SKILL.md · view on GitHub
Files (9)
- SKILL.md
- machine_user_and_pat.md · references/
- oidc_sub_claim.md · references/
- organization_setup.md · references/
- repository_setup.md · references/
- iam.tf · references/terraform/
- locals.tf · references/terraform/
- secretsmanager.tf · references/terraform/
- workflow_hardening.md · references/
SKILL.md (first lines)
# Secure auto approve on GitHub
## Scope
- A standardized scheme, governed centrally and applied uniformly across an organization's
repositories rather than configured per repository. It earns its cost once auto approve is
spreading to enough repositories that reviewing each one's configuration by hand is no longer
realistic. OSS and personal projects are out of scope.
- Forks are not used. Allowing forks in an enterprise risks source code leaking and should be
avoided regardless.
- Which conditions justify auto approving is out of scope. This is about guaranteeing that the
condition you chose is the one that actually decides.
- AWS Secrets Manager holds the PAT. Google Cloud or another secret store works the same way.
## What is being protected
Auto approve skips human review for pull requests that meet conditions under which skipping it is
acceptable — a dependency bump limited to an action SHA and its version comment, say, or a change
confined to a data-only directory.
So an auto approved pull request is, by design, not reviewed by a person. What makes that acceptable
is the condition, and nothing else. The property to protect is therefore narrow and worth stating
exactly:
> A pull request is approved only when it genuinely satisfies the intended condition.
Everything in this skill exists to keep that true — to stop the mechanism being turned into a way to
merge a pull request that does not satisfy it. Deciding which conditions are acceptable in the first
place is a separate question, and out of scope here.
## How it gets bypassed
Three patterns hand a malicious insider, or a supply chain attack, a way to merge a pull request
that never met the condition:
1. Any pull request can be merged with no approval at all — the condition never has to be evaluated.
2. Any bot's approval is enough to merge — a different bot, judging by different rules, can approve
in place of the intended one.
3. The PAT of the machine user that is a codeowner can be read out of an Organization Secret by
anyone who can add a workflow — the approval can then be issued directly, with no condition
evaluated at all.
## The security model
- The base branch of any auto approved pull request is protected by a branch ruleset. Prefer an
Organization Ruleset; fall back to a Repository Ruleset only when that is impractical.
- A machine user exists solely to approve. Nothing else uses it.
- Its PAT lives in AWS Secrets Manager, and only workflows allowed by OIDC can read it. The `sub`
claim is customized so that one claim pins the repository and the workflow together. Setting the
organization template is not enough — each repository has to opt in.
- Reusable logic (fetching the PAT, approving, evaluating common conditions) lives in a dedicated
repository as actions and reusable workflows.
- The approving reusable workflow of each repository lives on a dedicated `auto-approve` branch of
that repository, protected by an Organization Ruleset that requires a security team review.
## Procedure
Once per organization:
1. [Create the two Organization Rulesets that protect the `auto-approve` branch](references/organization_setup.md)
2. [Customize the organization's OIDC `sub` claim template](references/oidc_sub_claim.md)
3. [Build the shared actions and reusable workflows in a dedicated repository](references/organization_setup.md)
Once per machine user:
4. [Create the machine user, the IAM role, the Secrets Manager secret and its resource policy, and
store a fine-grained PAT in it](references/machine_user_and_pat.md)
Per repository:
5. [Opt in to the `sub` claim template, protect the base branch, give the machine user push access
and add it to CODEOWNERS, create the `auto-approve` branch and its reusable workflow, then call
that workflow](references/repository_setup.md)
When writing or reviewing the approving workflow and its actions, read
[Hardening the approving workflow](references/workflow_hardening.md).
## Rules
These are the load bearing parts. An auto approve setup that breaks any of them is not secure, no
matter what else is in place.
- Reference the decision logic action with `$/`, never `./`. `./` is the pull request's head, which
its author controls.
- Never use a wildcard on both the repository and the `job_workflow_ref` halves of the `sub`
condition. That lets one repository be approved by another repository's looser logic.
- The bypass list of every ruleset involved is empty.
- The base branch ruleset has `Require review from Code Owners`, `Dismiss stale pull request
approvals when new commits are pushed`, and `Require approval of the most recent reviewable push`.
Without all three, a commit pushed after the approval is merged unchecked.
- The job that holds the PAT never expands untrusted input (`${{ }}` from the pull request, or
reusable workflow `inputs`) into a `run` step.
- Auto approvable paths contain no file from which code can run.
## Gotchas
- A GitHub App cannot be a codeowner. That is why this needs a machine user and a PAT rather than an
app token.
- `Require a pull request before merging` does not apply to the push that *creates* a branch. That
is why branch creation is restricted separately, and why the first push to `auto-approve` must
contain nothing but CODEOWNERS.
- `include_claim_keys` replaces the whole `sub`; it does not append to it. Customizing it changes
`sub` for **every** workflow in the repository at once and will break other workflows already
assuming roles by OIDC. Inventory them first — [OIDC `sub` claim](references/oidc_sub_claim.md).
- Setting the organization's `sub` template applies to nothing on its own. Each repository has to
opt in with `use_default: false`.
- CODEOWNERS is read from the base branch, so the CODEOWNERS governing the `auto-approve` branch has
to live on `auto-approve` itself.
## Monitoring
Prevention can fail, so make failures visible.
- Record every approval by the machine user and alert on approvals in unexpected repositories or
paths.
- Alert when the machine user does anything other than approve — pushing, opening pull requests,
changing settings.
- Watch the organization audit log for `auto-approve` branch creations and ruleset changes.
- In AWS, record role assumptions and secret reads in CloudTrail.From suzuki-shunsuke/agent-skills, MIT.
More from suzuki-shunsuke/agent-skills
- 0.565score
github-trusted-tag
suzuki-shunsuke
Makes tags in a GitHub organization creatable only on a trusted SHA (the HEAD of the default branch).
SkillAFreshness: AClaude Code +9 - 0.529score
github-app-private-key-aws-kms
suzuki-shunsuke
Rewrites GitHub Actions workflows so that GitHub App installation access tokens are generated by delegating JWT signing to AWS KMS instead of storing the…
SkillBFreshness: BClaude Code +9 - 0.524score
github-required-status-check
suzuki-shunsuke
Designs and manages GitHub Branch Rulesets' "Require status checks to pass" so the ruleset never needs updating when a job is added, removed, or renamed, by…
SkillBFreshness: BClaude Code +9 - 0.474score
go
suzuki-shunsuke
Conventions and commands for Go projects — testing, linting, JSON Schema generation, and error handling.
SkillCFreshness: CClaude Code +9 - 0.474score
create-skill
suzuki-shunsuke
Creates agent skills from an OSS project's documentation.
SkillCFreshness: CClaude Code +9 - 0.469score
pr
suzuki-shunsuke
Creates a branch, commits the changes, and opens a pull request whose description summarizes the full diff between base and head.
SkillCFreshness: CClaude Code +9 - 0.467score
manner
suzuki-shunsuke
Baseline rules for this repository — use English, never commit to default branches, never rewrite commit history.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- Sep 15, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/suzuki-shunsuke/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from suzuki-shunsuke
- 0.565score
github-trusted-tag
suzuki-shunsuke
Makes tags in a GitHub organization creatable only on a trusted SHA (the HEAD of the default branch).
SkillAFreshness: AClaude Code +9 - 0.529score
github-app-private-key-aws-kms
suzuki-shunsuke
Rewrites GitHub Actions workflows so that GitHub App installation access tokens are generated by delegating JWT signing to AWS KMS instead of storing the…
SkillBFreshness: BClaude Code +9 - 0.524score
github-required-status-check
suzuki-shunsuke
Designs and manages GitHub Branch Rulesets' "Require status checks to pass" so the ruleset never needs updating when a job is added, removed, or renamed, by…
SkillBFreshness: BClaude Code +9 - 0.474score
go
suzuki-shunsuke
Conventions and commands for Go projects — testing, linting, JSON Schema generation, and error handling.
SkillCFreshness: CClaude Code +9 - 0.474score
create-skill
suzuki-shunsuke
Creates agent skills from an OSS project's documentation.
SkillCFreshness: CClaude Code +9 - 0.469score
pr
suzuki-shunsuke
Creates a branch, commits the changes, and opens a pull request whose description summarizes the full diff between base and head.
SkillCFreshness: CClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get github-auto-approve running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
github-auto-approve skill. Agent Mart. https://agentmart.dev/skills/suzuki-shunsuke-github-auto-approve (last updated 2026-10-24)