agentsclimarketplace

Gh operations

Skill hiivmind/hiivmind-pulse-gh/skills/gh-operations

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.From its SKILL.md

Install
npx -y skills add hiivmind/hiivmind-pulse-gh --skill gh-operations

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

10.8 KB, as published. Nobody here has run it

GitHub Operations Execution

Execute GitHub operations with automatic context enrichment from cached workspace config.

Path Convention

{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.

Why Use This Skill (Even for Simple Operations)

This skill enriches ALL operations with cached context:

Simple OperationEnrichment Provided
Create issueAuto-link to default project, set Status field
Close issueUpdate project Status to "Done"
Set milestoneUse pre-cached milestone ID (no lookup needed)
Add labelApply team-standard labels from config

Direct gh issue create creates orphan issues. This skill creates issues linked to your project board.

Scope

DoesDoes NOT
Execute GitHub operationsModify local config files
Resolve IDs from cached configInitialize workspaces
Support all domains (issues, PRs, etc.)Refresh stale configs
Report operation resultsDetect user intent (gateway does this)

Expected Context

When invoked by the gateway command, expect:

  • Domain: issues, pull_requests, milestones, labels, projects, branch_protection, rulesets, actions, secrets, variables, releases, repositories, collaborators, teams, checks, deployments, security, dependabot, search, gists, or any unlisted domain
  • Operation: create, read, update, delete, link, trigger, merge
  • Target: Specific entity (issue #42, milestone "v2.0", etc.)
  • Config: .hiivmind/github/config.yaml

Execution Flow

1. Verify Workspace

Check for .hiivmind/github/config.yaml in current directory OR parent directories:

# Resolve workspace root (see lib/patterns/workspace-detection.md)
CONFIG_PATH=""
DIR="$PWD"
while [[ "$DIR" != "/" ]]; do
    if [[ -f "$DIR/.hiivmind/github/config.yaml" ]] \
       && grep -q '^workspace:' "$DIR/.hiivmind/github/config.yaml"; then
        CONFIG_PATH="$DIR/.hiivmind/github/config.yaml"
        break
    fi
    DIR="$(dirname "$DIR")"
done

If config found at a workspace root above cwd: use that config path for all operations. This is the normal case when repos live under a shared workspace root.

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

1.5. Check Tools

See: {PLUGIN_ROOT}/lib/patterns/tool-detection.md

Verify required tools are available before executing any operation:

  1. Check for gh CLI, jq, yq availability
  2. STOP if gh 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.
  1. WARN if 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...

2. Determine Approach

SituationAction
Known CLI command (gh issue, gh pr, etc.)Execute directly with enrichment
Known API patternExecute via gh api
Uncertain about syntaxConsult resources, then execute
Unknown domainCorpus lookup required

Fast path: For common operations listed below, proceed directly to execution.

3. Execute with Enrichment

  1. Resolve IDs from cached config (project ID, field IDs, milestone ID)
  2. Apply enrichment (link to project, set status field, etc.)
  3. Execute:
    • CLI: gh issue create, gh pr merge, etc.
    • GraphQL: ALWAYS use the temp file method ({PLUGIN_ROOT}/lib/patterns/graphql-execution.md)
    • REST: gh api /repos/{owner}/{repo}/endpoint -X METHOD

CRITICAL — GraphQL with variables: Never pass queries containing $variable parameters directly in shell strings. The shell expands $variable before gh receives the query, causing Expected VAR_SIGN, actual: UNKNOWN_CHAR errors. Always write the query to a temp file first, then execute with gh api graphql -f query="$(cat /tmp/query.graphql)". See {PLUGIN_ROOT}/lib/patterns/graphql-execution.md for the full pattern.

4. Report Result

Success:

Operation successful!

{Domain}: {Operation}
Target: {entity}
Result: {summary}

{Link to GitHub}

Error: Include suggested fix based on error type.


Common Operations (No Lookup Needed)

These commands are well-known - execute directly with enrichment:

OperationCLI Command
Create issuegh issue create
Close issuegh issue close NUMBER
Comment on issuegh issue comment NUMBER --body TEXT
Create PRgh pr create
Merge PRgh pr merge NUMBER
Review PRgh pr review NUMBER
Set secretgh secret set NAME
Trigger workflowgh workflow run WORKFLOW
Create releasegh release create TAG
List issues/PRsgh issue list, gh pr list

Note: CLI commands handle authentication, pagination, and formatting automatically.

Domains WITHOUT CLI Support

These domains have NO gh CLI commands - use REST API via gh api:

DomainREST 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.md for CLI availability.


When to Consult Resources

Only read files when you have a knowledge gap:

Knowledge GapResource
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 syntaxCorpus: 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.


Enrichment Details

What Gets Applied

From .hiivmind/github/config.yaml:

Config SectionEnrichment
projects.defaultAuto-link new issues/PRs to default project
projects.catalog[].fields.StatusSet Status field on project items
milestonesResolve milestone names to IDs
labelsApply team-standard labels

Cache-First ID Resolution

  1. Check config.yaml for cached ID
  2. If found → use directly
  3. If not found → corpus lookup to query, then cache result

Unknown Domains

For domains not in the routing guide:

  1. Default to REST API - Most GitHub features use REST for mutations
  2. Invoke corpus for endpoint syntax: hiivmind-corpus-github-docs-navigate
  3. Confirm with user before executing unknown patterns
  4. Endpoint pattern: gh api /repos/{owner}/{repo}/{resource}

Related Skills

SkillUse For
initFirst-time workspace setup
refreshUpdate stale config sections
discoverExplore available operations
gatewayIntent detection and routing

Resources

Patterns (HOW to do things)

PatternPurpose
{PLUGIN_ROOT}/lib/patterns/config-parsing.mdRead/write YAML config files
{PLUGIN_ROOT}/lib/patterns/id-resolution.mdResolve names to IDs (cache-first)
{PLUGIN_ROOT}/lib/patterns/graphql-execution.mdExecute queries via temp file
{PLUGIN_ROOT}/lib/patterns/error-handling.mdHandle API errors
{PLUGIN_ROOT}/lib/patterns/corpus-lookup.mdLook up API syntax when uncertain

References (WHAT exists)

ReferencePurpose
{PLUGIN_ROOT}/lib/references/api-routing.mdAPI routing decisions (GraphQL vs REST)
{PLUGIN_ROOT}/lib/references/domains/*.mdDomain-specific operation matrices

External

ResourcePurpose
hiivmind-corpus-github-docs-navigateGitHub corpus skill for syntax lookup

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.