-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Summary
GitHub skills currently use a custom Node script (gh_issue_api.mjs) for all GitHub API mutations. Exposing the gh CLI in the sandbox would give skills a more capable, idiomatic interface for GitHub operations — covering PRs, search, runs, and more beyond issue CRUD.
Current Behavior
- All GitHub API calls go through
skills/gh-issue/scripts/gh_issue_api.mjs, a thin wrapper over the REST API. - The sandbox (
node22image) does not haveghinstalled. - Skills are limited to issue create/update/comment/label operations exposed by the custom script.
Gap / Opportunity
ghCLI supports PRs, Actions runs, repo search, gists, and codespaces — operations the custom script does not expose.- Skills that need to read PR state, trigger workflow dispatches, or query cross-repo data currently have no clean path.
- Installing
ghin the sandbox image (or making it available at skill execution time) would unlock a much broader surface area with minimal skill-side code.
Prior Art
ghCLI supportsGH_TOKENenv for auth, compatible with short-lived installation tokens already used by the harness — no new auth model needed.- Harness already injects scoped credentials via
jr-rpc issue-credential;ghcan consume the same token viaGH_TOKEN.
Options
- Install
ghin the sandbox image — simplest path; available to all skills, no per-invocation overhead. Requires updating the base image. - Download
ghat skill boot — no image change needed, but adds cold-start latency and network dependency per invocation. - Extend
gh_issue_api.mjspiecemeal — no new tooling, but maintenance burden grows with each new operation and still won't matchghbreadth.
Recommended Direction
Install gh in the sandbox image and wire GH_TOKEN injection through jr-rpc issue-credential (same pattern as today). This keeps the auth model unchanged and gives all current and future skills access to the full gh surface area immediately.
Acceptance Criteria
-
ghCLI is available in the sandbox (which ghreturns a path). -
jr-rpc issue-credential github.issues.write(or equivalent) setsGH_TOKENsoghcommands succeed without manual token handling. - At least one existing skill operation can be rewritten or aliased using
ghand produces identical results. -
sandbox-runtime.mdis updated to documentghavailability and the auth wiring pattern.
Risks
ghversion pinning: if the image is rebuilt without pinning, aghupgrade could silently break skill scripts. Mitigation: pin version in image definition and document it.- Token scope: installation tokens may not cover all
ghsubcommands (e.g., gists). Mitigation: document known limitations; don't expand token scopes speculatively.
Sources
/vercel/sandbox/skills/gh-issue/references/sandbox-runtime.md/vercel/sandbox/skills/gh-issue/references/github-issue-api.md- https://cli.github.com/manual/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Fields
Give feedbackNo fields configured for issues without a type.