Skip to content

Commit 69e5f49

Browse files
Copilotpelikhan
andauthored
feat: add --allow-hidden-dirs and --force flags; import gh-skill in smoke-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>
1 parent 14d6793 commit 69e5f49

3 files changed

Lines changed: 43 additions & 138 deletions

File tree

.github/workflows/shared/gh-skill.md

Lines changed: 3 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -102,122 +102,14 @@ pre-agent-steps:
102102
skill_name="${skill_part%%@*}"
103103
pin_ref="${skill_part#*@}"
104104
echo "Installing skill: $repo $skill_name (pinned to $pin_ref)"
105-
gh skill install "$repo" "$skill_name" --agent "$agent" --pin "$pin_ref" $upstream_flag
105+
gh skill install "$repo" "$skill_name" --agent "$agent" --pin "$pin_ref" --allow-hidden-dirs --force $upstream_flag
106106
else
107107
echo "Installing skill: $repo $skill_part"
108-
gh skill install "$repo" "$skill_part" --agent "$agent" $upstream_flag
108+
gh skill install "$repo" "$skill_part" --agent "$agent" --allow-hidden-dirs --force $upstream_flag
109109
fi
110110
else
111111
echo "Installing all skills from: $repo"
112-
gh skill install "$repo" --agent "$agent" $upstream_flag
112+
gh skill install "$repo" --agent "$agent" --allow-hidden-dirs --force $upstream_flag
113113
fi
114114
done < <(echo "$skills_json" | jq -r '.[]')
115115
---
116-
117-
<!--
118-
## Agent Skills
119-
120-
This shared workflow installs agent skills before the AI agent runs, using the
121-
[`gh skill install`](https://cli.github.com/manual/gh_skill_install) command
122-
(available in GitHub CLI v2.90.0+).
123-
124-
### How it works
125-
126-
Each skill in the `skills:` list is installed into the repository's
127-
`.github/skills/` directory via `gh skill install`, making the skills available
128-
to the AI agent during its session.
129-
130-
### Usage
131-
132-
```yaml
133-
engine: copilot
134-
imports:
135-
- uses: shared/gh-skill.md
136-
with:
137-
skills:
138-
- github/awesome-copilot/documentation-writer
139-
- github/awesome-copilot/code-review@v1.2.0
140-
```
141-
142-
For other engines, set `engine:` in the `with:` block to match your workflow
143-
engine so skills are installed for the correct agent host:
144-
145-
```yaml
146-
engine: claude
147-
imports:
148-
- uses: shared/gh-skill.md
149-
with:
150-
engine: claude
151-
skills:
152-
- github/awesome-copilot/documentation-writer
153-
```
154-
155-
To opt out of the upstream update:
156-
157-
```yaml
158-
imports:
159-
- uses: shared/gh-skill.md
160-
with:
161-
upstream: false
162-
skills:
163-
- github/awesome-copilot/documentation-writer
164-
```
165-
166-
### Inputs
167-
168-
| Input | Required | Description |
169-
|-------|----------|-------------|
170-
| `skills` | ✅ | List of skills to install (see formats below) |
171-
| `engine` | No | gh-aw engine name — determines the `--agent` target (default: `copilot`) |
172-
| `github-token` | No | GitHub token for downloading skills (default: built-in `GITHUB_TOKEN`) |
173-
| `upstream` | No | Pass `false` to skip `--upstream` and use the cached version (default: `true`) |
174-
175-
### Skill format
176-
177-
Each entry in `skills:` is one of:
178-
179-
| Format | Example | Effect |
180-
|--------|---------|--------|
181-
| `owner/repo` | `github/awesome-copilot` | Installs all skills from the repo |
182-
| `owner/repo/skill-name` | `github/awesome-copilot/documentation-writer` | Installs a specific skill (latest, with `--upstream`) |
183-
| `owner/repo/skill-name@ref` | `github/awesome-copilot/code-review@v1.2.0` | Installs with `--pin ref` |
184-
185-
The `@ref` part is extracted from the skill path and passed as `--pin ref` to
186-
`gh skill install`. Any git ref is accepted (tag, branch, SHA).
187-
188-
### Engine → agent mapping
189-
190-
| `engine` input | `gh skill --agent` value |
191-
|---------------|--------------------------|
192-
| `copilot` (default) | `github-copilot` |
193-
| `claude` | `claude-code` |
194-
| `codex` | `codex` |
195-
| `gemini` | `gemini-cli` |
196-
| `opencode` | `opencode` |
197-
198-
### Authentication
199-
200-
Uses the token provided via the `token` input, falling back to the built-in
201-
`GITHUB_TOKEN`. For private skill repositories, pass a token with read access:
202-
203-
```yaml
204-
imports:
205-
- uses: shared/gh-skill.md
206-
with:
207-
github-token: ${{ secrets.MY_SKILLS_TOKEN }}
208-
skills:
209-
- my-org/private-skills/my-skill
210-
```
211-
212-
### Network access
213-
214-
`gh skill install` downloads skill files from GitHub. No additional network
215-
configuration is needed on standard GitHub-hosted runners. If your workflow
216-
uses a strict network firewall, add `github.com` to the allowed domains:
217-
218-
```yaml
219-
network:
220-
allowed:
221-
- github.com
222-
```
223-
-->

0 commit comments

Comments
 (0)