github-readonly-live
Use this skill for current live GitHub REST data from a repository allowed by
the sandbox policy.
When to use
- Inspect a currently allowed live GitHub repository.
- Read current issues, issue comments, pull requests, pull request files,
reviews, commits, branches, labels, milestones, README, or repository
contents.
- Check live state when the source ETL mirror may be stale or empty.
Do not use this skill for GitHub discussions or NVIDIA forums. Use
source-etl-query for those mirrored sources.
Access model
- The repository allowlist is
$GITHUB_READONLY_REPOS. The legacy
$GITHUB_READONLY_REPO setting remains the fallback.
- Pass
--repo owner/repository before the command when more than one
repository is allowed. The helper requires an explicit selection in that
case and rejects repositories outside the allowlist.
- Requests use the OpenShell GitHub provider placeholder from
GITHUB_TOKEN.
Treat it as a secret placeholder: do not print
it, modify it, or copy it into responses.
- Do not run
env, printenv, echo, or similar commands against
GITHUB_TOKEN. The helper loads the placeholder itself.
- Do not inspect
.env files, shell environments, proxy settings, or token
variables to troubleshoot GitHub. If the helper cannot authenticate or reach
GitHub, it will report the error itself.
- Only repository-scoped
GET requests to api.github.com are allowed.
- Do not use
gh, git, github.com, raw.githubusercontent.com,
codeload.github.com, GraphQL, or GitHub search endpoints.
- If a request returns an OpenShell policy 403, report the policy scope instead
of trying another GitHub host, another binary, or a write-like method.
- If explicitly asked to validate that a write is blocked, do not inspect the
token variable. Use direct shell expansion in the Authorization header and
report only the policy error.
Write-block validation pattern:
auth="${GITHUB_TOKEN:-}"
repo="NVIDIA/OpenShell"
curl -sS -o /tmp/github-write-denied.json -w 'HTTP Status: %{http_code}\n' \
-X POST \
-H "Authorization: Bearer ${auth}" \
-H 'Accept: application/vnd.github+json' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
"https://api.github.com/repos/${repo}/issues/<number>/comments" \
-d '{"body":"policy-validation-test"}'
cat /tmp/github-write-denied.json
Set repo to the allowed repository that the user selected.
Procedure
Always run the bundled helper script via the terminal tool. It constructs only
repository-scoped GitHub REST GET requests. Prefer the generic get command
and map the user's question to a repository-relative REST route plus query
parameters. Select the target with --repo when the allowlist contains more
than one repository.
Do not invoke github-readonly-live as a shell command; it is the skill name,
not an executable. Do not call a tool named github-readonly-live; use
skill_view only if you need to read this instruction file.
Do not search for GitHub binaries with which, command -v, ls /usr/bin,
or similar commands. The canonical helper path below is the only supported live
GitHub access path.
On transient helper failures such as DNS resolution errors, connection resets,
or timeouts, retry the exact same helper command once. If the retry fails, give
the user the helper error and stop. Do not diagnose by inspecting token env vars,
.env files, proxy env vars, DNS tools, curl, gh, git, custom Python
requests, or alternate GitHub hosts.
Replace NVIDIA/OpenShell in the repository-scoped examples below with the
allowed repository that matches the user's request.
/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py rate-limit
/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get . --fields full_name,description,open_issues_count
/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get issues --param state=open --limit 20 --exclude-pulls --fields number,title,state,html_url
/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get issues/<number>/comments --paginate --fields user.login,created_at,body
/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get pulls --param state=open --paginate --count
/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get pulls/<number>/files --paginate --fields filename,status,changes
/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get contents/<path>
Generic route rules:
- Use repository-relative REST routes only:
., issues, issues/<number>,
issues/<number>/comments, pulls, pulls/<number>,
pulls/<number>/files, commits, branches, contents/<path>, etc.
- Put query strings in
--param KEY=VALUE, not in the route.
- Use
--paginate --count for exact counts. Use --limit only when the user
asks for a sample or "latest N" items.
- Use
--fields to keep output small instead of piping to python -c, jq,
or custom scripts.
- Use
--exclude-pulls on the issues route when the user asks for issues
rather than PRs, because GitHub's issues endpoint includes pull requests.
Compatibility aliases such as issues, issue-counts, pulls,
pull-counts, and contents are available, but the generic get command is
the default pattern for new GitHub questions.
Pitfalls
- For "how many issues" questions, use generic count:
get issues --param state=all --paginate --count --exclude-pulls. Do not use
GitHub search endpoints; they are outside policy by design.
- For "how many PRs" or "how many pull requests" questions, use generic count:
get pulls --param state=open --paginate --count or the requested state. Do
not estimate from a single page.
- The live GitHub scope and the source ETL mirror scope can use different
repositories.
Do not merge their results without naming which source each fact came from.
- If the helper is rate-limited, report that GitHub auth was absent or
exhausted; use
source-etl-query only when the user's task can tolerate
mirrored data.
- The helper filters pull requests out of the
issues command. Use pulls or
pull-counts when the user specifically asks for PRs.
1---2name: github-readonly-live-23description: Read an allowed live GitHub repository through authenticated, policy-scoped GitHub REST GET requests.4---56# github-readonly-live78Use this skill for current live GitHub REST data from a repository allowed by9the sandbox policy.1011## When to use1213- Inspect a currently allowed live GitHub repository.14- Read current issues, issue comments, pull requests, pull request files,15 reviews, commits, branches, labels, milestones, README, or repository16 contents.17- Check live state when the source ETL mirror may be stale or empty.1819Do not use this skill for GitHub discussions or NVIDIA forums. Use20`source-etl-query` for those mirrored sources.2122## Access model2324- The repository allowlist is `$GITHUB_READONLY_REPOS`. The legacy25 `$GITHUB_READONLY_REPO` setting remains the fallback.26- Pass `--repo owner/repository` before the command when more than one27 repository is allowed. The helper requires an explicit selection in that28 case and rejects repositories outside the allowlist.29- Requests use the OpenShell GitHub provider placeholder from `GITHUB_TOKEN`.30 Treat it as a secret placeholder: do not print31 it, modify it, or copy it into responses.32- Do not run `env`, `printenv`, `echo`, or similar commands against33 `GITHUB_TOKEN`. The helper loads the placeholder itself.34- Do not inspect `.env` files, shell environments, proxy settings, or token35 variables to troubleshoot GitHub. If the helper cannot authenticate or reach36 GitHub, it will report the error itself.37- Only repository-scoped `GET` requests to `api.github.com` are allowed.38- Do not use `gh`, `git`, `github.com`, `raw.githubusercontent.com`,39 `codeload.github.com`, GraphQL, or GitHub search endpoints.40- If a request returns an OpenShell policy 403, report the policy scope instead41 of trying another GitHub host, another binary, or a write-like method.42- If explicitly asked to validate that a write is blocked, do not inspect the43 token variable. Use direct shell expansion in the Authorization header and44 report only the policy error.4546Write-block validation pattern:4748```bash49auth="${GITHUB_TOKEN:-}"50repo="NVIDIA/OpenShell"51curl -sS -o /tmp/github-write-denied.json -w 'HTTP Status: %{http_code}\n' \52 -X POST \53 -H "Authorization: Bearer ${auth}" \54 -H 'Accept: application/vnd.github+json' \55 -H 'X-GitHub-Api-Version: 2022-11-28' \56 "https://api.github.com/repos/${repo}/issues/<number>/comments" \57 -d '{"body":"policy-validation-test"}'58cat /tmp/github-write-denied.json59```6061Set `repo` to the allowed repository that the user selected.6263## Procedure6465Always run the bundled helper script via the terminal tool. It constructs only66repository-scoped GitHub REST GET requests. Prefer the generic `get` command67and map the user's question to a repository-relative REST route plus query68parameters. Select the target with `--repo` when the allowlist contains more69than one repository.70Do not invoke `github-readonly-live` as a shell command; it is the skill name,71not an executable. Do not call a tool named `github-readonly-live`; use72`skill_view` only if you need to read this instruction file.73Do not search for GitHub binaries with `which`, `command -v`, `ls /usr/bin`,74or similar commands. The canonical helper path below is the only supported live75GitHub access path.7677On transient helper failures such as DNS resolution errors, connection resets,78or timeouts, retry the exact same helper command once. If the retry fails, give79the user the helper error and stop. Do not diagnose by inspecting token env vars,80`.env` files, proxy env vars, DNS tools, `curl`, `gh`, `git`, custom Python81requests, or alternate GitHub hosts.8283Replace `NVIDIA/OpenShell` in the repository-scoped examples below with the84allowed repository that matches the user's request.8586```bash87/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py rate-limit88/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get . --fields full_name,description,open_issues_count89/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get issues --param state=open --limit 20 --exclude-pulls --fields number,title,state,html_url90/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get issues/<number>/comments --paginate --fields user.login,created_at,body91/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get pulls --param state=open --paginate --count92/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get pulls/<number>/files --paginate --fields filename,status,changes93/usr/bin/python3 /sandbox/.hermes-data/skills/github-readonly-live/scripts/github_readonly.py --repo NVIDIA/OpenShell get contents/<path>94```9596Generic route rules:9798- Use repository-relative REST routes only: `.`, `issues`, `issues/<number>`,99 `issues/<number>/comments`, `pulls`, `pulls/<number>`,100 `pulls/<number>/files`, `commits`, `branches`, `contents/<path>`, etc.101- Put query strings in `--param KEY=VALUE`, not in the route.102- Use `--paginate --count` for exact counts. Use `--limit` only when the user103 asks for a sample or "latest N" items.104- Use `--fields` to keep output small instead of piping to `python -c`, `jq`,105 or custom scripts.106- Use `--exclude-pulls` on the `issues` route when the user asks for issues107 rather than PRs, because GitHub's issues endpoint includes pull requests.108109Compatibility aliases such as `issues`, `issue-counts`, `pulls`,110`pull-counts`, and `contents` are available, but the generic `get` command is111the default pattern for new GitHub questions.112113## Pitfalls114115- For "how many issues" questions, use generic count:116 `get issues --param state=all --paginate --count --exclude-pulls`. Do not use117 GitHub search endpoints; they are outside policy by design.118- For "how many PRs" or "how many pull requests" questions, use generic count:119 `get pulls --param state=open --paginate --count` or the requested state. Do120 not estimate from a single page.121- The live GitHub scope and the source ETL mirror scope can use different122 repositories.123 Do not merge their results without naming which source each fact came from.124- If the helper is rate-limited, report that GitHub auth was absent or125 exhausted; use `source-etl-query` only when the user's task can tolerate126 mirrored data.127- The helper filters pull requests out of the `issues` command. Use `pulls` or128 `pull-counts` when the user specifically asks for PRs.