github
Skill0 starsChanged 4 months agoMITView on GitHub
Non-obvious GitHub CLI (gh) mechanics: PR review comments and threads, posting reviews, merge queues, batched GraphQL mutations, and gh/jq gotchas. Use when working with the gh CLI or GitHub API.
- Commits and pushes
166 other projects use a version of this.
Adopted by
Most recently taken up by
- Moriarty33/jb-kaizentheir own version, first seen Nov 8, 2026
- GradScalerTeam/claude_clitheir own version, first seen Nov 8, 2026
- artivilla/agent-skillstheir own version, first seen Nov 8, 2026
- DmacMcgreg/psibottheir own version, first seen Nov 8, 2026
- ashleysbrain/skillstheir own version, first seen Nov 8, 2026
- sidmanale643/pekka-bottheir own version, first seen Nov 8, 2026
Used with
Projects with it also use taskflow-inbox-triage, BlueBubbles and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AtomicBot-aiSkilltaskflow-inbox-triage
Also in 6 projects that use this
jiulingyunSkillBlueBubbles
为Clawdbot构建或更新BlueBubbles外部通道插件(扩展包,REST发送/探测,webhook入站)。
Also in 20 projects that use this
hkyutongSkillnode-connect
Diagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps. Use when QR/setup code/manual connect fails, local Wi-Fi works but VPS/tailnet does not, or errors mention pairing required, unauthorized, bootstrap token invalid or expired, gateway.bind, gateway.remote.url, Tailscale, or plugins.entries.device-pair.config.publicUrl.
Also in 18 projects that use this
molt-botSkilldiscord-e2e
Test Discord with Convex-leased QA bots: check credentials without a Gateway, exercise owned messages, or prove OpenClaw replies, files, threads, reactions, streaming, and typing. Distinguish API and Gateway evidence from manual user interactions.
Also in 10 projects that use this
molt-botSkillopenclaw-repair-sweep
Run scoped OpenClaw issue/PR repair campaigns: coordinate workers, prove root causes, and land or close verified work under the requested authority.
Also in 10 projects that use this
clawdbotSkillopenclaw-performance
Performance work in OpenClaw: a slow or heavy flow (latency, CPU, memory, SQL, RPC, renders), writing or reviewing a perf PR, or adding a cache. Count the work, delete waste first, cache last.
Also in 7 projects that use this
- +2 more from molt-bot
Other versions166 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 166
- moltbot/clawdbot★ 394ksame name
- steipete/warelay★ 394ksame name
- steipete/clawdis★ 394ksame name
- moltbot/moltbot★ 394ksame name
- clawdbot/clawdbot★ 394ksame name
- openclaw/openclaw★ 394ksame name
- molt-bot/clawdbot★ 391ksame name
- NousResearch/hermes-agent★ 262ksame name
- spinabot/brigade★ 11ksame name
- the-open-agent/openagent★ 5.7ksame name
156 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- englogSkill
- git-repos-cleanupSkill
- gitSkill
- golang-developmentSkill
- pull-requestSkill
- python-developmentSkill
- review-claude-configSkill
- review-claude-settingsSkill
- review-pull-requestSkill
- session-learningsSkill
- triage-dependency-prsSkill
- untracked-secrets-scanSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 4 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 151 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 14
Read-only by default. Any GitHub side effect (create, edit, comment, review, close, merge, label) needs explicit user approval for that …
- Distinctive: line 15
Never merge into the base branch via CLI unless explicitly asked.
- Very specific: line 17
Keep reads narrow: --json with a short field list, explicit --method GET for gh api reads.
- Distinctive: line 18
After any write, verify by re-querying GitHub.
- Distinctive: line 22
When a referenced skill only exists on an unmerged PR, fetch it and follow it as local guidance:
- Very specific: line 79
Use unresolveReviewThread the same way.
- Very specific: line 121
GraphQL variables: must be declared in the signature: mutation($id: ID!) { ...
- Very specific: line 123
Bodies with backticks or newlines: write to a file, use -F body=@file or --body-file.
- Very specific: line 128
PR head SHA can lag: after a push; check git/refs for refs/heads/<branch>.
“Common” is measured: kept by at least 6 in 10 of the 151 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub CLI (gh) mechanics
Defaults
- Read-only by default. Any GitHub side effect (create, edit, comment, review, close, merge, label) needs explicit user approval for that action.
- Never merge into the base branch via CLI unless explicitly asked.
ghtargets the current git repository. For any other repo, always pass--repo <owner/repo>.- Keep reads narrow:
--jsonwith a short field list, explicit--method GETforgh apireads. - After any write, verify by re-querying GitHub; some failures are silent (exit 0, nothing done).
Load a skill from a pull request
When a referenced skill only exists on an unmerged PR, fetch it and follow it as local guidance:
gh api "repos/<o>/<r>/contents/<path>/SKILL.md?ref=refs/pull/<N>/head" --jq '.content' | base64 --decode # macOS: -Dgh pr diff <N> --repo <o>/<r> shows every new file at once.
PR comments and history
gh pr view --commentscan truncate. Inline diff comments:gh api --method GET repos/<o>/<r>/pulls/<N>/comments --paginate. Conversation comments:.../issues/<N>/comments.- Event history (merge queue, labels, force pushes) uses the issues endpoint;
pulls/<N>/timelinereturns 404:
gh api --method GET repos/<o>/<r>/issues/<N>/events --jq '.[] | .event + " " + .created_at + " " + .actor.login'Useful events: added_to_merge_queue, removed_from_merge_queue, labeled, head_ref_force_pushed.
gh search prs --review-requested <user>also matches team requests. Direct requests are inrequested_reviewersofrepos/<o>/<r>/pulls/<N>.reviewDecisionis not available ingh search prs --json; usegh pr view <N> --json reviewDecision.
Merge queue
gh pr merge --auto (and often --squash) does not reliably enqueue on merge-queue repos. Use GraphQL:
# 1. enqueuePullRequest fails while required checks are pending: wait first
gh pr checks <N> --repo <o>/<r> --watch
# 2. Node ID, then enqueue (mutation is enqueuePullRequest, not addPullRequestToMergeQueue)
PR_ID=$(gh api repos/<o>/<r>/pulls/<N> --jq '.node_id')
gh api graphql -f id="$PR_ID" -f query='mutation($id: ID!) { enqueuePullRequest(input: {pullRequestId: $id}) { mergeQueueEntry { position } } }'To merge once checks pass instead, use enablePullRequestAutoMerge(input: {pullRequestId: $id, mergeMethod: SQUASH}). Verify either way:
gh api graphql -f query='{ repository(owner:"<o>", name:"<r>") { pullRequest(number:<N>) { mergeQueueEntry { position } autoMergeRequest { enabledAt } } } }' --jq '.data.repository.pullRequest'Both null means nothing happened.
Review threads
Resolving is GraphQL-only and needs thread IDs (PRRT_... from reviewThreads), not comment IDs (PRRC_...):
gh api graphql -f o=<o> -f r=<r> -F p=<N> -f query='
query($o: String!, $r: String!, $p: Int!) {
repository(owner: $o, name: $r) { pullRequest(number: $p) {
reviewThreads(first: 100) { nodes { id isResolved path comments(first: 1) { nodes { body } } } }
} }
}'
gh api graphql -f id=<PRRT_ID> -f query='mutation($id: ID!) { resolveReviewThread(input: {threadId: $id}) { thread { isResolved } } }'Use unresolveReviewThread the same way. If GraphQL is unavailable, ask the user to resolve in the UI.
Posting reviews
Simple reviews: gh pr review <N> --repo <o>/<r> --approve|--request-changes|--comment --body-file <file>.
Review with inline comments in one call (pin to the current head SHA):
SHA=$(gh pr view <N> --repo <o>/<r> --json headRefOid --jq .headRefOid)
gh api repos/<o>/<r>/pulls/<N>/reviews --method POST \
-f commit_id="$SHA" -f event=COMMENT -F body=@summary.md \
-f "comments[][path]=<file>" -F "comments[][line]=<line>" \
-f "comments[][side]=RIGHT" -f "comments[][body]=<comment>"event is APPROVE, REQUEST_CHANGES, or COMMENT. Reply to a comment with -F in_reply_to=<id> on pulls/<N>/comments.
To change a posted comment, edit it rather than posting a correction: gh api --method PATCH repos/<o>/<r>/issues/comments/<id> -F body=@file (<id> from the #issuecomment-<id> fragment).
Batching GraphQL mutations
Many writes in a loop are slow and can fail silently. Batch them as aliased mutations in one call, about 16 per call; split further on RESOURCE_LIMITS_EXCEEDED:
gh api graphql -f query='{ repository(owner:"<o>", name:"<r>") { id label(name:"<label>") { id } } }'
gh api graphql -f query='
mutation {
a1: addLabelsToLabelable(input: {labelableId: "<NODE_ID_1>", labelIds: ["<LABEL_ID>"]}) { clientMutationId }
a2: addLabelsToLabelable(input: {labelableId: "<NODE_ID_2>", labelIds: ["<LABEL_ID>"]}) { clientMutationId }
}' --jq '.data | keys[]'The same pattern works for createPullRequest, resolveReviewThread, and other mutations. Re-query afterward to confirm every item.
Troubleshooting
--jqobject construction (--jq '{a: .x}') can silently return nothing. Use string concatenation or pipe tojq.--jqonly exists ongh api, and rejects jq flags like--arg; pipe tojqinstead.gh issue view --commentsand--jsonare mutually exclusive: use--json comments.-fsends strings,-Fsends typed values (numbers, booleans,@file). AnInt!variable given with-ffails with "invalid value".- GraphQL variables must be declared in the signature:
mutation($id: ID!) { ... }. - GraphQL query: pass with
-f query='...', not a heredoc on stdin. - Bodies with backticks or newlines: write to a file, use
-F body=@fileor--body-file. A body starting with@usergiven via-Fis read as a path; use-f body="$BODY". - Quote URLs containing
?(zsh globbing). gh pr difftakes no file paths; use--name-onlyor thepulls/<N>/files --paginateAPI. If it returns empty, use the files API.- Empty
gh issue viewoutput: fall back togh api repos/<o>/<r>/issues/<N>. - GraphQL 502 or HTML responses: switch to REST for the rest of the session instead of retrying.
- PR head SHA can lag after a push; check
git/refsforrefs/heads/<branch>. - Sub-issues endpoint is
issues/<N>/sub_issues(underscore). gh project item-listtruncates silently; pass--limit 1000.- Reopening a PR after its branch was force-pushed fails; open a new PR referencing the old one.
gh pr createon a branch that already has a PR exits 1; usegh pr edit.- Parallel calls: include the PR/issue number in each output line; completion order is random.
- Debug:
GH_DEBUG=api gh <command>shows the API calls.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

