Source profileQuality 92/100

laurigates/claude-plugins/git-plugin/skills/gh-cli-agentic/SKILL.md

gh-cli-agentic

gh CLI commands with JSON output for agent workflows. Use when querying PRs, issues, workflow runs, or repo metadata; inspecting PR checks; fetching failed CI logs; or resolving a github.com URL to an API call.

Source repository stars
54
Declared platforms
0
Static risk flags
1
Last source update
2026-08-28
Source checked
2026-08-28

Decision brief

What it does: where it fits

gh CLI commands with JSON output for agent workflows. com URL to an API call.

Best for

  • Optimized gh commands for AI agent consumption using JSON output and structured field selection.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/laurigates/claude-plugins --skill "git-plugin/skills/gh-cli-agentic"
Safe inspection promptEditorial

Inspect the Agent Skill "gh-cli-agentic" from https://github.com/laurigates/claude-plugins/blob/c056e44b978db58648ad20440dc1515cb09af09d/git-plugin/skills/gh-cli-agentic/SKILL.md at commit c056e44b978db58648ad20440dc1515cb09af09d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    PRs needing review

    gh pr list --search "review-requested:@me" --json number,title bash

    gh pr list --search "review-requested:@me" --json number,title bash
  2. 02

    Workflow Run Operations

    Review the “Workflow Run Operations” section in the pinned source before continuing.

    Review and apply the “Workflow Run Operations” source section.
  3. 03

    Get only failed step logs (most useful for debugging)

    gh run view $RUNID --log-failed

    gh run view $RUNID --log-failed
  4. 04

    Workflow Triggers

    Review the “Workflow Triggers” section in the pinned source before continuing.

    Review and apply the “Workflow Triggers” source section.
  5. 05

    Trigger workflow manually

    gh workflow run $WORKFLOWNAME

    gh workflow run $WORKFLOWNAME

Permission review

Static risk signals and limitations

Writes files

medium · line 146

The documentation asks the agent to create, modify, or delete local files.

# Create issue with type (requires repo/org with issue types configured)

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars54SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
laurigates/claude-plugins
Skill path
git-plugin/skills/gh-cli-agentic/SKILL.md
Commit
c056e44b978db58648ad20440dc1515cb09af09d
License
MIT
Collected
2026-08-28
Default branch
main
View the original SKILL.md

GitHub CLI Agentic Patterns

When to Use This Skill

Use this skill when...Use the alternative when...
Querying PRs, issues, runs, or repo metadata with gh and need JSON outputUse git-cli-agentic for porcelain-mode local git queries (status, diff, log)
Inspecting PR checks, mergeable status, or fetching failed CI logsUse gh-workflow-monitoring to actively watch a run until it completes
Resolving a github.com URL into an gh api call or working with sub-issuesUse git-issue-hierarchy for sub-issue add/remove/dependency-graph operations
Looking up label, repo, or workflow metadata via gh JSON commandsUse github-labels to actually apply or create labels on issues/PRs

Optimized gh commands for AI agent consumption using JSON output and structured field selection.

Core Principle

Always use --json <fields> for machine-readable output. The --jq filter is built-in (no jq installation required).

Pull Request Operations

Check Status

# Get all check statuses
gh pr checks $PR_NUMBER --json name,state,conclusion,detailsUrl

# Filter to failed only
gh pr checks $PR_NUMBER --json name,state,conclusion --jq '.[] | select(.conclusion == "FAILURE")'

Fields: name, state, conclusion, detailsUrl, startedAt, completedAt

PR Details

# Essential PR info
gh pr view $PR_NUMBER --json number,title,state,mergeable,statusCheckRollup

# Full context
gh pr view $PR_NUMBER --json number,title,body,state,author,labels,assignees,reviewDecision,mergeable,statusCheckRollup

Key Fields:

FieldDescription
mergeableMERGEABLE, CONFLICTING, UNKNOWN
reviewDecisionAPPROVED, CHANGES_REQUESTED, REVIEW_REQUIRED
statusCheckRollupArray of check statuses

List PRs

# Open PRs
gh pr list --json number,title,author,labels

# PRs by author
gh pr list --author @me --json number,title,state

# PRs needing review
gh pr list --search "review-requested:@me" --json number,title

Workflow Run Operations

Run Details

# Get run status with jobs
gh run view $RUN_ID --json conclusion,status,jobs,createdAt,updatedAt

# List recent runs
gh run list --json databaseId,status,conclusion,name,createdAt -L 10

Status Values: queued, in_progress, completed Conclusion Values: success, failure, cancelled, skipped, neutral

Watch Run Until Completion

# Watch and wait for run to complete (blocking, no timeout needed)
gh run watch $RUN_ID --compact --exit-status

# Find and watch latest run
RUN_ID=$(gh run list -L 1 --json databaseId --jq '.[0].databaseId')
gh run watch $RUN_ID --compact --exit-status

See gh-workflow-monitoring skill for comprehensive workflow watching patterns.

Failed Logs

# Get only failed step logs (most useful for debugging)
gh run view $RUN_ID --log-failed

# Full logs (verbose)
gh run view $RUN_ID --log

Workflow Triggers

# Trigger workflow manually
gh workflow run $WORKFLOW_NAME

# Trigger with inputs
gh workflow run $WORKFLOW_NAME -f param1=value1 -f param2=value2

# List workflows
gh workflow list --json name,state,path

Issue Operations

Issue Details

# Full issue context
gh issue view $ISSUE_NUMBER --json number,title,body,state,labels,assignees,comments

# Minimal
gh issue view $ISSUE_NUMBER --json number,title,state,labels

# With sub-issue progress
gh issue view $ISSUE_NUMBER --json number,title,state,subIssuesSummary

List Issues

# Open issues
gh issue list --json number,title,labels,assignees

# By label
gh issue list --label "bug" --json number,title

# Assigned to me
gh issue list --assignee @me --json number,title,state

Issue Types

# Create issue with type (requires repo/org with issue types configured)
gh issue create --title "..." --body "..." --type "Bug"
gh issue create --title "..." --body "..." --type "Feature"
gh issue create --title "..." --body "..." --type "Task"

Sub-Issues

# List sub-issues of a parent
gh api repos/{owner}/{repo}/issues/{parent}/sub_issues --jq '.[].number'

# Add existing issue as sub-issue
gh api repos/{owner}/{repo}/issues/{parent}/sub_issues -f sub_issue_id={child_id}

# Remove sub-issue
gh api repos/{owner}/{repo}/issues/{parent}/sub_issues/{sub_issue_id} -X DELETE

# Reprioritize sub-issue (move after another sub-issue)
gh api repos/{owner}/{repo}/issues/{parent}/sub_issues -X PATCH \
  -f sub_issue_id={id} -f after_id={after_id}

# Get sub-issue summary via issue view
gh issue view {N} --json title,subIssuesSummary
# Returns: {"total": 5, "completed": 3, "percentCompleted": 60}

Custom Issue Fields

# List available fields for an org
gh api orgs/{org}/issue-fields --jq '.[].name'

# Get field values for an issue
gh api repos/{owner}/{repo}/issues/{N}/issue-field-values

# Set field value
gh api repos/{owner}/{repo}/issues/{N}/issue-field-values \
  -X POST -f field_id={id} -f value='{value}'

Issue Management

# Transfer issue to another repo
gh issue transfer {N} {target-repo}

# Pin/unpin issue
gh issue pin {N}
gh issue unpin {N}

# Lock/unlock issue thread
gh issue lock {N} --reason resolved
gh issue unlock {N}

# Create development branch from issue
gh issue develop {N} --checkout
gh issue develop {N} --name {branch-name}

Repository Operations

# Get repo info
gh repo view --json nameWithOwner,defaultBranchRef,description

# Just owner/name
gh repo view --json nameWithOwner --jq '.nameWithOwner'

API Direct Access

For operations not covered by subcommands:

# Get specific data
gh api repos/{owner}/{repo}/actions/runs --jq '.workflow_runs[:5]'

# With pagination
gh api repos/{owner}/{repo}/issues --paginate --jq '.[].number'

GitHub URL Resolution

Translate GitHub URLs into gh API commands for programmatic access.

URL → Command Mapping

URL PatternCommand
github.com/{owner}/{repo}/pull/{n}gh pr view {n} --repo {owner}/{repo} --json number,title,body,state
github.com/{owner}/{repo}/issues/{n}gh issue view {n} --repo {owner}/{repo} --json number,title,body,state
github.com/{owner}/{repo}/commit/{sha}gh api repos/{owner}/{repo}/commits/{sha}
github.com/{owner}/{repo}/blob/{ref}/{path}gh api repos/{owner}/{repo}/contents/{path}?ref={ref}

File Contents by Ref

# Get decoded file content at a specific ref (branch, tag, or SHA)
gh api repos/{owner}/{repo}/contents/{path}?ref={ref} --jq '.content' | base64 -d

# Get raw file content directly (no JSON wrapper)
gh api repos/{owner}/{repo}/contents/{path}?ref={ref} -H "Accept: application/vnd.github.raw+json"

Diff and Patch via API

Use Accept headers to get raw diff or patch output from PRs and commits:

# PR diff
gh api repos/{owner}/{repo}/pulls/{n} -H "Accept: application/vnd.github.diff"

# PR patch
gh api repos/{owner}/{repo}/pulls/{n} -H "Accept: application/vnd.github.patch"

# Commit diff
gh api repos/{owner}/{repo}/commits/{sha} -H "Accept: application/vnd.github.diff"

# Commit patch
gh api repos/{owner}/{repo}/commits/{sha} -H "Accept: application/vnd.github.patch"

Agentic Optimizations

ContextCommand
CI diagnosisgh pr checks $N --json name,state,conclusion,detailsUrl
Get failure logsgh run view $ID --log-failed
PR merge statusgh pr view $N --json mergeable,reviewDecision,statusCheckRollup
Quick issue listgh issue list --json number,title,labels -L 10
Sub-issue progressgh issue view $N --json title,subIssuesSummary
List sub-issuesgh api repos/{o}/{r}/issues/{N}/sub_issues --jq '.[].number'
Add sub-issuegh api repos/{o}/{r}/issues/{N}/sub_issues -f sub_issue_id=M
Transfer issuegh issue transfer N target-repo
Create dev branchgh issue develop N --checkout
Workflow triggergh workflow run $NAME

Error Handling in Context

Use 2>/dev/null to suppress errors in context expressions (do NOT use || fallbacks - blocked by Claude Code 2.1.7+):

- PR checks: !`gh pr checks $PR --json name,state,conclusion`
- Run status: !`gh run view $ID --json status,conclusion`

Field Reference

PR Fields

number, title, body, state, author, labels, assignees, reviewDecision, mergeable, statusCheckRollup, headRefName, baseRefName, isDraft, url, createdAt, updatedAt

Issue Fields

number, title, body, state, author, labels, assignees, comments, milestone, url, createdAt, updatedAt, closedAt, subIssuesSummary, type

Run Fields

databaseId, name, status, conclusion, jobs, createdAt, updatedAt, url, headBranch, headSha, event

Job Fields (within runs)

name, status, conclusion, startedAt, completedAt, steps

Frequently asked questions

What to verify before installation and use

What does the gh-cli-agentic source document cover?

gh CLI commands with JSON output for agent workflows. com URL to an API call.

How do I install gh-cli-agentic?

The source record exposes this install command: npx skills add https://github.com/laurigates/claude-plugins --skill "git-plugin/skills/gh-cli-agentic". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged write-files in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 10017

dancingteeth/unified-code-review

unified-code-review

Risk-first code review for PRs and branch audits: blast-radius triage, agent-authored discipline (tests first, intent evidence), call-graph pincer for integration defects between modules, then structural code-judo bar. Use when reviewing PRs, auditing agent-written diffs, catching rubber-stamp green CI, or wiring bugs single-file review misses. Prefer over structure-only thermo-nuclear review alone. Do not use for unrelated coding tasks or as an always-on rule.

Computed 9861

magnus919/agent-skills

software-architecture-analysis

Use this skill to reverse-engineer an existing software system, map its architecture, data flow, privacy posture, coupling, quality characteristics, and feature surface, then produce an evidence-grounded clean-room design document, PRD, or migration plan under new constraints. Use for codebase archaeology, implicit contract extraction, architecture health assessment, or decomposition-readiness analysis. Do not use for greenfield architecture design, direct code review, bug hunting, security audi

Computed 9725,136

alirezarezvani/claude-skills

adversarial-reviewer

Adversarial code review that breaks the self-review monoculture. Use when you want a genuinely critical review of recent changes, before merging a PR, or when you suspect Claude is being too agreeable about code quality. Forces perspective shifts through hostile reviewer personas that catch blind spots the author's mental model shares with the reviewer.

Computed 9764

Jamie-BitFlight/claude_skills

standards-for-python-development

Shared Python 3.11+ development standards covering type safety (ty, native generics, Protocol, TypeIs), layered architecture, error handling, performance, identifier naming, UI/CLI patterns (Rich/Typer), testing requirements (pytest, 80% coverage, TDD), and quality gates. Activates when any Python skill or agent needs to apply shared standards for implementation, code review, refactoring, or test authoring.