swapnildahiphale/opensre/vcs-github
Claude Code and agent skill by swapnildahiphale/opensre
- community
Checking that the SKILL.md file is still in the repository.
GitHub repos, pull requests, Actions workflows, commits, and issues via gh CLI. Safe read-before-write workflow. Use when investigating PR/CI failures, deployment regressions, or repository state on GitHub.
Install
npx vskill@latest install swapnildahiphale/opensre/vcs-githubSKILL.md
The same SKILL.md was published earlier as swapnildahiphale/opensre/vcs-github.
Authentication
IMPORTANT: In proxy/production mode, credentials may be injected automatically. Do not assume GITHUB_TOKEN is visible in the shell — run the smoke test below before mutating commands.
In direct/local mode, OpenSRE uses environment-variable auth (no gh auth login required). Set in repo root .env (passed to the sre-agent container via docker-compose):
| Variable | Required | Description | |
|---|---|---|---|
GITHUB_TOKEN | Yes (or GH_TOKEN) | GitHub personal access token (classic or fine-grained). gh accepts either name; GITHUB_TOKEN is the OpenSRE convention. | |
GITHUB_REPOSITORY | No | Default owner/repo when commands omit -R / --repo (alias: GH_REPO) | |
GH_HOST | Enterprise only | GitHub Enterprise hostname (e.g. github.example.com). Use with GITHUB_ENTERPRISE_TOKEN or GH_ENTERPRISE_TOKEN. |
The default repository comes from GITHUB_REPOSITORY in the repo root .env, which is passed into the sre-agent container via docker-compose env_file. Omit -R owner/repo on commands when that default is set. Do not hardcode org or repo names in command examples.
See .claude/skills/vcs-github/.env.example for templates.
Verify before running commands (read-only smoke test — works in Docker and on host):
Expected: gh auth status reports logged in to github.com (or your GH_HOST) via token from environment; gh repo list returns at least one repository line.
On macOS host only, gh auth login stores credentials in the system keychain — that does not propagate into Docker. Prefer GITHUB_TOKEN in .env for container runs.
Dependency check: gh --version must succeed. The binary is pre-installed in the sre-agent Docker image; on the host install via brew install gh.
Skill: GitHub CLI (Portable)
Use this skill for GitHub operations from terminal-based agents.
Cross-Compatibility
This skill is repository-local and tool-agnostic. It works in Codex, Claude Code, Cursor, and other IDE agents via the gh CLI.
Token Scopes
Fine-grained PAT (recommended) or classic PAT scopes for the workflows below:
Read:
- Repository: Contents, Metadata, Pull requests, Actions (read)
- Optional: Issues (read)
Write (only when mutating):
- Pull requests (write)
- Issues (write)
- Contents (write) — if creating branches/commits via API
Name the token neutrally (e.g. opensre-github); do not commit real tokens.
Safe Workflow
OpenSRE / Docker: Credentials are injected via GITHUB_TOKEN / GH_TOKEN. Do not run gh auth login as a prerequisite in the container. Start with gh repo list --limit 1; if it returns repos, proceed.
- Confirm exact target host/owner/repo/PR/run before execution.
- Start with read-only commands (
gh repo view,gh pr list,gh run list) before any mutation. - For mutating commands (
gh pr create,gh pr merge,gh issue create), confirm the exact command and target in the response before running. - Do not ask the user for credentials when
gh repo listsucceeds — env auth is already configured. - After each write, immediately verify with a read command and report resulting IDs/state.
Read/Search Commands
Repository and branches:
Pull requests:
GitHub Actions (CI):
Commits and issues:
Code search (REST):
When GITHUB_REPOSITORY is set, omit --repo owner/repo / -R owner/repo on subcommands that accept it.
Write Commands
Pull request actions:
Issues:
Workflow dispatch:
Output and API Escape Hatch
Investigation Workflows
PR / CI failure
Recent regressions on main
References
- Full command appendix:
.claude/skills/vcs-github/references/commands.md
Troubleshooting
| Symptom | Meaning | Do this | |
|---|---|---|---|
HTTP 401: Bad credentials | Missing/invalid token | Confirm GITHUB_TOKEN in repo .env and sre-agent container env; token not expired | |
newosproc, fork: Resource temporarily unavailable | Process/thread budget exhausted | Stop parallel tool storms; use one gh api ... or one curl -H "Authorization: Bearer $GITHUB_TOKEN" call | |
gh auth status says not logged in but token is set | Token env not visible to subprocess | Export is automatic via docker-compose env_file; retry gh repo list --limit 1 | |
| Enterprise 404 on github.com | Wrong host | Set GH_HOST and enterprise token vars |
REST fallback (when gh cannot fork):
For GitHub Enterprise, replace api.github.com with https://${GH_HOST}/api/v3. One curl or one short script — no parallel tool storms.
Best Practices
- Keep
-R owner/repoexplicit in multi-tenant environments unlessGITHUB_REPOSITORYis confirmed. - Prefer
--json+--jqfor structured facts over parsing tables. - Report command output facts only; do not infer missing server state.
- For write failures, re-read current state before retrying.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsre-agent/.claude/skills/vcs-github/SKILL.md
Popularity
- Repository stars
- 108
- Repository forks
- 26
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/swapnildahiphale/opensre/vcs-github)