agentleFS
fmindfmind/dot/skills/gh/SKILL.md

gh

Skill13 starsChanged 4 days agoMITView on GitHub

Use gh for GitHub auth, repo selection, Actions logs, and API calls.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are 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.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use gh for authenticated GitHub input and output.

    line 15
  2. Very specific:

    Check authentication: run gh auth status --active --hostname <host> when authentication is uncertain.

    line 20
  3. Very specific:

    Write from files, then read back: use --body-file or gh api --input <file> for an authorized write, re-read the changed fields, and …

    line 23

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GitHub CLI

Use gh for authenticated GitHub input and output. This connector owns account selection and request mechanics; the task skills below own planning, delivery, and repository policy.

Workflow

  1. Resolve the intended host and repository: from the request and Git remotes, using gh repo view --json nameWithOwner; never print raw remote URLs, which can contain credentials. Pass -R <owner>/<repo> to repository commands and --hostname <host> to API calls when needed; do not silently use an unrelated current checkout.
  2. Check authentication: run gh auth status --active --hostname <host> when authentication is uncertain. Environment credentials can override stored accounts; never print token values or use --show-token. Account changes and additional OAuth scopes need authority; dot-cli authentication owns the login policy and its one-off grants.
  3. Prefer bounded native commands: prefer the native command with an explicit --limit and selected --json fields. Read a remote file or directory 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 or decoding the contents API. For missing capabilities, use gh api --method GET <endpoint> with bounded per_page and page fields. Adding --field or --raw-field otherwise changes the default method to POST.
  4. Read failed Actions logs first: gh run view <run-id> -R <owner>/<repo> --job <job-id> --log-failed, saved to a file when large.
  5. Write from files, then read back: use --body-file or gh api --input <file> for an authorized write, re-read the changed fields, and reconcile remote state before retrying an uncertain write.

Task owners

  • github-issues: issue planning, drafts, dependencies, updates, and closure.
  • github-pull-request: PR creation, updates, base/head selection, verification, and merging.
  • github-repository: repository metadata, visibility, and settings.
  • github-actions: workflow authoring and CI/CD policy.
  • git-delivery: authorized commits, pushes, and releases.

Gotchas

  • Inspect auth state, not exit codes: gh auth status --json can exit zero despite authentication failures; inspect the reported state.
  • Paginate only bounded collections: gh api --paginate fetches every page; use it only for a bounded, intentionally complete collection. --slurp combines page objects, not individual records.

Official Skills

Upstream cli/cli publishes agent skills, including a same-name gh: preview it, never install it under that name (vendor-skill policy). Review and install others only through the pinned official-skills procedure.

Documentation

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.