GitHub Operations
Deliver the requested GitHub state, not a successful-looking command. A 200, 201,
202, or 204 response is evidence that GitHub accepted a request; it is not proof
that every requested field changed, an invitation was accepted, an asynchronous job
finished, or the user's business outcome was achieved.
Route by operation
Read only the reference required for the task:
| Task |
Reference |
| Create, review, merge, close, compare, or converge PRs; clear approved PR body revisions; retire remote PR branches |
references/pr_operations.md |
| Create, edit, search, transfer, close, or bulk-manage issues |
references/issue_operations.md |
| Inspect, clone, create, edit, rename, archive, transfer, change visibility, or delete repositories |
references/repository_operations.md |
| Copy repositories accessible to another account while keeping the usual account active; configure private copies and upstream sync |
references/multi_account_repository_sync.md |
| Inspect or change collaborators, teams, base permissions, member privileges, or organization 2FA |
references/organization_access_and_settings.md |
| Protect a default branch while letting collaborators contribute through PRs; inventory protection gaps across an account, roll a baseline out to many repositories, and verify enforcement with a real push |
references/branch_protection.md |
| Trigger, inspect, approve a reviewed fork run, rerun, cancel, or purge Actions; diagnose missing checks; manage secrets or variables |
references/workflow_operations.md |
| Reduce CI email overload, exhausted Actions allowance, unrelated checks or repeated runs; decide what a template or product actually needs |
references/ci-demand-and-notifications.md before changing runners or notifications |
| Build and publish a Docker/OCI image to GitHub Container Registry (GHCR) |
references/ghcr_publishing.md |
| Use raw REST/GraphQL endpoints, pagination, rate limits, webhooks, or Enterprise hosts |
references/api_reference.md |
| Build scripts, retries, bulk operations, or machine-readable output |
references/best_practices.md |
For local Git recovery, dirty worktrees, bundles, or lost commits, use git-safety-net.
This skill owns GitHub-hosted state.
For repository copies, also handle per-remote authentication and sync setup.
Universal operating contract
1. Classify the request before touching GitHub
- Answer, inspect, diagnose, or review: read-only. Do not create a PR, issue,
comment, invitation, workflow run, or setting change.
- Create, change, merge, close, grant, revoke, publish, or delete: the named
state change is authorized. Keep the target and blast radius inside that request.
- Destructive, public, credential-related, production-triggering, or externally
communicative: require the exact target, consequence, and recovery path. If the
user did not provide a material choice such as repository owner, visibility, or
message content, stop before the write.
Do not turn a read-only investigation into a mutation because the fix looks obvious.
Do not send a comment, review, issue, or invitation whose recipient or content was not
authorized in the current task.
For an authorized contributor, assess repository access against their ongoing contribution
role, not just today's read or sync command. Repository Write access and permission to update
the default branch are separate decisions. Follow the user's chosen contribution scope; use
branch protection and PR review to control integration rather than silently reducing a
contributor to Read. A diagnosis alone still does not authorize a grant.
2. Bind identity, host, and target
Before the first write, verify the active account and resolve a fully qualified target:
gh auth status --hostname HOST
gh api --hostname HOST user --jq '.login'
gh repo view HOST/OWNER/REPO \
--json nameWithOwner,visibility,isPrivate,viewerPermission,url
For github.com, OWNER/REPO is sufficient. Never use gh auth status --show-token
for routine diagnosis, and never print, paste, or log a token.
Before the first push to a remote in the current session, read its live visibility:
gh repo view OWNER/REPO \
--json nameWithOwner,visibility,isPrivate,stargazerCount,forkCount,url
Bind identity to the interface that will perform the write. CLI identity does
not establish a connector, browser, REST client, or Git SSH identity. Resolve the
expected actor from the user's authorized task; neither the repository owner nor
an available credential selects that actor automatically. For connectors, use a
read-only current-user operation from that same connector and confirm its actor.
If that interface cannot expose the actor, use the already verified CLI channel
for the authorized write; do not make a test comment to discover its identity.
For authorized gh API/hosted-state writes, use the bundled checked invocation.
Resolve <github-ops-dir> to the directory containing this SKILL.md; run the
helper by that path from the task's working directory. Its executable argument
and rejection contract is checked_gh.py.
uv run python <github-ops-dir>/scripts/checked_gh.py --expected-login <EXPECTED_LOGIN> --host HOST
uv run python <github-ops-dir>/scripts/checked_gh.py --expected-login <EXPECTED_LOGIN> --host HOST -- pr edit <NUMBER> -R OWNER/REPO --title '<AUTHORIZED_TITLE>'
The first command is read-only. The second resolves the current credential,
checks GET /user, and pins that same credential for one command. A mismatch or
unknown actor exits before execution. It guards only gh, not connector calls,
browser actions or Git pushes. Authentication/configuration commands are rejected;
task authorization, exact targets and independent readback remain required.
Supply -R OWNER/REPO for repository-scoped commands, or an explicit repository
operand for gh repo. The wrapper qualifies that target with the checked host,
removes inherited GH_REPO and alternate token variables from the child, and
rejects conflicting host operands. Omit the command for an identity-only read.
Organization secret/variable operations instead use their explicit --org
scope; personal Codespaces secrets use --user. Body/title/field values remain
unchanged even when they resemble flags or URLs. Public API absolute URLs use
api.github.com; relative API endpoints remain supported.
For PR merges, use the checked pr merge entry with an explicit PR and full
--match-head-commit. It checks the live head and effective approval/merge state.
Raw REST and GraphQL PR merge writes are rejected: an eligible actor can otherwise
use bypass privileges without an --admin argument. Follow the
merge and explicit-bypass contract.
Switching account, credential, host or interface invalidates earlier identity
evidence. Recheck before the next write; do not reuse a prior session's pass.
Reference examples show native gh operation syntax. Execute hosted-state
mutations by passing those arguments after the helper's --, with an explicit
repository or account scope; bare gh remains suitable for readback and
separately authorized authentication/configuration. When a builtin's operand
shape is rejected, use its supported explicit REST/GraphQL equivalent through
the same helper, except PR merge writes, which stay on the guarded pr merge
entry. Do not bypass the actor check. A failed or timed-out invocation
does not prove the mutation was absent: read the exact target before retrying.
For incident attribution, preserve event ID/time, actor and interface separately
from the ChatGPT execution account. A comment author's login and
performed_via_github_app establish GitHub actor/application, not the ChatGPT
email. A session's creator identity and today's auth file do not establish its
historical execution account. Keep missing links unknown.
3. Read current authority and preview the delta
Use GitHub-hosted state, not a stale local ref or remembered setting. Capture only the
fields required to prove the requested transition. Before a consequential write, make
this plan explicit:
Target: fully qualified repository, organization, PR, issue, run, or account
Current: authoritative fields and immutable IDs/SHAs
Requested: exact field or state transition
Blast radius: people, repositories, forks, runs, or public surfaces affected
Recovery: exact inverse operation or explicit “not recoverable”
Readback: independent GET/CLI query and expected result
If the user already authorized this exact consequence, execute it. Do not add a
ceremonial second confirmation. If target, scope, public exposure, deletion, recipient,
or recovery remains ambiguous, pause before the write.
4. Choose an interface whose input contract actually supports the change
Prefer, in order:
- a purpose-built
gh subcommand;
- a documented REST endpoint for one resource or authoritative readback;
- GraphQL when the required mutation/query is GraphQL-only or combines related data;
- the documented GitHub UI when the setting has no supported API input.
Response fields are not automatically writable fields. Before using PATCH, compare
the desired key against the operation's current request body parameters, not the
shape returned by GET. GitHub may ignore an unsupported key while still returning a
successful response. Do not switch API families merely to make the command run.
Use explicit methods with gh api. Adding -f or -F changes the default method to
POST; filtered GET requests must include -X GET.
5. Mutate once; do not retry ambiguity
- Pin repository, object number, branch, run ID, username, and expected SHA where the
operation supports it.
- Do not blindly retry non-idempotent writes such as comments, invitations, workflow
dispatches, releases, or PR/issue creation. After a timeout or 5xx, read back first to
determine whether the first request landed.
- For bulk changes, freeze and display the finite target list, then process one target
at a time with per-item results. Never pipe an unreviewed live query directly into a
destructive
xargs command.
- Do not bypass repository hooks, required checks, branch protections, signatures, or
visibility-consequence acknowledgements.
6. Verify through an independent readback
Run a fresh read that does not trust the mutation response or a cached local ref:
| Mutation |
Required acceptance evidence |
| PR merge/close/edit |
PR state plus accepted behavior on the fetched base when landing matters |
| Branch deletion |
Hosted branch/ref is absent; local remote-tracking cleanup is a separate check |
| Issue/comment/review |
Exact object exists once with the intended state/content |
| Repository create/edit/visibility |
Fully qualified repository readback matches owner, visibility, and requested fields |
| Collaborator/team permission |
Invitation state if pending, then effective permission; also identify remaining base/team grants when revoking |
| Organization setting |
A fresh organization/settings read returns every requested field; UI-only settings require UI readback plus any available API signal |
| 2FA requirement |
Preflight affected accounts, UI confirmation, API readback, then membership/outside-collaborator audit |
| Workflow dispatch/rerun/cancel |
The intended run ID reaches the expected state; command acceptance is not completion |
| Secret/variable change |
Metadata and consumer behavior, never secret value disclosure |
For asynchronous state, poll with a bounded deadline and report pending if the terminal
state is not observed. If readback differs, report failed/no-op or partially applied,
show the mismatched fields, and keep recovery available. Never say “done” from the write
receipt alone.
7. Report the business outcome
End with one of four honest states:
- changed and verified — requested state is independently observed;
- already satisfied — no write was necessary;
- pending — accepted but not yet terminal, with the next authoritative check;
- failed/no-op or partial — requested and observed states differ, with recovery and
unresolved risk.
8. Authenticate only for the named write
Authentication is scoped to the authorized operation; it is not a reason to reopen an
already-authorized exact write. Before starting an interactive browser or device flow, state
the GitHub application, active account, target host, and the exact permission delta. Continue
the steps the browser can complete after that explanation. A Confirm access page is a
reauthentication prompt; its heading alone does not establish that the user's physical presence
is required. For the verified browser account, host and exact operation, use the already
authorized normal password-manager workflow through the trusted page, without extracting or
displaying credentials. Resume from the first unmet step, then independently read the actual
operation's result; completing reauthentication does not prove the write happened.
Hand control to the user for an actual physical MFA or hardware-key challenge, an unresolved
account-selection decision, or an unavailable approved credential route. Do not bypass a
physical challenge. Never request broader scopes, a different account, or an unrelated approval
merely because the normal flow is interactive; do not ask again for the already-authorized write.
Do not expose credential values in terminal output, URLs, arguments, committed files, or
reports. A production host's pull-only registry credential is not authorization to publish.
Reuse the current, already-authorized credential when it has been verified for the exact write;
use a temporary local Docker configuration and remove that configuration after the operation.
GHCR publication has its own preflight and digest readback; load
references/ghcr_publishing.md before building or pushing an image.
High-impact boundaries
- Repository creation requires an explicit
OWNER/REPO and visibility. Never default
a generic example to --public; public exposure is a product decision.
- Repository visibility changes can expose code, Actions logs, artifacts, forks, and
history. Use
gh repo edit --visibility ... --accept-visibility-change-consequences
only after the consequences and exact repository are authorized, then read back.
- Merges, branch deletions, repository creation/deletion/transfer/visibility changes,
organization-wide permissions, 2FA enforcement, and secret rotation require their
operation-specific reference.
- PR and issue title formats are repository policy. Inspect templates, contribution
guidance, checks, or an accepted recent example; do not invent a universal JIRA prefix.
- Enterprise policy can override organization or repository controls. Preserve
HOST
explicitly and report when a lower layer cannot change the enforced state.
Safe read-only quick reference
gh pr list -R OWNER/REPO --state open --json number,title,state,url
gh pr view 123 -R OWNER/REPO --json number,title,state,headRefOid,baseRefOid,url
gh issue list -R OWNER/REPO --state open --json number,title,state,url
gh workflow list -R OWNER/REPO
gh run list -R OWNER/REPO --limit 20 \
--json databaseId,status,conclusion,headSha,url
gh api -X GET 'repos/OWNER/REPO/branches?per_page=100' --paginate --jq '.[].name'
Use --json/--jq for decisions. Human-formatted output is for reading, not parsing.
1---2name: github-ops3description: >-4 Operates GitHub via gh CLI and REST/GraphQL — PRs, issues, Actions, self-hosted Runner inventory/capacity, repos, collaborators, org5 permissions, 2FA — with explicit target, authorization, and independent readback. Use when a write6 reports success but state didn't change, or choosing gh/REST/GraphQL/UI-only. Not for local Git7 recovery (use git-safety-net), maintainer PR review (use github-review-pr), or upstream8 contribution (use github-contributor).9metadata:10 source: https://skillmd.com/skills/daymade/github-ops11---1213# GitHub Operations1415Deliver the requested GitHub state, not a successful-looking command. A `200`, `201`,16`202`, or `204` response is evidence that GitHub accepted a request; it is not proof17that every requested field changed, an invitation was accepted, an asynchronous job18finished, or the user's business outcome was achieved.1920## Route by operation2122Read only the reference required for the task:2324| Task | Reference |25|---|---|26| Create, review, merge, close, compare, or converge PRs; clear approved PR body revisions; retire remote PR branches | [`references/pr_operations.md`](references/pr_operations.md) |27| Create, edit, search, transfer, close, or bulk-manage issues | [`references/issue_operations.md`](references/issue_operations.md) |28| Inspect, clone, create, edit, rename, archive, transfer, change visibility, or delete repositories | [`references/repository_operations.md`](references/repository_operations.md) |29| Copy repositories accessible to another account while keeping the usual account active; configure private copies and upstream sync | [`references/multi_account_repository_sync.md`](references/multi_account_repository_sync.md) |30| Inspect or change collaborators, teams, base permissions, member privileges, or organization 2FA | [`references/organization_access_and_settings.md`](references/organization_access_and_settings.md) |31| Protect a default branch while letting collaborators contribute through PRs; inventory protection gaps across an account, roll a baseline out to many repositories, and verify enforcement with a real push | [`references/branch_protection.md`](references/branch_protection.md) |32| Trigger, inspect, approve a reviewed fork run, rerun, cancel, or purge Actions; diagnose missing checks; manage secrets or variables | [`references/workflow_operations.md`](references/workflow_operations.md) |33| Reduce CI email overload, exhausted Actions allowance, unrelated checks or repeated runs; decide what a template or product actually needs | [`references/ci-demand-and-notifications.md`](references/ci-demand-and-notifications.md) before changing runners or notifications |34| Build and publish a Docker/OCI image to GitHub Container Registry (GHCR) | [`references/ghcr_publishing.md`](references/ghcr_publishing.md) |35| Use raw REST/GraphQL endpoints, pagination, rate limits, webhooks, or Enterprise hosts | [`references/api_reference.md`](references/api_reference.md) |36| Build scripts, retries, bulk operations, or machine-readable output | [`references/best_practices.md`](references/best_practices.md) |3738For local Git recovery, dirty worktrees, bundles, or lost commits, use `git-safety-net`.39This skill owns GitHub-hosted state.40For repository copies, also handle per-remote authentication and sync setup.4142## Universal operating contract4344### 1. Classify the request before touching GitHub4546- **Answer, inspect, diagnose, or review:** read-only. Do not create a PR, issue,47 comment, invitation, workflow run, or setting change.48- **Create, change, merge, close, grant, revoke, publish, or delete:** the named49 state change is authorized. Keep the target and blast radius inside that request.50- **Destructive, public, credential-related, production-triggering, or externally51 communicative:** require the exact target, consequence, and recovery path. If the52 user did not provide a material choice such as repository owner, visibility, or53 message content, stop before the write.5455Do not turn a read-only investigation into a mutation because the fix looks obvious.56Do not send a comment, review, issue, or invitation whose recipient or content was not57authorized in the current task.5859For an authorized contributor, assess repository access against their ongoing contribution60role, not just today's read or sync command. Repository Write access and permission to update61the default branch are separate decisions. Follow the user's chosen contribution scope; use62branch protection and PR review to control integration rather than silently reducing a63contributor to Read. A diagnosis alone still does not authorize a grant.6465### 2. Bind identity, host, and target6667Before the first write, verify the active account and resolve a fully qualified target:6869```bash70gh auth status --hostname HOST71gh api --hostname HOST user --jq '.login'72gh repo view HOST/OWNER/REPO \73 --json nameWithOwner,visibility,isPrivate,viewerPermission,url74```7576For `github.com`, `OWNER/REPO` is sufficient. Never use `gh auth status --show-token`77for routine diagnosis, and never print, paste, or log a token.7879Before the first push to a remote in the current session, read its live visibility:8081```bash82gh repo view OWNER/REPO \83 --json nameWithOwner,visibility,isPrivate,stargazerCount,forkCount,url84```8586Bind identity to the interface that will perform the write. CLI identity does87not establish a connector, browser, REST client, or Git SSH identity. Resolve the88expected actor from the user's authorized task; neither the repository owner nor89an available credential selects that actor automatically. For connectors, use a90read-only current-user operation from that same connector and confirm its actor.91If that interface cannot expose the actor, use the already verified CLI channel92for the authorized write; do not make a test comment to discover its identity.9394For authorized `gh` API/hosted-state writes, use the bundled checked invocation.95Resolve `<github-ops-dir>` to the directory containing this SKILL.md; run the96helper by that path from the task's working directory. Its executable argument97and rejection contract is [checked_gh.py](scripts/checked_gh.py).9899```bash100uv run python <github-ops-dir>/scripts/checked_gh.py --expected-login <EXPECTED_LOGIN> --host HOST101uv run python <github-ops-dir>/scripts/checked_gh.py --expected-login <EXPECTED_LOGIN> --host HOST -- pr edit <NUMBER> -R OWNER/REPO --title '<AUTHORIZED_TITLE>'102```103104The first command is read-only. The second resolves the current credential,105checks `GET /user`, and pins that same credential for one command. A mismatch or106unknown actor exits before execution. It guards only `gh`, not connector calls,107browser actions or Git pushes. Authentication/configuration commands are rejected;108task authorization, exact targets and independent readback remain required.109Supply `-R OWNER/REPO` for repository-scoped commands, or an explicit repository110operand for `gh repo`. The wrapper qualifies that target with the checked host,111removes inherited `GH_REPO` and alternate token variables from the child, and112rejects conflicting host operands. Omit the command for an identity-only read.113Organization secret/variable operations instead use their explicit `--org`114scope; personal Codespaces secrets use `--user`. Body/title/field values remain115unchanged even when they resemble flags or URLs. Public API absolute URLs use116`api.github.com`; relative API endpoints remain supported.117For PR merges, use the checked `pr merge` entry with an explicit PR and full118`--match-head-commit`. It checks the live head and effective approval/merge state.119Raw REST and GraphQL PR merge writes are rejected: an eligible actor can otherwise120use bypass privileges without an `--admin` argument. Follow the121[merge and explicit-bypass contract](references/pr_operations.md#merging-prs).122Switching account, credential, host or interface invalidates earlier identity123evidence. Recheck before the next write; do not reuse a prior session's pass.124125Reference examples show native `gh` operation syntax. Execute hosted-state126mutations by passing those arguments after the helper's `--`, with an explicit127repository or account scope; bare `gh` remains suitable for readback and128separately authorized authentication/configuration. When a builtin's operand129shape is rejected, use its supported explicit REST/GraphQL equivalent through130the same helper, except PR merge writes, which stay on the guarded `pr merge`131entry. Do not bypass the actor check. A failed or timed-out invocation132does not prove the mutation was absent: read the exact target before retrying.133134For incident attribution, preserve event ID/time, actor and interface separately135from the ChatGPT execution account. A comment author's `login` and136`performed_via_github_app` establish GitHub actor/application, not the ChatGPT137email. A session's creator identity and today's auth file do not establish its138historical execution account. Keep missing links unknown.139140### 3. Read current authority and preview the delta141142Use GitHub-hosted state, not a stale local ref or remembered setting. Capture only the143fields required to prove the requested transition. Before a consequential write, make144this plan explicit:145146```text147Target: fully qualified repository, organization, PR, issue, run, or account148Current: authoritative fields and immutable IDs/SHAs149Requested: exact field or state transition150Blast radius: people, repositories, forks, runs, or public surfaces affected151Recovery: exact inverse operation or explicit “not recoverable”152Readback: independent GET/CLI query and expected result153```154155If the user already authorized this exact consequence, execute it. Do not add a156ceremonial second confirmation. If target, scope, public exposure, deletion, recipient,157or recovery remains ambiguous, pause before the write.158159### 4. Choose an interface whose input contract actually supports the change160161Prefer, in order:1621631. a purpose-built `gh` subcommand;1642. a documented REST endpoint for one resource or authoritative readback;1653. GraphQL when the required mutation/query is GraphQL-only or combines related data;1664. the documented GitHub UI when the setting has no supported API input.167168Response fields are not automatically writable fields. Before using `PATCH`, compare169the desired key against the operation's current **request body parameters**, not the170shape returned by `GET`. GitHub may ignore an unsupported key while still returning a171successful response. Do not switch API families merely to make the command run.172173Use explicit methods with `gh api`. Adding `-f` or `-F` changes the default method to174`POST`; filtered GET requests must include `-X GET`.175176### 5. Mutate once; do not retry ambiguity177178- Pin repository, object number, branch, run ID, username, and expected SHA where the179 operation supports it.180- Do not blindly retry non-idempotent writes such as comments, invitations, workflow181 dispatches, releases, or PR/issue creation. After a timeout or 5xx, read back first to182 determine whether the first request landed.183- For bulk changes, freeze and display the finite target list, then process one target184 at a time with per-item results. Never pipe an unreviewed live query directly into a185 destructive `xargs` command.186- Do not bypass repository hooks, required checks, branch protections, signatures, or187 visibility-consequence acknowledgements.188189### 6. Verify through an independent readback190191Run a fresh read that does not trust the mutation response or a cached local ref:192193| Mutation | Required acceptance evidence |194|---|---|195| PR merge/close/edit | PR state plus accepted behavior on the fetched base when landing matters |196| Branch deletion | Hosted branch/ref is absent; local remote-tracking cleanup is a separate check |197| Issue/comment/review | Exact object exists once with the intended state/content |198| Repository create/edit/visibility | Fully qualified repository readback matches owner, visibility, and requested fields |199| Collaborator/team permission | Invitation state if pending, then effective permission; also identify remaining base/team grants when revoking |200| Organization setting | A fresh organization/settings read returns every requested field; UI-only settings require UI readback plus any available API signal |201| 2FA requirement | Preflight affected accounts, UI confirmation, API readback, then membership/outside-collaborator audit |202| Workflow dispatch/rerun/cancel | The intended run ID reaches the expected state; command acceptance is not completion |203| Secret/variable change | Metadata and consumer behavior, never secret value disclosure |204205For asynchronous state, poll with a bounded deadline and report `pending` if the terminal206state is not observed. If readback differs, report `failed/no-op` or `partially applied`,207show the mismatched fields, and keep recovery available. Never say “done” from the write208receipt alone.209210### 7. Report the business outcome211212End with one of four honest states:213214- **changed and verified** — requested state is independently observed;215- **already satisfied** — no write was necessary;216- **pending** — accepted but not yet terminal, with the next authoritative check;217- **failed/no-op or partial** — requested and observed states differ, with recovery and218 unresolved risk.219220### 8. Authenticate only for the named write221222Authentication is scoped to the authorized operation; it is not a reason to reopen an223already-authorized exact write. Before starting an interactive browser or device flow, state224the GitHub application, active account, target host, and the exact permission delta. Continue225the steps the browser can complete after that explanation. A **Confirm access** page is a226reauthentication prompt; its heading alone does not establish that the user's physical presence227is required. For the verified browser account, host and exact operation, use the already228authorized normal password-manager workflow through the trusted page, without extracting or229displaying credentials. Resume from the first unmet step, then independently read the actual230operation's result; completing reauthentication does not prove the write happened.231232Hand control to the user for an actual physical MFA or hardware-key challenge, an unresolved233account-selection decision, or an unavailable approved credential route. Do not bypass a234physical challenge. Never request broader scopes, a different account, or an unrelated approval235merely because the normal flow is interactive; do not ask again for the already-authorized write.236237Do not expose credential values in terminal output, URLs, arguments, committed files, or238reports. A production host's pull-only registry credential is not authorization to publish.239Reuse the current, already-authorized credential when it has been verified for the exact write;240use a temporary local Docker configuration and remove that configuration after the operation.241GHCR publication has its own preflight and digest readback; load242`references/ghcr_publishing.md` before building or pushing an image.243244## High-impact boundaries245246- Repository creation requires an explicit `OWNER/REPO` and visibility. Never default247 a generic example to `--public`; public exposure is a product decision.248- Repository visibility changes can expose code, Actions logs, artifacts, forks, and249 history. Use `gh repo edit --visibility ... --accept-visibility-change-consequences`250 only after the consequences and exact repository are authorized, then read back.251- Merges, branch deletions, repository creation/deletion/transfer/visibility changes,252 organization-wide permissions, 2FA enforcement, and secret rotation require their253 operation-specific reference.254- PR and issue title formats are repository policy. Inspect templates, contribution255 guidance, checks, or an accepted recent example; do not invent a universal JIRA prefix.256- Enterprise policy can override organization or repository controls. Preserve `HOST`257 explicitly and report when a lower layer cannot change the enforced state.258259## Safe read-only quick reference260261```bash262gh pr list -R OWNER/REPO --state open --json number,title,state,url263gh pr view 123 -R OWNER/REPO --json number,title,state,headRefOid,baseRefOid,url264gh issue list -R OWNER/REPO --state open --json number,title,state,url265gh workflow list -R OWNER/REPO266gh run list -R OWNER/REPO --limit 20 \267 --json databaseId,status,conclusion,headSha,url268gh api -X GET 'repos/OWNER/REPO/branches?per_page=100' --paginate --jq '.[].name'269```270271Use `--json`/`--jq` for decisions. Human-formatted output is for reading, not parsing.