devops-github
Skill8 starsChanged 35 days agoMITView on GitHub
Read and create GitHub PRs and issues via the gh CLI for repos configured in GITHUB_ORG/GITHUB_REPOS. Use for one-off GitHub Boards/Repos operations outside the code pipeline: viewing PRs or issues, commenting, changing state, linking commits. Trigger this when someone says: check my PRs, list open issues, create a GitHub issue, comment on PR #N, close this issue, link this commit to an issue, connect to github, smoke test the gh cli. Do NOT use for Azure DevOps boards/work items -- that's skills/devops-azure. Do NOT use for a full code review or implementation pipeline -- use /review-pr or /implement instead.
- Commits and pushes
In this repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- backlogSkill
- conventionsSkill
- debugSkill
- devops-azureSkill
- devopsSkill
- hotfixSkill
- implementSkill
- interview-meSkill
- lint-agentsSkill
- memory-auditSkill
- memory-querySkill
- obsidian-briefSkill
- obsidian-captureSkill
- obsidian-dailySkill
- obsidian-recapSkill
- obsidian-searchSkill
- obsidianSkill
- onboardSkill
- pack-reviewSkill
- planSkill
- refactorSkill
- repo-mapSkill
- review-prSkill
- scaffoldSkill
- setup-projectSkill
- smellSkill
- spec-intakeSkill
- system-checkSkill
- whatSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 5 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Read and write GitHub PRs and issues by shelling out to the gh CLI — no MCP server required.
- Very specific: line 14
ghCLI installed?: Run gh --version. If missing, stop and direct the user to install it (https://cli.github.com). - Very specific: line 15
Authenticated?: Run gh auth status. If not logged in, walk the user through gh auth login interactively — do not attempt to script …
- Very specific: line 16
Env vars set?: Check GITHUB_ORG and GITHUB_REPOS (comma-delimited list, e.g.
- Very specific: line 24
After confirming a value with the user (new session-only value, or a change to an existing one), ask whether to persist it.
- Very specific: line 25
Never hand-edit ~/.claude/settings.json directly or write shell-profile export lines (.zshrc, .bash_profile, PowerShell $PROFILE) to …
- Very specific: line 34
If no repo is named and only one is configured,: use it — but state which repo out loud before running anything (e.g.
- Very specific: line 35
If no repo is named and multiple are configured,: ask the user to disambiguate before running any gh command.
- Distinctive: line 40
Ask or infer whether the user wants to read or write:
- Very specific: line 43
Write: create a PR/issue, comment, change state (close/reopen/merge), link a commit to an issue — always preview first (see step 5).
- Distinctive: line 64
Ask for explicit confirmation before running it.
- Distinctive: line 65
Only after confirmation, execute it.
- Very specific: line 81
GITHUB_REPOSunset: Treat as first-run. Ask the user which org/repo(s) to use for this session rather than guessing or defaulting to the … - Distinctive: line 83
Ambiguous repo target: If more than one repo is configured and the request doesn't name one, always ask — never guess which repo a bare …
- Very specific: line 84
Configured repo vs. local git remote mismatch: If GITHUB_REPOS (or a user-named repo) doesn't match the git remote of the current working …
- Distinctive: line 85
Write operations: Never skip the preview-and-confirm step in step 5, even for a one-line comment.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub (gh CLI)
Read and write GitHub PRs and issues by shelling out to the gh CLI — no MCP server required. Handles first-time setup, strict repo targeting, and safe write operations for repos configured via environment variables.
1. Verify setup
Check, in order:
ghCLI installed? Rungh --version. If missing, stop and direct the user to install it (https://cli.github.com).- Authenticated? Run
gh auth status. If not logged in, walk the user throughgh auth logininteractively — do not attempt to script credentials or store a PAT in plaintext. Letghhandle the browser/token flow natively. - Env vars set? Check
GITHUB_ORGandGITHUB_REPOS(comma-delimited list, e.g.GITHUB_REPOS=repo-a,repo-b). If unset, ask the user for the org and repo(s) they want to work with — do not hardcode any org/repo name into this file.
Report each check's result clearly before proceeding.
1a. Persisting or changing GITHUB_ORG/GITHUB_REPOS
These values change more often than a one-time install (switching projects, adding a repo), so persistence is handled by a standalone script rather than the installer: scripts/set-env.sh writes into ~/.claude/settings.json's env object (the same file the Obsidian integration uses), which works identically across macOS, Linux, and Windows — unlike a shell profile, which differs by shell and OS.
- After confirming a value with the user (new session-only value, or a change to an existing one), ask whether to persist it. If yes:
bash scripts/set-env.sh GITHUB_ORG=<org> GITHUB_REPOS=<repo-a,repo-b>. - Never hand-edit
~/.claude/settings.jsondirectly or write shell-profile export lines (.zshrc,.bash_profile, PowerShell$PROFILE) to persist these — always go throughscripts/set-env.shso the write is consistent and safe across platforms. - A session-only value (user declines persistence) just needs
export GITHUB_ORG=.../$env:GITHUB_ORG=...for the current shell, or simply proceeding without setting the env var at all and passing--repo <org>/<repo>explicitly for this run.
2. Resolve the target repo — never guess
Repo targeting must be unambiguous every time, even when it seems obvious:
- Resolve both sources. Parse
GITHUB_REPOSinto a list, and if the current working directory is inside a git repo, also read its remote (git remote get-url origin). - If the user names a repo explicitly, it must match one of the configured
GITHUB_REPOSentries (case-insensitive). A name that doesn't match any configured entry is an error — ask the user to correct it or add it toGITHUB_REPOS. Never silently substitute a different configured repo. - If no repo is named and only one is configured, use it — but state which repo out loud before running anything (e.g. "Using
org/repo-a, configured via GITHUB_REPOS") rather than proceeding silently. - If no repo is named and multiple are configured, ask the user to disambiguate before running any
ghcommand. - If the local git remote disagrees with the resolved target (configured repo or user-named repo points somewhere other than what's checked out locally), stop and flag the mismatch explicitly — ask the user to confirm which one they actually mean before proceeding.
3. Identify the operation
Ask or infer whether the user wants to read or write:
- Read: list/view PRs, issues, checks, comments — no confirmation needed, safe to run directly.
- Write: create a PR/issue, comment, change state (close/reopen/merge), link a commit to an issue — always preview first (see step 5).
4. Read operations
Common commands (run with --repo <org>/<repo> resolved from step 2):
gh pr list --repo <org>/<repo>
gh pr view <number> --repo <org>/<repo>
gh issue list --repo <org>/<repo>
gh issue view <number> --repo <org>/<repo>Summarize results for the user rather than dumping raw CLI output.
5. Write operations — always preview and confirm
For any create/comment/state-change/link operation:
- Build the exact
ghcommand and, for multi-line bodies, the exact text that will be posted. - Show the user the full command and payload verbatim, including the resolved
--repo <org>/<repo>target. - Ask for explicit confirmation before running it.
- Only after confirmation, execute it.
Examples:
gh issue create --repo <org>/<repo> --title "<title>" --body "<body>"
gh pr create --repo <org>/<repo> --title "<title>" --body "<body>" --base main
gh issue comment <number> --repo <org>/<repo> --body "<comment>"
gh issue close <number> --repo <org>/<repo>Linking a commit to an issue is done via a Fixes #<number> / Closes #<number> reference in a commit message or PR/issue body — preview the exact reference text before including it.
Gotchas
gh auth statusfails or shows no host: Walk throughgh auth logininteractively (choose GitHub.com, browser or token flow). Never ask the user to paste a PAT into chat — letghprompt for it directly in the terminal.GITHUB_REPOSunset: Treat as first-run. Ask the user which org/repo(s) to use for this session rather than guessing or defaulting to the current git remote silently — confirm it matches intent first.- Only one repo configured is not the same as "safe to assume": Still state the resolved repo out loud before running anything, and still cross-check it against the local git remote if one exists. A single configured repo can still be the wrong repo if the env var is stale or set globally across projects.
- Ambiguous repo target: If more than one repo is configured and the request doesn't name one, always ask — never guess which repo a bare issue/PR number belongs to.
- Configured repo vs. local git remote mismatch: If
GITHUB_REPOS(or a user-named repo) doesn't match the git remote of the current working directory, stop and ask — don't assume the env var or the local checkout is "more correct." - Write operations: Never skip the preview-and-confirm step in step 5, even for a one-line comment. This is the one hard rule from the design brief.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

