using-gh
Skill4 starsChanged 8 months agoMITView on GitHub
Use when working with GitHub-hosted repositories through the GitHub CLI in this build environment, especially for authentication checks, pull requests, Actions run inspection, release inspection, and publishing or editing releases after CI has passed.
- Commits and pushes
In this repository47 other files it gives its agents.
- allocating-resourcesSkill
- ci-testingSkill
- creating-pull-requestsSkill
- designing-modulesSkill
- porting-to-riscos-cSkill
- reading-assemblySkill
- riscos-commandsSkill
- riscos-desktop-fileractionSkill
- riscos-filer-likeSkill
- riscos-filesystemSkill
- riscos-graphics-convertersSkill
- riscos-network-dcistatisticsSkill
- riscos-network-resolverSkill
- riscos-outputSkill
- riscos-reSkill
- riscos-styleSkill
- riscos-throwbackSkill
- riscos-urls-fetchingSkill
- riscos-urls-launchingSkill
- riscos-wimp-appSkill
- riscos-wimpSkill
- riscos-wimp-templatesSkill
- updating-robe-skillsSkill
- using-bbcbasicSkill
- using-cmhgSkill
- using-gitSkill
- using-libasmSkill
- using-libgcontextSkill
- using-liboslibSkill
- using-libriscoslibSkill
- using-libtoolboxSkill
- using-makefilesSkill
- using-perlSkill
- using-stronghelpSkill
- using-toolbox-imagefilegadgetSkill
- using-tooltesterSkill
- writing-assemblySkill
- writing-assembly-testsSkill
- writing-cmodulesSkill
- writing-cplusplusSkill
- writing-cSkill
- writing-fortranSkill
- writing-oslib-defsSkill
- writing-pascalSkill
- writing-prminxmlSkill
- writing-pymodulesSkill
- writing-pyromaniac-integration-testsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. About 0 are common, 13 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
10
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
- Very specific: line 10
Use this skill when the task involves a GitHub repository and the gh command is the right interface for inspection or automation.
- Very specific: line 14
Use using-git alongside it when commits, branches, or selective staging are part of the task.
- Very specific: line 19
Prefer non-interactive gh commands.
- Distinctive: line 20
Check authentication first before assuming GitHub operations will work.
- Distinctive: line 27
Do not assume a branch push will trigger the intended workflow.
- Very specific: line 29
If git push fails because of local credential-helper problems, do not stop there.
- Very specific: line 40
Do not assume gh authentication and git push authentication are the same credential path in this environment.
- Distinctive: line 43
Check both independently when push behaviour matters:
- Very specific: line 60
When a workflow file under .github/workflows/ is being created or updated, distinguish carefully between:
- Distinctive: line 67
If GitHub CLI is authenticated but git push fails through a broken credential helper, a one-off push can still be done by injecting the …
- Distinctive: line 76
Use this sparingly and only for the specific push you need.
- Distinctive: line 80
Create a PR non-interactively:
- Very specific: line 91
Prefer --body-file for any non-trivial PR description so the structure can be reviewed before submission and multiline markdown is not …
- Distinctive: line 111
When opening a PR, gather and state the tests that were actually run.
- Distinctive: line 115
Create the PR as a draft when the work is incomplete, testing is blocked, or known issues remain that would waste reviewer time.
- Very specific: line 124
Use a PR when the workflow triggers on pull_request but not on arbitrary branch pushes.
- Distinctive: line 156
When reporting CI state, include:
- Very specific: line 188
After editing or publishing a release, re-read it with gh release view to confirm:
- Distinctive: line 198
If a workflow publishes releases from tags:
- Distinctive: line 200
Create and inspect the tag locally.
- Very specific: line 228
When a gh-token-based push is rejected for updating workflow files without workflow scope, retrying with the repository's normal git push …
- Distinctive: line 236
When watching a matrix workflow, inspect job names individually so you can tell which profile or variant passed.
- Distinctive: line 241
Use this skill for tasks such as:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Using GitHub CLI
Use this skill when the task involves a GitHub repository and the gh command
is the right interface for inspection or automation.
This skill is for GitHub-side operations, not general Git worktree handling.
Use using-git alongside it when commits, branches, or selective staging are
part of the task.
Core rules
- Prefer non-interactive
ghcommands. - Check authentication first before assuming GitHub operations will work.
- Distinguish clearly between:
- local Git state,
- pushed branch state,
- PR state,
- Actions run state,
- release state.
- Do not assume a branch push will trigger the intended workflow. Check the workflow triggers and use a PR or tag when required.
- If
git pushfails because of local credential-helper problems, do not stop there.ghauth may still be valid.
Authentication
Start with:
gh auth statusDo not assume gh authentication and git push authentication are the same
credential path in this environment.
Check both independently when push behaviour matters:
gh auth status
git remote -vImportant distinction:
ghcommands use the token and host configuration managed by GitHub CLI.- Plain
git pushmay use a separate Git credential helper, stored HTTPS credentials, or another transport-specific mechanism. - A
ghtoken may lack scopes such asworkfloweven when plaingit pushsucceeds through another credential path. - Conversely,
ghmay be fully usable for API inspection even whengit pushfails because Git cannot update or access its credential store.
When a workflow file under .github/workflows/ is being created or updated,
distinguish carefully between:
- whether
ghcan inspect repository state and Actions runs, and - whether the credential used by
git pushis allowed to update workflow files on GitHub.
If GitHub CLI is authenticated but git push fails through a broken credential
helper, a one-off push can still be done by injecting the token explicitly:
git -c credential.helper= \
-c http.https://github.com/.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$(gh auth token)" | base64 -w0)" \
push -u origin <branch>Use this sparingly and only for the specific push you need.
Pull requests
Create a PR non-interactively:
gh pr create \
--repo owner/repo \
--base master \
--head feature-branch \
--title "Short title" \
--body-file /tmp/pr-body.mdPrefer --body-file for any non-trivial PR description so the structure can
be reviewed before submission and multiline markdown is not squeezed into a
single shell argument.
Recommended PR body structure:
# Summary
Why the change is being made and the high-level result.
# Changes
What was actually done and how related changes fit together.
# Testing
What was tested, including local checks and CI results when available.When opening a PR, gather and state the tests that were actually run. If local validation was possible, mention it. If a CI workflow was run successfully, include that fact and the run URL when it helps reviewers.
Create the PR as a draft when the work is incomplete, testing is blocked, or known issues remain that would waste reviewer time.
Inspect the PR in machine-readable form:
gh pr view <number> --repo owner/repo --json number,url,headRefName,baseRefName,stateUse a PR when the workflow triggers on pull_request but not on arbitrary
branch pushes.
gh pr create may warn about uncommitted local changes. Treat that as a cue to
check the worktree, not as proof that PR creation failed.
Actions runs
List recent runs for one workflow:
gh run list --repo owner/repo --workflow build.yml --limit 10Inspect a run and its jobs:
gh run view <run-id> --repo owner/repo --json status,conclusion,name,workflowName,jobs,urlWatch a run to completion:
gh run watch <run-id> --repo owner/repo --exit-statusInspect failed logs when something breaks:
gh run view <run-id> --repo owner/repo --log-failedWhen reporting CI state, include:
- run id,
- trigger type,
- overall status,
- which jobs passed or failed,
- whether release jobs ran or were skipped.
Releases
Inspect a release:
gh release view <tag> --repo owner/repoInspect structured release data:
gh release view <tag> --repo owner/repo --json name,tagName,isDraft,isPrerelease,url,body,assetsPublish or edit a draft release with prepared notes:
gh release edit <tag> \
--repo owner/repo \
--title "v0.02" \
--notes-file /tmp/release-notes.txt \
--draft=falseAfter editing or publishing a release, re-read it with gh release view to
confirm:
- draft vs published state,
- final tag URL,
- attached asset names,
- release notes content.
Tag workflows
If a workflow publishes releases from tags:
- Create and inspect the tag locally.
- Push only the tag.
- Watch the tag-triggered run.
- Confirm the release job completed.
- Confirm the release exists and assets are attached.
Useful commands:
git tag -a v0.02 -m "Release v0.02"
git show --stat --no-patch v0.02
gh run list --repo owner/repo --workflow build.yml --limit 5
gh release view v0.02 --repo owner/repoEnvironment-specific notes
Lessons from this environment:
ghmay be authenticated even when Git's configured credential helper is not writable or is otherwise broken.- Plain
git pushmay still succeed in that situation if Git can read an existing credential and does not need to update the store. gh auth setup-gitcan fail if the global Git config is not writable. Do not assume that meansghis unusable.- Successful
git pushdoes not prove that theghtoken has equivalent repository scopes. Treat Git transport credentials and GitHub CLI token scopes as separate facts to verify. - When a
gh-token-based push is rejected for updating workflow files withoutworkflowscope, retrying with the repository's normalgit pushpath may still work if that path uses different credentials. - The repository being changed may not be the same repository whose workflow or release should be inspected. Check remotes and repository boundaries first.
- A release created by Actions may initially appear under an untagged draft URL before the final published tag URL is visible. Re-check after the workflow completes.
- When watching a matrix workflow, inspect job names individually so you can tell which profile or variant passed.
When to use this skill
Use this skill for tasks such as:
- checking whether
ghauthentication is available, - creating or inspecting pull requests,
- watching GitHub Actions runs,
- fetching failed CI logs,
- checking whether release artifacts exist,
- publishing or editing releases after CI succeeds,
- working around GitHub push credential issues when
ghauth is already valid.
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.

