`gh` skill description does not tell agents when to use it, so it is skipped for tasks it covers

Ouverte Adaptée aux débutants
#14,621 2 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@littfed y travaille déjà.

Depuis le 9/10/2026.

  • #14629 par @littfed — ouverte

Évaluation

Difficulté
1/5
Temps estimé
Moins d'une heure
Accessibilité débutants
85/100
Type d'issue
Documentation
Clarté
Clairement spécifiée
Activité
Active
Stack technique
markdown
Domaine
documentation

Piste de recherche

Ouvrez skills/gh/SKILL.md et mettez à jour le champ description du frontmatter afin d’ajouter un déclencheur explicite « use when » pour les tâches GitHub et de répertorier les capacités plus récentes de gh, comme --attach, gh discussion, gh repo read-file/read-dir, ainsi que les types d’issue, les sous-issues et les liens « blocked-by ». Assurez-vous que la description respecte les limites du frontmatter des agent skills et correspond aux critères d’acceptation fournis.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

enhancement
Describe the feature or problem you’d like to solve

The official gh skill (skills/gh/SKILL.md) has this description:

Patterns for invoking the GitHub CLI (gh) from agents. Covers structured output, pagination, repo targeting, search vs list, gh api fallback.

Agents decide whether to load a skill from its description alone. This one has two gaps:

  1. It has no "use when" clause, so it says what the skill contains but not which tasks should trigger it.
  2. It lists only topics agents already roughly know (--json, pagination, gh api). It does not mention what the skill uniquely teaches: features newer than most models' training data, such as --attach, gh discussion, gh repo read-file / read-dir, and issue types, sub-issues and blocked-by relationships.

Because of this, the skill is skipped for exactly the tasks where it adds the most value. An agent that doesn't know gh can do something will never pick gh for the task, and so never reaches the skill.

Observed example: in a Claude Code session with the gh skill installed, I asked the agent to attach a file to a pull request description. It did not load the skill. It tried to do it through a browser instead, failed (including at login), and eventually gave up. It completed the task with gh pr edit --attach only after I told it to use the gh skill.

I have since worked around this with a personal CLAUDE.md instruction to load the skill before any GitHub task, but other users of the skill won't have that.

Proposed solution

Rewrite the description in skills/gh/SKILL.md so that it:

  • starts with the tasks that should trigger it ("Use for any GitHub task done through gh..."), and
  • names the newer capabilities the skill documents, so that agents load it for tasks they wrongly assume gh can't do.

For example:

Use for any GitHub task done through gh: issues, PRs, search, gh api, attaching images or videos to issues, PRs and comments, discussions, reading repo files without cloning, and issue types, sub-issues and blocked-by links. Covers features newer than most agents' training data, plus structured output, pagination and repo targeting.

This would make the skill trigger more reliably without changing its body. It also matters more if #14615 ships, since packaging the skill as a plugin puts it in front of more users who have no local workaround.

Possible acceptance criteria:

  • The description contains an explicit "use when" trigger covering GitHub tasks in general.
  • The description names the skill's capabilities that are likely to be missing from a model's training data (at least --attach).
  • The description stays within agent skill frontmatter limits.
Additional context

gh version 2.102.0 (2026-09-30); skill installed from skills/gh at v2.101.0, and the description is unchanged on trunk.

Langage dominant
Go
Étoiles
46.9k
Forks
9.2k
Merge moyen
1 j 4 h
PR mergées (30 j)
60

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de cli/cli

Toutes les issues de cli/cli

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.