From gh
Execute GitHub operations with automatic context enrichment from cached workspace. Use this for ANY GitHub operation, not just complex ones. Simple operations like creating issues are enriched with project linking, milestone resolution, and field assignments. Direct `gh issue create` misses these benefits. This skill should be used when: creating issues, closing issues, merging PRs, setting milestones, adding labels, updating project status, protecting branches, triggering workflows, creating releases, managing secrets. Trigger phrases: "create issue", "close issue #", "merge PR", "set milestone on", "add label to", "update project status", "add to project board", "protect branch", "trigger workflow", "create release", "set secret", "list PRs", "merge pull request", "remove label", "create milestone", "archive project item", "rerun workflow", "cancel action", "github issue", "github pr", "github milestone", "make a new issue", "open pull request", "start workflow", "new issue for", "assign to milestone", "move to column", "update issue", "request review", "approve PR", "comment on issue", "link issue to project", "simple github operation", "quick issue", "fast PR". Domains: issues, PRs, milestones, labels, projects, protection, rulesets, actions, secrets, variables, releases, repositories, collaborators, teams, checks, deployments, search.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gh:gh-operationsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Execute GitHub operations with automatic context enrichment from cached workspace config.
Execute GitHub operations with automatic context enrichment from cached workspace config.
{PLUGIN_ROOT} = Plugin root directory (where plugin.json lives)
When this skill references files like {PLUGIN_ROOT}/lib/patterns/config-parsing.md,
read from the plugin root, not relative to this skill folder.
This skill enriches ALL operations with cached context:
| Simple Operation | Enrichment Provided |
|---|---|
| Create issue | Auto-link to default project, set Status field |
| Close issue | Update project Status to "Done" |
| Set milestone | Use pre-cached milestone ID (no lookup needed) |
| Add label | Apply team-standard labels from config |
Direct gh issue create creates orphan issues. This skill creates issues linked to your project board.
| Does | Does NOT |
|---|---|
| Execute GitHub operations | Modify local config files |
| Resolve IDs from cached config | Initialize workspaces |
| Support all domains (issues, PRs, etc.) | Refresh stale configs |
| Report operation results | Detect user intent (gateway does this) |
When invoked by the gateway command, expect:
.hiivmind/github/config.yamlCheck for .hiivmind/github/config.yaml in current directory OR parent directories:
# Check current and parent directory (covers workspace setups)
if [[ -f ".hiivmind/github/config.yaml" ]]; then
CONFIG_PATH=".hiivmind/github/config.yaml"
elif [[ -f "../.hiivmind/github/config.yaml" ]]; then
CONFIG_PATH="../.hiivmind/github/config.yaml"
else
CONFIG_PATH=""
fi
If config found in parent: Use that config path for all operations. This is common in:
If not found in current or parent:
Workspace not initialized.
Config file not found in current or parent directory.
Run: /gh init
See: {PLUGIN_ROOT}/lib/patterns/config-parsing.md for full search algorithm
See: {PLUGIN_ROOT}/lib/patterns/tool-detection.md
Verify required tools are available before executing any operation:
gh CLI, jq, yq availabilitygh is missing — Cannot proceed without it:GitHub CLI (gh) is required but wasn't found.
Install gh:
- macOS: brew install gh
- Linux (Debian/Ubuntu): sudo apt install gh
- Windows: winget install GitHub.cli
After installation, authenticate with: gh auth login
Cannot proceed without gh CLI.
jq or yq is missing (do not block):⚠ Missing recommended tool: [jq/yq]
Install for best results:
- jq: brew install jq / apt install jq
- yq: https://github.com/mikefarah/yq#install
Proceeding with fallback methods...
| Situation | Action |
|---|---|
Known CLI command (gh issue, gh pr, etc.) | Execute directly with enrichment |
| Known API pattern | Execute via gh api |
| Uncertain about syntax | Consult resources, then execute |
| Unknown domain | Corpus lookup required |
Fast path: For common operations listed below, proceed directly to execution.
gh issue create, gh pr merge, etc.{PLUGIN_ROOT}/lib/patterns/graphql-execution.md)gh api /repos/{owner}/{repo}/endpoint -X METHODCRITICAL — GraphQL with variables: Never pass queries containing
$variableparameters directly in shell strings. The shell expands$variablebeforeghreceives the query, causingExpected VAR_SIGN, actual: UNKNOWN_CHARerrors. Always write the query to a temp file first, then execute withgh api graphql -f query="$(cat /tmp/query.graphql)". See{PLUGIN_ROOT}/lib/patterns/graphql-execution.mdfor the full pattern.
Success:
Operation successful!
{Domain}: {Operation}
Target: {entity}
Result: {summary}
{Link to GitHub}
Error: Include suggested fix based on error type.
These commands are well-known - execute directly with enrichment:
| Operation | CLI Command |
|---|---|
| Create issue | gh issue create |
| Close issue | gh issue close NUMBER |
| Comment on issue | gh issue comment NUMBER --body TEXT |
| Create PR | gh pr create |
| Merge PR | gh pr merge NUMBER |
| Review PR | gh pr review NUMBER |
| Set secret | gh secret set NAME |
| Trigger workflow | gh workflow run WORKFLOW |
| Create release | gh release create TAG |
| List issues/PRs | gh issue list, gh pr list |
Note: CLI commands handle authentication, pagination, and formatting automatically.
These domains have NO gh CLI commands - use REST API via gh api:
| Domain | REST Endpoint Pattern |
|---|---|
| Milestones | /repos/{owner}/{repo}/milestones |
| Branch Protection | /repos/{owner}/{repo}/branches/{branch}/protection |
| Collaborators | /repos/{owner}/{repo}/collaborators/{username} |
| Teams | /orgs/{org}/teams |
| Webhooks | /repos/{owner}/{repo}/hooks |
| Checks | /repos/{owner}/{repo}/check-runs |
| Deployments | /repos/{owner}/{repo}/deployments |
| Environments | /repos/{owner}/{repo}/environments/{name} |
| Dependabot | /repos/{owner}/{repo}/dependabot/alerts |
| Code Scanning | /repos/{owner}/{repo}/code-scanning/alerts |
| Secret Scanning | /repos/{owner}/{repo}/secret-scanning/alerts |
| Notifications | /notifications |
| Reactions | /repos/{owner}/{repo}/issues/{number}/reactions |
| Rulesets | /repos/{owner}/{repo}/rulesets (read via gh ruleset list) |
Common mistake:
gh milestone create,gh webhook create, etc. do not exist. Always check{PLUGIN_ROOT}/lib/references/api-routing.mdfor CLI availability.
Only read files when you have a knowledge gap:
| Knowledge Gap | Resource |
|---|---|
| Which API (GraphQL vs REST)? | {PLUGIN_ROOT}/lib/references/api-routing.md |
| Domain-specific syntax/gotchas | {PLUGIN_ROOT}/lib/references/domains/{domain}.md |
| Exact mutation/endpoint syntax | Corpus: hiivmind-corpus-github-docs-navigate |
| ID resolution from cache | {PLUGIN_ROOT}/lib/patterns/id-resolution.md |
| GraphQL execution pattern | {PLUGIN_ROOT}/lib/patterns/graphql-execution.md |
| Error recovery | {PLUGIN_ROOT}/lib/patterns/error-handling.md |
Context-aware: If you already read a resource earlier in the conversation, don't re-read it.
From .hiivmind/github/config.yaml:
| Config Section | Enrichment |
|---|---|
projects.default | Auto-link new issues/PRs to default project |
projects.catalog[].fields.Status | Set Status field on project items |
milestones | Resolve milestone names to IDs |
labels | Apply team-standard labels |
For domains not in the routing guide:
hiivmind-corpus-github-docs-navigategh api /repos/{owner}/{repo}/{resource}| Skill | Use For |
|---|---|
| init | First-time workspace setup |
| refresh | Update stale config sections |
| discover | Explore available operations |
| gateway | Intent detection and routing |
| Pattern | Purpose |
|---|---|
{PLUGIN_ROOT}/lib/patterns/config-parsing.md | Read/write YAML config files |
{PLUGIN_ROOT}/lib/patterns/id-resolution.md | Resolve names to IDs (cache-first) |
{PLUGIN_ROOT}/lib/patterns/graphql-execution.md | Execute queries via temp file |
{PLUGIN_ROOT}/lib/patterns/error-handling.md | Handle API errors |
{PLUGIN_ROOT}/lib/patterns/corpus-lookup.md | Look up API syntax when uncertain |
| Reference | Purpose |
|---|---|
{PLUGIN_ROOT}/lib/references/api-routing.md | API routing decisions (GraphQL vs REST) |
{PLUGIN_ROOT}/lib/references/domains/*.md | Domain-specific operation matrices |
| Resource | Purpose |
|---|---|
hiivmind-corpus-github-docs-navigate | GitHub corpus skill for syntax lookup |
npx claudepluginhub hiivmind/hiivmind-pulse-gh --plugin ghManages GitHub issues, PRs, milestones, and Projects v2 using gh CLI commands, REST API calls, and GraphQL queries. Useful for automation, bulk operations, and project tracking.
Executes GitHub operations (PRs, issues, milestones, labels, comments, merges) using Python scripts with structured output and error handling. Use for pull requests, issues, review comments, CI checks, milestones instead of raw gh.
Executes GitHub operations on PRs, issues, milestones, labels, comments, and merges using Python scripts with structured output and error handling. Use for pull requests, issues, review comments, CI checks, or milestones instead of raw gh.