github-keychain-authlisted
Install: claude install-skill dills122/ai-central
# GitHub Keychain Auth
Use GitHub CLI's existing macOS Keychain integration. Treat credential availability as authentication only; the user's task still defines the authorized repository and operation.
## Sandbox Boundary
Run every credential-dependent `gh` or `git` command outside the sandbox with the runtime's approval or escalation mechanism. A credential acquired or used inside the sandbox can disappear or become invalid after a short time, making a successful check unreliable for later operations. Do not fetch the token in the sandbox and pass it outward; keep credential resolution and the authorized GitHub operation together outside the sandbox.
Ask for approval for the intended GitHub operation, using a suitably narrow reusable command prefix when supported. Explain the repository and read or write operation being authorized. Sandbox approval changes where the command runs; it does not expand the user's authorized scope.
## Safe Workflow
1. Request outside-sandbox execution for the intended credential-dependent command. Do not use an in-sandbox authentication check as proof that later GitHub operations will remain authenticated.
2. Do not inspect either token environment variable. Remove both only for the outside-sandbox GitHub command so stale inherited values do not take precedence over the account already configured in GitHub CLI:
```sh
env -u GH_TOKEN -u GITHUB_TOKEN gh auth status --hostname github.com
```
3. Verify only non-secret identity metad