gh-cli-setup-skill
Skill7 starsChanged 56 days agoApache-2.0View on GitHub
GitHub CLI missing or unauthenticated — per-OS install (brew/apt/dnf/winget), gh auth login, auth verification, repo-scope check. Fallback for ticket and PR flows when `command -v gh` fails. Triggers: gh not installed, install github cli, gh auth login, gh setup.
- Installs packages
In this repository85 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-a11y-skillSkill
- agent-introspection-debugging-skillSkill
- amplify-nextjs-deployment-skillSkill
- architecture-review-skillSkill
- authentication-authorization-skillSkill
- autoresearch-skillSkill
- aws-iac-safety-skillSkill
- blast-radius-skillSkill
- browser-fallback-skillSkill
- cad-dxf-skillSkill
- cad-generation-skillSkill
- cad-implicit-skillSkill
- cad-redraw-skillSkill
- cad-specialist-skillSkill
- cad-viewer-skillSkill
- changelog-python-cliff-skillSkill
- civiltekk-api-spec-skillSkill
- civiltekk-coding-harness-setup-skillSkill
- civiltekk-context-optimization-skillSkill
- civiltekk-diagram-skillSkill
- civiltekk-documentation-inline-skillSkill
- civiltekk-documentation-sync-skillSkill
- civiltekk-git-commits-skillSkill
- civiltekk-nextjs-skillSkill
- referencesSkill
- civiltekk-opencode-creation-skillSkill
- civiltekk-opentofu-skillSkill
- civiltekk-ponytail-audit-skillSkill
- civiltekk-pr-workflow-skillSkill
- civiltekk-python-backend-skillSkill
- civiltekk-react-quality-skillSkill
- civiltekk-startup-docs-skillSkill
- civiltekk-test-generation-skillSkill
- civiltekk-zai-media-skillSkill
- code-principles-skillSkill
- code-review-inline-skillSkill
- construction-bd-skillSkill
- continuous-learning-skillSkill
- coverage-readme-workflow-skillSkill
- database-migration-skillSkill
- deprecated-code-cleanup-skillSkill
- docker-containerization-skillSkill
- domain-modeling-skillSkill
- email-drafter-skillSkill
- error-resolver-workflow-skillSkill
- eval-harness-skillSkill
- frontend-design-skillSkill
- grilling-skillSkill
- gsap-skillSkill
- horseshoe-paper-writing-skillSkill
- install-assistant-skillSkill
- language-linting-skillSkill
- language-review-checklists-skillSkill
- linting-inline-skillSkill
- linting-workflow-skillSkill
- logging-observability-skillSkill
- monorepo-management-skillSkill
- office-document-router-skillSkill
- opencode-repo-setup-skillSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
If gh exists and is authenticated, return to the calling flow — nothing to do.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
What I do
Set up the GitHub CLI so ticket- and PR-creation flows can continue in
environments where gh is missing or unauthenticated. I am the fallback
referenced by ticketing-skill (§Platform Detection tooling tier;
references/github.md §Tooling fallback) and
civiltekk-pr-workflow-skill (references/create.md §Steps
step 6, the create route): they invoke me when
command -v gh fails, then resume their flow.
When to use me
command -v ghfails inside a ticket/PR flowghinstalled butgh auth statusis not valid- Fresh machine setup before any GitHub operation
Steps
1. Verify absence
command -v gh || echo "MISSING"
gh auth status 2>&1 || trueIf gh exists and is authenticated, return to the calling flow — nothing to do.
2. Install per OS
| OS | Command |
| macOS | brew install gh |
| Debian/Ubuntu | sudo apt update && sudo apt install -y gh (needs gh apt repo on older images: see https://github.com/cli/cli/blob/trunk/docs/install_linux.md) |
| Fedora/RHEL | sudo dnf install -y gh |
| Windows | winget install --id GitHub.cli (or choco install gh) |
Confirm: gh --version.
3. Authenticate
gh auth loginDevice flow is the default for headless/SSH environments: pick
GitHub.com → SSH protocol (matches this config's git operations) →
Login with a web browser, then open https://github.com/login/device and
enter the one-time code. In a browser-less session, gh auth login
prints the code and URL regardless — copy it to the user.
4. Verify
gh auth status✓ Logged in to github.com account <login>→ done; report the login and return to the calling flow.- Token present but missing
reposcope → re-auth withgh auth refresh -s repo(ticket/PR creation requiresrepo); if the refresh fails, redo step 3.
Common Issues
- No browser available — the device flow works from any second device; hand the user the code + URL.
ghnot found after install — new install path not on$PATH;hash -r(bash) or reopen the shell.- Corporate proxy — export
HTTPS_PROXYbeforegh auth login.
Return
Report: installed-or-already-present, authenticated login name, scopes.
The calling flow resumes with gh usable; author/assignee attribution
resolves to this login (@me).
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.

