CLI workflow

Triage GitHub Issues with a CLI

Read open issues as structured data, group them by evidence and urgency, then propose rather than silently apply changes.

Code collaborationRemote write

Prepare tools, authentication, and evidence first

Install the recommended tools, confirm minimum permissions, and keep compatibility separate from real execution records.

ghverified
Review pull requests, triage issues, inspect Actions, and manage releases with GitHub's official CLI.

Recommended install

$ shell
brew install gh
Authentication
OAuth, personal access token, GitHub Actions token
Tested agents
No agent-specific execution record
Evidence status
verified · Documentation checked 2026-07-10
Independent CLI execution
2.86.0 · 2 checks
jqverified
Parse, filter, validate, and transform JSON locally with deterministic output.

Recommended install

$ shell
brew install jq
Authentication
No authentication for the base operation
Tested agents
No agent-specific execution record
Evidence status
verified · Documentation checked 2026-07-10
Independent CLI execution
jq-1.7.1-apple · 4 checks

Copy or download this workflow Skill

The Skill includes input and output contracts, recommended tools, approval points, rollback, and evidence boundaries. Review it against the active environment before saving.

triage-github-issues-SKILL.md
---
name: triage-github-issues-workflow
description: "Read open issues as structured data, group them by evidence and urgency, then propose rather than silently apply changes."
---

# Triage GitHub issues

## Intended outcome

Turn an issue queue into an actionable triage report without losing user context or changing state unexpectedly.

## Evidence boundary

- Tool status distinguishes `docs-verified` material from independent execution; the two are not interchangeable.
- The current registry does not attribute a tool execution to a particular agent, so compatible agents cannot be called tested agents.
- Reconfirm the target account, environment, version, and official documentation before execution.
- Never auto-execute an R2, R3, or confirmation-marked step; obtain explicit approval immediately before it runs.

## Recommended tools, installation, and authentication

- **GitHub CLI** (evidence: `verified`, docs checked: `2026-07-10`, independently tested version 2.86.0 recorded)
  - Install: `brew install gh`
  - Authentication: OAuth, personal access token, GitHub Actions token
  - Minimum permissions: Use a read-only or fine-grained token limited to the required repositories.
- **jq** (evidence: `verified`, docs checked: `2026-07-10`, independently tested version jq-1.7.1-apple recorded)
  - Install: `brew install jq`
  - Authentication: not required for the base operation
  - Minimum permissions: No service credential is required; restrict filesystem and network access to the task.

## Input contract

- Repository name
- triage criteria
- label taxonomy
- read-scoped GitHub identity

## Output contract

- Grouped issue list
- duplicate candidates
- label suggestions
- approved update commands

## Safe workflow

1. **Collect the queue** — List issues with labels, timestamps, authors, and URLs in JSON.
   - Input: Repository and search boundary
   - Output: Structured issue dataset
   - Risk: `read-only`
   - Command: `gh issue list --state open --limit 100 --json number,title,labels,author,updatedAt,url`
2. **Group and verify** — Group by topic and urgency, then open likely duplicates before making a claim.
   - Input: Issue dataset and triage rules
   - Output: Triage table with evidence
   - Risk: `read-only`
3. **Propose updates** — Show exact label, assignee, or close commands only for accepted decisions.
   - Input: Approved triage decisions
   - Output: Reviewable update commands
   - Risk: `remote-write`
   - Command: `gh issue edit 123 --add-label "needs-repro"`

## Ask before proceeding

- Adding or removing labels
- Assigning people or milestones
- Closing, reopening, or editing an issue

## Rollback

- Remove an incorrect label
- Reopen an issue with a correction note
- Keep the pre-change JSON export

## Official sources

- [GitHub CLI manual](https://cli.github.com/manual/) — Official command, authentication, JSON field, and workflow documentation.
- [GitHub REST API documentation](https://docs.github.com/en/rest) — Official HTTP API and authentication reference for GitHub resources.

Outcome, inputs, and outputs

Define the result and evidence before the agent selects a command.

Goal

Turn an issue queue into an actionable triage report without losing user context or changing state unexpectedly.

Required inputs

  • Repository name
  • triage criteria
  • label taxonomy
  • read-scoped GitHub identity

Expected outputs

  • Grouped issue list
  • duplicate candidates
  • label suggestions
  • approved update commands

Triage GitHub Issues with a CLI: safe workflow

Run each step inside its stated boundary and verify the output before continuing.

Step 1Read only

Collect the queue

List issues with labels, timestamps, authors, and URLs in JSON.
Input
Repository and search boundary
Output
Structured issue dataset
$ Collect the queue
gh issue list --state open --limit 100 --json number,title,labels,author,updatedAt,url
Step 2Read only

Group and verify

Group by topic and urgency, then open likely duplicates before making a claim.
Input
Issue dataset and triage rules
Output
Triage table with evidence
Step 3Remote write

Propose updates

Show exact label, assignee, or close commands only for accepted decisions.
Input
Approved triage decisions
Output
Reviewable update commands
$ Propose updates
gh issue edit 123 --add-label "needs-repro"

Approval points and rollback

Pause at the listed decision points and keep recovery instructions beside the action.

Ask before these actions

  • Adding or removing labels
  • Assigning people or milestones
  • Closing, reopening, or editing an issue

Recovery plan

  • Remove an incorrect label
  • Reopen an issue with a correction note
  • Keep the pre-change JSON export

CLI, MCP, or API?

Choose the interface by execution location, identity, output contract, and permission boundary.

CLI

Best for repository-scoped lists and small batches with transparent commands.

MCP

Useful for policy-mediated issue operations across an organization.

API

Prefer for large batches, custom duplicate detection, and durable triage services.

Recommended approach

Use CLI reads for analysis and apply only a reviewed batch of issue changes.

Official evidence and references

Use these primary or upstream sources to verify current command behavior before acting.

GitHub CLI manual

Official command, authentication, JSON field, and workflow documentation.

GitHub REST API documentation

Official HTTP API and authentication reference for GitHub resources.

Questions before you run it

Can an agent close obvious duplicates?

It should first link the candidate duplicate and ask; closing affects reporters and project history.

How large should one update batch be?

Keep it small enough that every issue and proposed change can be reviewed before execution.

Related tools and guides

Browse sibling guides and choose the next page that best matches the active task.

Continue with tool evidence, a workflow, or a decision guide related to this task.

Continue with tool evidence, a workflow, or a decision guide related to this task.

Continue with tool evidence, a workflow, or a decision guide related to this task.

Inspect installation, authentication, structured output, command risk, and official evidence.