Use when managing GitHub Issues including creation, labels, milestones, assignees, and comments using gh CLI. Trigger with create issue, set labels, assign milestone.
Instrucciones de origen · Vista previa de solo lectura
name
eia-github-issue-operations
description
Use when managing GitHub Issues including creation, labels, milestones, assignees, and comments using gh CLI. Trigger with create issue, set labels, assign milestone.
This skill provides complete GitHub Issue management capabilities for orchestrator agents. It enables programmatic issue creation, labeling, milestone tracking, assignee management, and comment posting using the gh CLI tool.
Instructions
Verify prerequisites are met (gh CLI installed and authenticated)
Identify which GitHub Issue operation you need using the Decision Tree below
Select the appropriate script from the Script Reference Table
Execute the script with required arguments
Check the JSON output for success or error codes (see Exit Codes section)
Handle errors using the Error Handling section if needed
Checklist
Copy this checklist and track your progress:
Verify gh CLI is installed: gh --version
Verify gh CLI is authenticated: gh auth status
Verify write access to target repository
Identify operation needed using Decision Tree
Select appropriate script from Script Reference Table
Execute script with required arguments
Check JSON output for success ("error": false) or error ("error": true)
If error, check exit code (0=success, 1-6=specific errors)
Handle any errors using Error Handling section
Verify operation completed as expected (e.g., issue created, labels applied)
Output
All scripts return structured JSON output:
Output Type
Format
Fields
Example
Success
JSON object
Operation-specific data
{"number": 123, "url": "https://github.com/..."}
Error
JSON object with error: true
message, code
{"error": true, "message": "Issue not found", "code": "ISSUE_NOT_FOUND"}
Exit codes
Standard codes 0-6
See Exit Codes section
0 = success, 1-6 = specific errors
Prerequisites
Before using this skill, ensure:
gh CLI is installed and authenticated (gh auth status)
You have write access to the target repository
jq is available for JSON processing
Decision Tree: Which Operation Do I Need?
Need to work with GitHub Issues?
│
├─► Need issue information?
│ └─► Use: eia_get_issue_context.py
│ Returns: title, body, state, labels, assignees, milestone, comments count, linked PRs
│
├─► Need to create a new issue?
│ └─► Use: eia_create_issue.py
│ Requires: --title, optional: --body, --labels, --assignee
│ Returns: issue number and URL
│
├─► Need to manage labels?
│ ├─► Adding labels? → eia_set_issue_labels.py --add "label1,label2"
│ ├─► Removing labels? → eia_set_issue_labels.py --remove "label1"
│ └─► Setting exact labels? → eia_set_issue_labels.py --set "label1,label2"
│ Note: Auto-creates missing labels if they don't exist
│
├─► Need to assign to milestone?
│ └─► Use: eia_set_issue_milestone.py
│ Option: --create-if-missing to auto-create milestone
│
└─► Need to post a comment?
└─► Use: eia_post_issue_comment.py
Option: --marker for idempotent comments (won't duplicate)
All scripts use standardized exit codes for consistent error handling:
Code
Meaning
Description
0
Success
Operation completed successfully
1
Invalid parameters
Missing required args, bad format
2
Resource not found
Issue, repo, milestone, or labels not found
3
API error
Network, rate limit, timeout
4
Not authenticated
gh CLI not logged in
5
Idempotency skip
Comment with marker already exists
6
Not mergeable
N/A for these scripts
Note:eia_post_issue_comment.py returns exit code 5 when a comment with the specified --marker already exists. The JSON output will have "created": false.