Skip to content

feat(setup): install the upstream gh agent skill per agent#9

Merged
rlorenzo merged 4 commits into
mainfrom
feat/setup-gh-skill-install
Jul 2, 2026
Merged

feat(setup): install the upstream gh agent skill per agent#9
rlorenzo merged 4 commits into
mainfrom
feat/setup-gh-skill-install

Conversation

@rlorenzo

@rlorenzo rlorenzo commented Jul 1, 2026

Copy link
Copy Markdown
Owner

What

setup now offers to install the upstream gh agent skill (published by cli/cli) for each selected coding agent, or updates it when already present.

  • New configure_gh_skill plus gh_skill_available / gh_skill_agent_id helpers.
  • Runs after the per-tool install loop, once per selected agent.
  • Install missing: gh skill install cli/cli gh --agent <id> --scope user
  • Update existing (detected via gh skill list --agent): gh skill update gh
  • Gated on gh skill being available, so an older gh is skipped cleanly instead of erroring.

Why

The gh skill teaches agents to drive the GitHub CLI well (structured output, pagination, repo targeting, search vs. list, gh api fallback). It's an upstream skill, unrelated to the commands this repo ships — purely additive, no collision with the existing installer.

Testing

  • bash -n setup parses cleanly.
  • Detection query returns the per-agent installed count; the update path (gh skill update gh) is idempotent ("All skills are up to date").
  • Verified live installs for claude-code, codex, and antigravity (all gh v2.95.0).

https://claude.ai/code/session_019x6ReGXvRWpC7sF8aum6LR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an optional post-install step to setup that can install (or update) the upstream cli/cli gh agent skill per selected coding agent, and documents this capability in the README.

Changes:

  • Add gh_skill_available, gh_skill_agent_id, and configure_gh_skill helpers to detect/install/update the upstream gh agent skill.
  • Run the per-agent gh skill installation/update step after the main per-tool install loop (gated on gh skill availability).
  • Document the new gh agent skill behavior and manual commands in README.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
setup Adds per-agent detection + install/update flow for the upstream gh agent skill.
README.md Documents the new optional gh agent skill installation/update behavior and manual management commands.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread setup
Comment thread README.md Outdated
- Add a setup section that installs cli/cli's gh agent skill for each selected agent, or updates it when already present.
- Detect installs per agent via gh skill list --agent and update via gh skill update gh --agent "$agent_id".
- Document the gh agent skill setup step in README.md.
@rlorenzo rlorenzo force-pushed the feat/setup-gh-skill-install branch from 189969c to 1c7f1c0 Compare July 1, 2026 21:04
`gh skill update` has no `--agent` flag ("unknown flag: --agent", exit 1),
so the update path failed every time the gh skill was already installed.
Call `gh skill update gh` (which updates the skill across all hosts, its
documented behavior) and keep the success/failure reporting.

Also make the README removal example agent-agnostic instead of hard-coding a
Claude-specific skills path, pointing to `gh skill list` for the exact path.

Claude-Session: https://claude.ai/code/session_019x6ReGXvRWpC7sF8aum6LR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread setup
Comment thread README.md Outdated
`gh skill update gh` updates the skill across all hosts, not per-agent, so the
update-branch messages no longer say "for <agent>" (and no longer print
"Updated" when nothing changed). In the README, make the manual install
example explicit with `--agent` and drop the inaccurate "defaults to the
current agent" note — non-interactively `gh skill install` defaults to
github-copilot, so the agent should be stated.

Claude-Session: https://claude.ai/code/session_019x6ReGXvRWpC7sF8aum6LR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread README.md Outdated
Plain `gh skill list` prints skillName/host/scope/source but no filesystem
path — the `path` field is JSON-only. Point users at
`gh skill list --json skillName,path` so the removal instructions are
actually followable.

Claude-Session: https://claude.ai/code/session_019x6ReGXvRWpC7sF8aum6LR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread setup
@rlorenzo rlorenzo merged commit 62d614f into main Jul 2, 2026
5 checks passed
@rlorenzo rlorenzo deleted the feat/setup-gh-skill-install branch July 2, 2026 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants