github-issue-queryoleh github

Query GitHub issues efficiently with jq argument support for filtering

npx skills add https://github.com/github/gh-aw --skill github-issue-query

GitHub Issue Query Skill

This skill provides efficient querying of GitHub issues with built-in jq filtering support.

Important: jq Parameter is Optional

The --jq parameter is optional. When called without --jq, this skill returns schema and data size information instead of the full data. This prevents overwhelming responses with large datasets and helps you understand the data structure before querying.

Use --jq '.' to get all data, or use a more specific filter for targeted results.

Usage

Use this skill to query issues from the current repository or any specified repository.

Basic Query (Returns Schema Only)

To list issues from the current repository:

./query-issues.sh
# Returns schema and data size, not full data

Get All Data

To get all issue data:

./query-issues.sh --jq '.'

With Repository

To query a specific repository:

./query-issues.sh --repo owner/repo

With jq Filtering

Use the --jq argument to filter and transform the output:

# Get only open issues
./query-issues.sh --jq '.[] | select(.state == "OPEN")'

# Get issue numbers and titles
./query-issues.sh --jq '.[] | {number, title}'

# Get issues by a specific author
./query-issues.sh --jq '.[] | select(.author.login == "username")'

# Get issues with specific label
./query-issues.sh --jq '.[] | select(.labels | map(.name) | index("bug"))'

# Count issues by state
./query-issues.sh --jq 'group_by(.state) | map({state: .[0].state, count: length})'

Common Options

  • --state: Filter by state (open, closed, all). Default: open
  • --limit: Maximum number of issues to fetch. Default: 30
  • --repo: Repository in owner/repo format. Default: current repo
  • --jq: (Optional) jq expression for filtering/transforming output. If omitted, returns schema info

Example Queries

Find issues with many comments:

./query-issues.sh --jq '.[] | select(.comments.totalCount > 5) | {number, title, comments: .comments.totalCount}'

Get issues assigned to someone:

./query-issues.sh --jq '.[] | select(.assignees | length > 0) | {number, title, assignees: [.assignees[].login]}'

List issues with their labels:

./query-issues.sh --jq '.[] | {number, title, labels: [.labels[].name]}'

Get project board assignments:

./query-issues.sh --jq '.[] | {number, title, projects: [.projectItems.nodes[]? | .project?.url]}'

Find old issues (created over 30 days ago):

./query-issues.sh --jq '.[] | select(.createdAt < (now - 2592000 | strftime("%Y-%m-%dT%H:%M:%SZ")))'

Output Format

The script outputs JSON by default, making it easy to pipe through jq for additional processing.

Requirements

  • GitHub CLI (gh) authenticated
  • jq for filtering (installed by default on most systems)

Lebih banyak skill dari github

console-rendering
by github
Instructions for using the struct tag-based console rendering system in Go
acquire-codebase-knowledge
by github
Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document…
acreadiness-assess
by github
Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html. Wraps `npx github:microsoft/agentrc…
acreadiness-generate-instructions
by github
Generate tailored AI agent instruction files via AgentRC instructions command. Produces .github/copilot-instructions.md (default, recommended for Copilot in VS…
acreadiness-policy
by github
Help the user pick, write, or apply an AgentRC policy. Policies customise readiness scoring by disabling irrelevant checks, overriding impact/level, setting…
add-educational-comments
by github
Add educational comments to code files to transform them into effective learning resources. Adapts explanation depth and tone to three configurable knowledge levels: beginner, intermediate, and advanced Automatically requests a file if none is provided, with numbered list matching for quick selection Expands files by up to 125% using educational comments only (hard limit: 400 new lines; 300 for files over 1,000 lines) Preserves file encoding, indentation style, syntax correctness, and...
adobe-illustrator-scripting
by github
Write, debug, and optimize Adobe Illustrator automation scripts using ExtendScript (JavaScript/JSX). Use when creating or modifying scripts that manipulate…
agent-governance
by github
Declarative policies, intent classification, and audit trails for controlling AI agent tool access and behavior. Composable governance policies define allowed/blocked tools, content filters, rate limits, and approval requirements — stored as configuration, not code Semantic intent classification detects dangerous prompts (data exfiltration, privilege escalation, prompt injection) before tool execution using pattern-based signals Tool-level governance decorator enforces policies at function...

NotebookLM Web Importer

Impor halaman web dan video YouTube ke NotebookLM dengan satu klik. Dipercaya oleh 200.000+ pengguna.

Instal Ekstensi Chrome