@acedatacloud/skills 2026.728.4 → 2026.728.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/skills",
3
- "version": "2026.728.4",
3
+ "version": "2026.728.6",
4
4
  "description": "Agent Skills for AceDataCloud AI services — music, image, video generation, LLM chat, web search. Compatible with Claude Code, GitHub Copilot, Gemini CLI, OpenAI Codex, and 30+ AI coding agents.",
5
5
  "keywords": [
6
6
  "agent-skills",
@@ -1,36 +1,79 @@
1
1
  ---
2
2
  name: github
3
- description: GitHub issues, pull requests, repos, code search, and Actions via the gh CLI. Use when the user mentions GitHub, an issue/PR number, a repo, a commit, or code review.
3
+ description: GitHub issues, pull requests, repos, code search, releases, gists, stars, watching, forks, and Actions via the gh CLI. Use when the user mentions GitHub, an issue/PR number, a repo, a commit, a release, a gist, or code review.
4
4
  when_to_use: |
5
5
  Trigger when the user wants to read or write something on GitHub —
6
- list / view / create / comment on issues or PRs, search code, view
7
- a repo, view CI runs, etc.
6
+ list / view / create / comment on issues or PRs, star / watch / fork a
7
+ repo, manage releases / gists / labels / milestones, search code, view
8
+ CI runs, etc. Works with either connection method (OAuth authorization
9
+ or a self-supplied Personal Access Token); the commands are the same.
8
10
  connections: [github]
9
11
  allowed_tools: [Bash]
10
12
  license: Apache-2.0
11
13
  metadata:
12
14
  author: acedatacloud
13
- version: "1.0"
15
+ version: "1.2"
14
16
  ---
15
17
 
16
- Use the `gh` CLI for everything. The user's OAuth access token is exported
17
- as `$GH_TOKEN`; `gh` reads it automatically — `gh auth status` will say
18
- "not logged in" because gh keeps no config file in the sandbox, but every
19
- authenticated subcommand works regardless.
18
+ Use the `gh` CLI for everything. The user's token is exported as an env var
19
+ and `gh` reads it automatically — `gh auth status` will say "not logged in"
20
+ because gh keeps no config file in the sandbox, but every authenticated
21
+ subcommand works regardless. **The commands are identical in both modes**;
22
+ only the permission envelope differs, so check which one you're in before
23
+ diagnosing a `403`:
24
+
25
+ ```sh
26
+ if [ -n "$GITHUB_TOKEN" ]; then echo "mode: pat (user-created token)"; \
27
+ elif [ -n "$GH_TOKEN" ]; then echo "mode: oauth"; \
28
+ else echo "no GitHub connection — connect at https://auth.acedata.cloud/user/connections"; fi
29
+ ```
30
+
31
+ Both are **secret — full account access within their scope. Never echo or
32
+ print them.**
20
33
 
21
34
  `gh --help` and `gh <subcommand> --help` are always current. When unsure,
22
35
  read the help first instead of guessing flags.
23
36
 
37
+ ## Granted scopes — what you can and cannot do
38
+
39
+ **In PAT mode (`$GITHUB_TOKEN`)** the scopes are whatever the user picked
40
+ when they created the token, and a fine-grained token may be limited to a
41
+ few repositories. You cannot introspect them reliably — treat every `403` /
42
+ `404` as a possible permission limit and say so rather than retrying.
43
+
44
+ **In OAuth mode (`$GH_TOKEN`)** the connection requests exactly five scopes:
45
+ `read:user`, `user:email`, `repo`, `read:org`, `gist`. Everything in the
46
+ Recipes below fits inside them. These do NOT fit, and will fail no matter
47
+ how you phrase the call:
48
+
49
+ | Want to… | Needs scope | Verdict |
50
+ |---|---|---|
51
+ | Follow / unfollow a user | `user:follow` (or full `user`) | ✗ we only have `read:user` |
52
+ | Block / unblock a user | `user` | ✗ |
53
+ | Read / write Projects V2 | `read:project` / `project` | ✗ `INSUFFICIENT_SCOPES` |
54
+ | Manage SSH / GPG keys | `admin:public_key` / `admin:gpg_key` | ✗ |
55
+ | Manage org membership, teams | `write:org` / `admin:org` | ✗ read-only via `read:org` |
56
+ | Manage repo webhooks | `admin:repo_hook` | ✗ |
57
+
58
+ Users pick scopes at install time and every box is optional, so even the
59
+ five above may be partially granted. A `404` on something you know exists,
60
+ or a `403`, usually means a missing scope — not a wrong URL. Say so plainly
61
+ and point the user at `auth.acedata.cloud/user/connections` to reconnect
62
+ with the box ticked (OAuth) or to paste a token with wider permissions (PAT).
63
+
24
64
  ## Two ways to call gh — prefer subcommands
25
65
 
26
66
  ### Style A: First-class subcommands — START HERE
27
67
 
28
68
  `gh issue`, `gh pr`, `gh repo`, `gh search`, `gh release`, `gh workflow`,
29
- `gh run`, `gh status`, `gh project`, `gh label`, `gh secret`,
30
- `gh variable`, `gh gist`. Use these whenever they cover the task; they
69
+ `gh run`, `gh status`, `gh label`, `gh secret`, `gh variable`, `gh gist`,
70
+ `gh org`, `gh ruleset`. Use these whenever they cover the task; they
31
71
  output formatted text by default and structured JSON via
32
72
  `--json <fields> [--jq <expr>]`.
33
73
 
74
+ There is no `gh star` / `gh watch` subcommand — those go through
75
+ `gh api` (see below). `gh repo fork` does exist.
76
+
34
77
  ### Style B: Raw REST / GraphQL via `gh api`
35
78
 
36
79
  `gh api <endpoint>` for REST, `gh api graphql -f query='…'` for GraphQL.
@@ -77,13 +120,28 @@ gh issue view 123 --repo OWNER/REPO --json title,body,comments \
77
120
  gh issue create --repo OWNER/REPO --title "Bug: foo" --body "Repro steps…" --label bug
78
121
  gh issue comment 123 --repo OWNER/REPO --body "LGTM"
79
122
  gh issue close 123 --repo OWNER/REPO --comment "Fixed in #456"
123
+ gh issue reopen 123 --repo OWNER/REPO
124
+ ```
125
+
126
+ ### Edit an issue — labels, assignees, milestone, title, body
127
+
128
+ ```sh
129
+ gh issue edit 123 --repo OWNER/REPO --add-label bug --add-assignee @me
130
+ gh issue edit 123 --repo OWNER/REPO --remove-label wontfix --milestone "v2.0"
131
+ gh issue edit 123 --repo OWNER/REPO --title "New title" --body "Rewritten body"
132
+ gh issue lock 123 --repo OWNER/REPO --reason spam
133
+ gh issue transfer 123 OWNER/OTHER_REPO --repo OWNER/REPO
80
134
  ```
81
135
 
136
+ `--add-project` / `--remove-project` need the `project` scope we do not
137
+ have; they will fail. Everything else on this list works.
138
+
82
139
  ### List PRs assigned to / authored by me
83
140
 
84
141
  ```sh
85
142
  gh search prs --assignee=@me --state=open --json number,title,repository,updatedAt
86
143
  gh search prs --author=@me --state=open
144
+ gh search prs --review-requested=@me --state=open
87
145
  ```
88
146
 
89
147
  ### View a PR with diff and CI checks
@@ -94,6 +152,16 @@ gh pr diff 456 --repo OWNER/REPO
94
152
  gh pr checks 456 --repo OWNER/REPO
95
153
  ```
96
154
 
155
+ ### Create / edit a PR
156
+
157
+ ```sh
158
+ gh pr create --repo OWNER/REPO --base main --head feature-branch \
159
+ --title "Add foo" --body "Closes #123" --draft
160
+ gh pr edit 456 --repo OWNER/REPO --add-reviewer octocat --add-label review-needed
161
+ gh pr edit 456 --repo OWNER/REPO --base develop --title "Retitled"
162
+ gh pr ready 456 --repo OWNER/REPO # draft → ready for review
163
+ ```
164
+
97
165
  ### Comment / review / merge a PR
98
166
 
99
167
  ```sh
@@ -101,27 +169,138 @@ gh pr comment 456 --repo OWNER/REPO --body "Please rebase on main."
101
169
  gh pr review 456 --repo OWNER/REPO --approve --body "LGTM"
102
170
  gh pr review 456 --repo OWNER/REPO --request-changes --body "See nits"
103
171
  gh pr merge 456 --repo OWNER/REPO --squash --delete-branch
172
+ gh pr update-branch 456 --repo OWNER/REPO # merge base into the PR branch
173
+ gh pr close 456 --repo OWNER/REPO
104
174
  ```
105
175
 
106
- ### Search code across GitHub
176
+ `merge`, `close`, and `review --approve` are irreversible or publicly
177
+ visible. Confirm with the user before running them unless they clearly
178
+ asked for that exact action.
179
+
180
+ ### Star / unstar a repo
181
+
182
+ No `gh` subcommand exists — use the REST route. A `204` means success,
183
+ and `GET` returns `204` when starred / `404` when not.
107
184
 
108
185
  ```sh
109
- gh search code 'someFunction language:typescript' --limit 20 \
110
- --json repository,path,url --jq '.[] | "\(.repository.nameWithOwner) \(.path)"'
186
+ gh api -X PUT user/starred/OWNER/REPO # star
187
+ gh api -X DELETE user/starred/OWNER/REPO # unstar
188
+ gh api user/starred/OWNER/REPO # 204 = starred, 404 = not
189
+ gh api user/starred --paginate --jq '.[].full_name' # list my stars
111
190
  ```
112
191
 
113
- ### Read a file from a repo (raw bytes, no base64 dance)
192
+ ### Watch / unwatch a repo (notification subscription)
114
193
 
115
194
  ```sh
116
- gh api "repos/OWNER/REPO/contents/path/to/file.ts" \
117
- -H 'Accept: application/vnd.github.raw'
195
+ gh api -X PUT repos/OWNER/REPO/subscription -F subscribed=true # watch
196
+ gh api -X PUT repos/OWNER/REPO/subscription -F ignored=true # ignore
197
+ gh api -X DELETE repos/OWNER/REPO/subscription # unwatch
198
+ gh api user/subscriptions --paginate --jq '.[].full_name'
118
199
  ```
119
200
 
120
- ### List recent commits on the default branch
201
+ Watching is distinct from starring: starring is a public bookmark,
202
+ watching only changes what lands in the user's notifications.
203
+
204
+ ### Fork a repo
205
+
206
+ ```sh
207
+ gh repo fork OWNER/REPO --clone=false
208
+ gh repo fork OWNER/REPO --org MY_ORG --default-branch-only
209
+ gh api repos/OWNER/REPO/forks --jq '.[].full_name'
210
+ ```
211
+
212
+ Starring and forking are visible on the user's public profile. Confirm
213
+ before doing either on someone else's repo unless explicitly asked.
214
+
215
+ ### Notifications
121
216
 
122
217
  ```sh
218
+ gh api notifications --jq '.[] | "\(.repository.full_name) \(.subject.type) \(.subject.title)"'
219
+ gh api -X PATCH notifications # mark all read
220
+ gh api -X PATCH notifications/threads/<THREAD_ID> # mark one read
221
+ ```
222
+
223
+ ### Create / manage a repo
224
+
225
+ ```sh
226
+ gh repo create OWNER/NEW_REPO --private --description "…"
227
+ gh repo view OWNER/REPO --json description,url,stargazerCount,defaultBranchRef
228
+ gh repo edit OWNER/REPO --description "New desc" --add-topic ai --visibility private
229
+ gh repo list OWNER --limit 30 --json name,visibility,updatedAt
230
+ gh repo archive OWNER/REPO --yes
231
+ ```
232
+
233
+ `gh repo delete` needs `delete_repo`, which is NOT granted — it will fail.
234
+ Never reach for it.
235
+
236
+ ### Releases
237
+
238
+ ```sh
239
+ gh release list --repo OWNER/REPO --limit 10
240
+ gh release view v1.2.0 --repo OWNER/REPO
241
+ gh release create v1.2.0 --repo OWNER/REPO --title "v1.2.0" --notes "Changelog…"
242
+ gh release create v1.2.0 --repo OWNER/REPO --generate-notes ./dist/app.zip
243
+ gh release upload v1.2.0 ./extra-asset.tar.gz --repo OWNER/REPO
244
+ gh release download v1.2.0 --repo OWNER/REPO --pattern '*.zip'
245
+ ```
246
+
247
+ ### Gists
248
+
249
+ ```sh
250
+ gh gist list --limit 20
251
+ gh gist create ./script.py --public --desc "Handy script"
252
+ gh gist view <GIST_ID>
253
+ gh gist edit <GIST_ID>
254
+ gh gist delete <GIST_ID>
255
+ ```
256
+
257
+ ### Labels and milestones
258
+
259
+ ```sh
260
+ gh label list --repo OWNER/REPO
261
+ gh label create urgent --repo OWNER/REPO --color FF0000 --description "Drop everything"
262
+ gh label edit bug --repo OWNER/REPO --color 00FF00
263
+ gh label clone SOURCE_OWNER/SOURCE_REPO --repo OWNER/REPO
264
+
265
+ # Milestones have no gh subcommand — use the API
266
+ gh api repos/OWNER/REPO/milestones --jq '.[] | "\(.number) \(.title) \(.open_issues) open"'
267
+ gh api -X POST repos/OWNER/REPO/milestones -f title="v2.0" -f due_on="2026-12-31T23:59:59Z"
268
+ ```
269
+
270
+ ### Branches, commits, and comparing
271
+
272
+ ```sh
273
+ gh api repos/OWNER/REPO/branches --jq '.[].name'
123
274
  gh api "repos/OWNER/REPO/commits?per_page=20" \
124
275
  --jq '.[] | "\(.sha[0:7]) \(.commit.author.date) \(.commit.message | split("\n")[0])"'
276
+ gh api repos/OWNER/REPO/compare/main...feature-branch \
277
+ --jq '{ahead: .ahead_by, behind: .behind_by, files: [.files[].filename]}'
278
+ gh api -X DELETE repos/OWNER/REPO/git/refs/heads/stale-branch
279
+ ```
280
+
281
+ ### Read / write a file in a repo
282
+
283
+ ```sh
284
+ # Read raw bytes, no base64 dance
285
+ gh api "repos/OWNER/REPO/contents/path/to/file.ts" \
286
+ -H 'Accept: application/vnd.github.raw'
287
+
288
+ # Write requires base64 content + the current blob sha when replacing
289
+ SHA=$(gh api repos/OWNER/REPO/contents/README.md --jq .sha)
290
+ gh api -X PUT repos/OWNER/REPO/contents/README.md \
291
+ -f message="docs: update readme" \
292
+ -f content="$(base64 < ./README.md | tr -d '\n')" \
293
+ -f sha="$SHA"
294
+ ```
295
+
296
+ ### Search across GitHub
297
+
298
+ ```sh
299
+ gh search code 'someFunction language:typescript' --limit 20 \
300
+ --json repository,path,url --jq '.[] | "\(.repository.nameWithOwner) \(.path)"'
301
+ gh search repos 'topic:mcp stars:>100' --limit 20 --json fullName,stargazersCount
302
+ gh search commits 'fix memory leak' --repo OWNER/REPO --limit 10
303
+ gh search issues 'is:open label:bug' --owner OWNER --limit 20
125
304
  ```
126
305
 
127
306
  ### Trigger / inspect Actions workflows
@@ -131,16 +310,34 @@ gh workflow list --repo OWNER/REPO
131
310
  gh workflow run ci.yaml --repo OWNER/REPO --ref main -f key=value
132
311
  gh run list --repo OWNER/REPO --workflow ci.yaml --limit 5
133
312
  gh run view <RUN_ID> --repo OWNER/REPO --log-failed
313
+ gh run rerun <RUN_ID> --repo OWNER/REPO --failed
314
+ gh run cancel <RUN_ID> --repo OWNER/REPO
315
+ gh run watch <RUN_ID> --repo OWNER/REPO
134
316
  ```
135
317
 
136
- ### View a repo's metadata
318
+ ### Actions secrets and variables
137
319
 
138
320
  ```sh
139
- gh repo view OWNER/REPO
140
- gh repo view OWNER/REPO --json description,url,stargazerCount,defaultBranchRef
321
+ gh secret list --repo OWNER/REPO
322
+ gh secret set MY_TOKEN --repo OWNER/REPO --body "value"
323
+ gh variable list --repo OWNER/REPO
324
+ gh variable set MY_VAR --repo OWNER/REPO --body "value"
325
+ ```
326
+
327
+ Secret values are write-only — you can set and list names, never read a
328
+ value back. Never echo a secret the user gives you into a comment, issue,
329
+ or commit.
330
+
331
+ ### Organizations (read-only under `read:org`)
332
+
333
+ ```sh
334
+ gh org list
335
+ gh api user/orgs --jq '.[].login'
336
+ gh api orgs/ORG/members --jq '.[].login'
337
+ gh api orgs/ORG/repos --paginate --jq '.[].full_name'
141
338
  ```
142
339
 
143
- ### GraphQL for things REST can't do (e.g. project board items)
340
+ ### GraphQL for things REST can't do
144
341
 
145
342
  ```sh
146
343
  gh api graphql -f query='
@@ -156,6 +353,9 @@ gh api graphql -f query='
156
353
  }' -f owner=OWNER -f repo=REPO -F num=123
157
354
  ```
158
355
 
356
+ Projects V2 lives only in GraphQL and needs `read:project` — not granted,
357
+ so those queries return `INSUFFICIENT_SCOPES`. Don't build recipes on it.
358
+
159
359
  ## Notes
160
360
 
161
361
  - For private repos the user MUST have granted `repo` scope when they
@@ -171,3 +371,10 @@ gh api graphql -f query='
171
371
  - `gh api --paginate` only works on endpoints that emit a `Link` header;
172
372
  for cursor-paginated endpoints you have to follow `pagination.next`
173
373
  yourself.
374
+ - Write endpoints that take no body (star, follow, watch-delete) return
375
+ `204 No Content` on success — an empty response is the success case,
376
+ not a failure.
377
+ - This connection can run unattended in a scheduled task. Public actions
378
+ (star, fork, issue/PR comments, reviews, merges) leave a permanent,
379
+ publicly attributable trace on the user's account. In an unattended run,
380
+ stick to exactly what the task authorized.