github-operations

Enforce canonical GitHub issue or PR numbers from gh create output for mutations.

4|1|Updated Feb 4, 2024
One-click install
npx skills add https://github.com/Arx-Game/arxii --skill github-operations-arx-game
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-operations
Source: https://github.com/Arx-Game/arxii/tree/main/tools/skills/github-operations
Command: npx skills add https://github.com/Arx-Game/arxii --skill github-operations-arx-game

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents mutating the wrong GitHub issue or PR by requiring you to use the exact number printed in the creation command output.

Core Features & Use Cases

  • Read and enforce using the canonical issue/PR number printed by gh issue create or gh pr create.
  • Guard mutational actions (comment, edit, close, label) by validating the target number in the same turn.
  • Reduce cross-entity mistakes by treating issues and PRs as sharing one numbering sequence.

Quick Start

After creating a GitHub issue or PR with gh, copy the printed URL and use that exact number for any subsequent mutations.

Frequently Asked Questions about github-operations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent mutating the wrong GitHub issue or PR number with gh?

To prevent mutating the wrong GitHub issue or PR, you must capture the exact canonical number printed in the gh create command output and validate that number before performing any subsequent mutations like comments, edits, or labeling.

When do I need to validate a GitHub issue number before editing or commenting?

You need to validate a GitHub issue number before editing or commenting whenever you create an issue or PR with gh and then perform subsequent mutations. Guarding these mutational actions requires using the exact number from the creation output in the same turn.

How to safely close or label a GitHub PR created with gh CLI?

To safely close or label a GitHub PR created with gh CLI, enforce capturing and validating the canonical URL printed by gh pr create. You must use that exact validated number before executing any subsequent mutational actions such as closing or labeling.

Why does GitHub issue and PR number tracking cause cross-entity mutation mistakes?

GitHub issue and PR number tracking causes cross-entity mutation mistakes because issues and PRs share a single counter. Treating them as sharing one numbering sequence and validating the canonical URL prevents targeting the wrong entity during mutations.

Does this mutation safety approach work with both gh issues and gh prs commands?

Yes, the mutation safety approach works with both gh issues and gh prs commands. It applies whenever creating issues or PRs with gh and performing subsequent mutations such as comments, edits, closes, or labeling using the validated number across both entity types.