gh
Use gh for GitHub auth, repo selection, Actions logs, and bounded API calls.
Install
npx skills add https://github.com/fmind/dot/tree/main/skills/gh
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install fmind-dot@llmmart
git clone https://github.com/fmind/dot.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole fmind/dot collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
GitHub CLI
Use gh for authenticated GitHub reads and writes. This connector owns account selection, bounded requests, and the guides below; github-actions owns workflows and git-delivery owns commits, pushes, and releases.
Workflow
- Resolve host and repository: confirm from the request and
gh repo view --json nameWithOwner(never print raw remote URLs, which may embed credentials). Pass-R <owner>/<repo>(--hostname <host>ongh api) instead of assuming the current checkout. - Verify auth: run
gh auth status --active --hostname <host>when uncertain; env tokens can override stored accounts, and never print tokens or pass--show-token. Account switches and extra scopes require authority per dot-cli authentication. - Use bounded native reads: pass explicit
--limitand--jsonfields. Read remote files withgh repo read-file <path> -R <owner>/<repo> --ref <sha>orgh repo read-dir(preview; pass"", not., for the root) instead of cloning. For API gaps, passgh api --method GET <endpoint>withper_pageandpage(--field/--raw-fieldotherwise defaults to POST). - Inspect failed Actions logs first:
gh run view <run-id> -R <owner>/<repo> --job <job-id> --log-failed(save large logs to a file). - Write from files, then read back: pass
--body-fileorgh api --input <file>on authorized writes, re-read modified fields, and reconcile remote state before retrying an uncertain write.
Task guides
- issues: Plan, draft, deduplicate, update, link, and close GitHub issues.
- pull-request: Open, update, verify, comment on, and merge GitHub pull requests.
- repository: Set GitHub repo description, homepage, topics, merge policy, and security settings.
Gotchas
- Inspect auth fields, not exit codes:
gh auth status --jsoncan exit 0 on failed auth. - Paginate only bounded sets:
gh api --paginatefetches all pages;--slurpwraps page responses rather than flattening items.
Official Skills
Upstream cli/cli ships agent skills including a same-name gh: preview only and never install under gh (vendor-skill policy); follow official-skills for pinned installs.
Documentation
- GitHub CLI manual · gh api · releases
- Companions: github-actions, git-delivery.
Files (dot)
-
references
-
issues
-
references
-
backlog.md 2.5 KB
Loading…
-
-
GUIDE.md 2.4 KB
Loading…
-
-
repository
-
references
-
settings-baseline.md 6 KB
Loading…
-
-
scripts
-
settings_baseline.py 18 KB
Loading…
-
-
GUIDE.md 2.4 KB
Loading…
-
-
official-skills.md 589 B
Loading… -
pull-request.md 3.3 KB
Loading…
-
-
SKILL.md 3 KB
--- name: gh description: "Use gh for GitHub issues, pull requests, repo metadata and settings, Actions logs, auth, and API calls." license: MIT metadata: kind: connector author: Médéric HURIER (Fmind) source: github.com/fmind/dot/tree/main/skills/gh created: "2026-09-16" updated: "2026-11-11" --- # GitHub CLI Use `gh` for authenticated GitHub reads and writes. This connector owns account selection, bounded requests, and the guides below; [github-actions](../github-actions/SKILL.md) owns workflows and [git-delivery](../git-delivery/SKILL.md) owns commits, pushes, and releases. ## Workflow 1. **Resolve host and repository**: confirm from the request and `gh repo view --json nameWithOwner` (never print raw remote URLs, which may embed credentials). Pass `-R <owner>/<repo>` (`--hostname <host>` on `gh api`) instead of assuming the current checkout. 1. **Verify auth**: run `gh auth status --active --hostname <host>` when uncertain; env tokens can override stored accounts, and never print tokens or pass `--show-token`. Account switches and extra scopes require authority per [dot-cli authentication](../dot-cli/references/authentication.md). 1. **Use bounded native reads**: pass explicit `--limit` and `--json` fields. Read remote files with `gh repo read-file <path> -R <owner>/<repo> --ref <sha>` or `gh repo read-dir` (preview; pass `""`, not `.`, for the root) instead of cloning. For API gaps, pass `gh api --method GET <endpoint>` with `per_page` and `page` (`--field`/`--raw-field` otherwise defaults to POST). 1. **Inspect failed Actions logs first**: `gh run view <run-id> -R <owner>/<repo> --job <job-id> --log-failed` (save large logs to a file). 1. **Write from files, then read back**: pass `--body-file` or `gh api --input <file>` on authorized writes, re-read modified fields, and reconcile remote state before retrying an uncertain write. ## Task guides <!-- guides:start --> - [issues](references/issues/GUIDE.md): Plan, draft, deduplicate, update, link, and close GitHub issues. - [pull-request](references/pull-request.md): Open, update, verify, comment on, and merge GitHub pull requests. - [repository](references/repository/GUIDE.md): Set GitHub repo description, homepage, topics, merge policy, and security settings. <!-- guides:end --> ## Gotchas - **Inspect auth fields, not exit codes**: `gh auth status --json` can exit 0 on failed auth. - **Paginate only bounded sets**: `gh api --paginate` fetches all pages; `--slurp` wraps page responses rather than flattening items. ## Official Skills Upstream `cli/cli` ships agent skills including a same-name `gh`: preview only and never install under `gh` ([vendor-skill policy](../agent-project/references/vendor-skills.md#name-collisions)); follow [official-skills](references/official-skills.md) for pinned installs. ## Documentation - [GitHub CLI manual](https://cli.github.com/manual/) · [gh api](https://cli.github.com/manual/gh_api) · [releases](https://github.com/cli/cli/releases) - Companions: [github-actions](../github-actions/SKILL.md), [git-delivery](../git-delivery/SKILL.md).
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.