Skip to content
Back to skills

Github Administration

ASecurity

Technical guidance for GitHub issue and PR administration via gh, including command safety, quoting, verification, and recovery.

  • 57 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 31, 2026
toolsshellgitapi

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Scanned May 31, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill github-administration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Github Administration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Github Administration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-github-administration/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-github-administration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: github-administration
description: Technical guidance for GitHub issue and PR administration via gh, including command safety, quoting, verification, and recovery.
---

# GitHub Administration Skill

## Purpose

Use this skill whenever you interact with GitHub issues or pull requests through the `gh` CLI.

This skill is technical-only and focuses on execution mechanics:

- selecting and running the correct `gh` commands
- handling quoting safely
- applying metadata (assignee, labels)
- verifying outcomes and fixing command/result issues

Issue content design is out of scope here and belongs to `github-issue-designer`.

## Mandatory Usage

Always use `github-administration` whenever you want to interact with a GitHub issue.

## Pairing Rule

When an issue should be created or updated, use:

- `github-issue-designer` for issue content design
- `github-administration` for command execution via `gh`

## Preflight

Before mutating issues/PRs:

```sh
gh api user --jq .login
gh repo view --json nameWithOwner
gh label list --json name --limit 100
```

## Safe Command Rules

1. Prefer one mutation per command.
2. Always use `--body-file` for issue/comment/PR bodies (single-line or multi-line).
3. Use double quotes for arguments with spaces.
4. Verify immediately after create/edit/close operations.
5. Store temporary body files under a non-versioned workspace path (for this repo: `.tmp/`) and pass them via `--body-file`.
6. In persistent terminals, avoid heredoc for long multi-line bodies; write a temporary file first and pass it via `--body-file`.
7. Do not auto-assign newly created issues unless the navigator explicitly requests assignment at creation time.

## Command Recipes

### Create issue

```sh
mkdir -p .tmp
gh issue create --title "<title>" --body-file .tmp/issue.md --label <label> --assignee <login>
```

### View/verify issue

```sh
gh issue view <number> --json number,title,assignees,labels,url
```

### Edit issue

```sh
gh issue edit <number> --title "<new-title>" --body-file .tmp/issue-updated.md
```

### Comment on issue

```sh
gh issue comment <number> --body-file .tmp/comment.md
```

### Close issue

```sh
gh issue close <number> --comment "<closure note>"
```

### Create PR linked to issue

```sh
git push origin <branch>
gh pr create --title "Fix #<issue>: ..." --body "...\n\nFixes #<issue>" --head <branch>
```

## Troubleshooting

### Label not found

Error: `could not add label: '<label>' not found`

Fix:

- choose an existing label from `gh label list`, or
- create the missing label in GitHub UI and retry.

### PR push prompt appears

Cause: branch is not pushed.

Fix:

```sh
git push origin <branch>
gh pr create --head <branch> ...
```

### Shell quoting breaks (`dquote>`)

Fix:

- reset shell or open a new terminal

Prevention:

- use `--body-file` for multiline input

### Heredoc gets stuck (`heredoc>`)

Cause: unterminated or corrupted heredoc input in a persistent shell session.

Fix:

- abort and recover shell state
- avoid reusing heredoc for long content
- create the body in a temporary/workspace file and retry with `--body-file`

## Post-action Checklist

After each mutation:

- verify issue/PR metadata and links
- correct mistakes immediately

## Retrospective Requirement

After creating an issue and after closing a merged issue, run `self-learning-skills` retrospective automatically.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.