feat: add shared/gh-skill.md workflow for gh skill install#29192
feat: add shared/gh-skill.md workflow for gh skill install#29192
Conversation
Adds a shared agentic workflow that installs GitHub agent skills using `gh skill install` as pre-agent-steps, so skills are available when the AI agent starts. - Accepts `skills` input (required array) in the import-schema - Pre-agent-steps run `gh skill install` for each skill - Uses the AI_AGENT env var to configure the --agent flag (defaults to github-copilot if not set) - Supports owner/repo, owner/repo/skill-name, and owner/repo/skill-name@version formats - Token chain: GH_AW_PLUGINS_TOKEN || GH_AW_GITHUB_TOKEN || GITHUB_TOKEN Agent-Logs-Url: https://github.com/github/gh-aw/sessions/e907d7c0-c9bc-4a19-be1b-116a52dbddf4 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
| pre-agent-steps: | ||
| - name: Install agent skills | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GH_AW_PLUGINS_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
@copilot not internal secrets, use input instead
There was a problem hiding this comment.
Fixed in 281778b — replaced the internal secrets with a token import-schema input (optional, falls back to built-in GITHUB_TOKEN). Users pass their own token via token: ${{ secrets.MY_TOKEN }}.
| echo "::error::shared/gh-skill.md import provided no skills. Add skills: <list> in the with: block." | ||
| exit 1 | ||
| fi | ||
| agent="${AI_AGENT:-github-copilot}" |
There was a problem hiding this comment.
@copilo no AI_AGENT env. there should be an input with the gh-aw engine of that gets mapped to the gh skill agent names.
There was a problem hiding this comment.
Fixed in 281778b — added an engine import-schema input that maps gh-aw engine names to gh skill --agent values:
engine input |
--agent value |
|---|---|
copilot (default) |
github-copilot |
claude |
claude-code |
codex |
codex |
gemini |
gemini-cli |
opencode |
opencode |
Usage:
engine: claude
imports:
- uses: shared/gh-skill.md
with:
engine: claude
skills:
- github/awesome-copilot/documentation-writer|
Hey One thing that would strengthen this before merge:
If you'd like a hand, you can assign this prompt to your coding agent:
|
- Add `token` import-schema input (optional) instead of hardcoding
internal secrets (GH_AW_PLUGINS_TOKEN, GH_AW_GITHUB_TOKEN)
- Add `engine` import-schema input (optional, default: copilot) that
maps gh-aw engine names to gh skill --agent values:
copilot → github-copilot
claude → claude-code
codex → codex
gemini → gemini-cli
opencode → opencode
- Remove AI_AGENT env var dependency
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4dbc763d-433f-4aac-9845-4a01a027c8ea
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
…aths - Add `upstream` boolean import input (default true); passes --upstream to gh skill install unless set to false - Parse @ref from owner/repo/skill-name@ref entries and pass as --pin ref to gh skill install - Update docs with new input table and updated skill format table Agent-Logs-Url: https://github.com/github/gh-aw/sessions/fc9f5ddf-67af-4c30-a4c4-3b136adb4849 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 27f3d27:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot rename token: to github-token: |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/2e3aed40-f0c6-4049-b31b-f9dfdd036185 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 14d6793 — renamed Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
| engine: | ||
| type: string | ||
| required: false | ||
| description: > | ||
| The gh-aw engine name. Determines which agent host receives the skills. | ||
| Accepted values: copilot (default), claude, codex, gemini, opencode. | ||
| Maps to the corresponding gh skill --agent value: | ||
| copilot → github-copilot | ||
| claude → claude-code | ||
| codex → codex | ||
| gemini → gemini-cli | ||
| opencode → opencode |
There was a problem hiding this comment.
@copilot the compiler should populate the variable with the selected engine id or use a job level env var with the engine id
There was a problem hiding this comment.
Done in c6136e8. The compiler now injects GH_AW_ENGINE_ID as a job-level env var (set from EngineConfig.ID / AI at compile time — e.g. GH_AW_ENGINE_ID: copilot). The engine import-schema input has been removed from shared/gh-skill.md; the shell script reads ${GH_AW_ENGINE_ID:-copilot} directly from the environment.
…moke-copilot Agent-Logs-Url: https://github.com/github/gh-aw/sessions/36187a86-7511-4d2a-810e-175c11cc90e8 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 69e5f49:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
|
|
🚀 Smoke OpenCode MISSION COMPLETE! OpenCode delivered. 🔥 |
|
|
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident... |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
@copilot add code to log the gh version before calling. |
Agent Container Tool Check
Result: 12/12 tools available ✅ Overall Status: PASS
|
|
Smoke Test Codex: FAIL Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "ab.chatgpt.com"
- "chatgpt.com"See Network Configuration for more information.
|
|
Commit pushed:
|
Smoke Test Results — Run 25138536105
Overall: PARTIAL — 16 ✅, 1 ❌ (AW MCP status error), 2
|
There was a problem hiding this comment.
💥 Automated smoke test review - all systems nominal! This PR adds shared/gh-skill.md for installing agent skills via gh skill install. The implementation looks solid with proper engine mapping and upstream flag support.
💥 [THE END] — Illustrated by Smoke Claude · ● 243.1K
| import-schema: | ||
| skills: | ||
| type: array | ||
| items: |
There was a problem hiding this comment.
The import-schema block is well-structured with clear descriptions for each field. The skills array type is correctly defined as required.
Consider adding a default for engine in the schema (e.g., default: copilot) to make the default explicit in documentation. 🔍
| - shared/reporting.md | ||
| - shared/github-queries-mcp-script.md | ||
| - shared/mcp/serena-go.md | ||
| - uses: shared/gh-skill.md |
There was a problem hiding this comment.
The shared/gh-skill.md import looks good! The dependabot skill from github/awesome-copilot is a sensible smoke test dependency. This validates the entire gh skill install pipeline in CI. 🎯
…input from gh-skill Agent-Logs-Url: https://github.com/github/gh-aw/sessions/0f15be77-49e4-4344-8f76-fcad24543eab Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…kill integration test Agent-Logs-Url: https://github.com/github/gh-aw/sessions/dc00c5e6-7877-47b7-938c-7aa727382097 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 5a233ab:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot move . github/workflows/smoke-gh-skill.md to pkg/cli/integraiton |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b9526d90-4516-417f-9896-c052b0bacf88 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 50b286b — Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot merge main and recompile |
Summary
Adds a new shared agentic workflow
shared/gh-skill.mdthat installs GitHub agent skills usinggh skill installaspre-agent-steps, making skills available to the AI agent before it starts.Changes
.github/workflows/shared/gh-skill.md(new file)A shared workflow that:
skillsarray viaimport-schemagithub-tokeninput for authenticating skill downloads; falls back to the built-inGITHUB_TOKENupstreamboolean input (defaulttrue) — passes--upstreamtogh skill installby default; set tofalseto skip the upstream update--allow-hidden-dirsand--forceto everygh skill installcall by defaultgh --versionin a collapsible group before anygh skill installcall for visibility and debuggingpre-agent-stepsthat rungh skill installfor each skill before the agent executesowner/repo— installs all skills from the repositoryowner/repo/skill-name— installs a specific skill (latest, with--upstream)owner/repo/skill-name@ref— the@refsuffix is parsed out and passed as--pin refto pin to a specific tag, branch, or SHAGH_AW_ENGINE_IDjob-level env var — noengineinput requiredpkg/workflow/compiler_main_job.go(updated)GH_AW_ENGINE_IDas a job-level env var on the agent job, set at compile time fromEngineConfig.ID/AI. This makes the engine identity available topre-agent-stepswithout requiring an explicit user input.pkg/cli/integration/smoke-gh-skill.md(new file)pkg/cli/integration/) that importsshared/gh-skill.md(installsgithub/awesome-copilot/dependabot) and asks the Copilot agent to verify the skill was correctly installed before execution.Engine → agent mapping
The engine is read from
$GH_AW_ENGINE_ID(injected by the compiler):GH_AW_ENGINE_IDvaluegh skill --agentvaluecopilot(default)github-copilotclaudeclaude-codecodexcodexgeminigemini-cliopencodeopencodeUsage
No
engine:input is needed in thewith:block — the compiler automatically setsGH_AW_ENGINE_IDon the job from the workflow'sengine:field.To opt out of the upstream update:
For private skill repositories, pass a token explicitly:
Security Review
New secrets used:
GITHUB_TOKEN— built-in default fallback (always available)github-tokeninput — user-supplied, optionalNo internal organization secrets are hardcoded. No new third-party actions or containers are introduced.
Requirements
gh skillsupport, available on standard GitHub-hosted runners since April 2026)