Agent skill

gh

GitHub CLI (gh) for repository management, rulesets, releases, PRs, and issues. This skill is triggered when the user says things like "create a GitHub PR", "list GitHub issues", "set up branch protection", "create a ruleset", "configure GitHub rulesets", "create a GitHub release", "clone this repo", or "manage GitHub repository settings".

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/SecKatie/kmtools/tree/main/gh

SKILL.md

GitHub CLI (gh)

The GitHub CLI brings GitHub to your terminal for seamless workflows.

Repository Rulesets

Rulesets protect branches and tags with configurable rules.

Create a Branch Protection Ruleset

bash
gh api repos/{owner}/{repo}/rulesets --method POST --input - <<'EOF'
{
  "name": "Protect main",
  "target": "branch",
  "enforcement": "active",
  "conditions": {
    "ref_name": {
      "include": ["refs/heads/main"],
      "exclude": []
    }
  },
  "rules": [
    {"type": "pull_request", "parameters": {"required_approving_review_count": 1, "dismiss_stale_reviews_on_push": false, "require_code_owner_review": false, "require_last_push_approval": false, "required_review_thread_resolution": false}},
    {"type": "deletion"},
    {"type": "non_fast_forward"}
  ],
  "bypass_actors": [
    {"actor_id": 5, "actor_type": "RepositoryRole", "bypass_mode": "always"}
  ]
}
EOF

Create a Tag Protection Ruleset

bash
gh api repos/{owner}/{repo}/rulesets --method POST --input - <<'EOF'
{
  "name": "Protect tags",
  "target": "tag",
  "enforcement": "active",
  "conditions": {
    "ref_name": {
      "include": ["~ALL"],
      "exclude": []
    }
  },
  "rules": [
    {"type": "creation"},
    {"type": "update"},
    {"type": "deletion"}
  ],
  "bypass_actors": [
    {"actor_id": 5, "actor_type": "RepositoryRole", "bypass_mode": "always"}
  ]
}
EOF

Bypass Actors

Add bypass_actors to allow certain roles to bypass rules:

json
"bypass_actors": [
  {"actor_id": 5, "actor_type": "RepositoryRole", "bypass_mode": "always"}
]

Repository Role IDs:

ID Role
1 Read
2 Triage
3 Write
4 Maintain
5 Admin

Bypass Modes:

  • always - Can always bypass the rules
  • pull_request - Can only bypass via pull request

View Rulesets

bash
# List all rulesets
gh ruleset list

# View a specific ruleset
gh api repos/{owner}/{repo}/rulesets/{ruleset_id}

# View in browser
gh ruleset view {ruleset_id} --web

Update a Ruleset

bash
gh api repos/{owner}/{repo}/rulesets/{ruleset_id} --method PUT --input - <<'EOF'
{
  "name": "Updated name",
  "enforcement": "active",
  ...
}
EOF

Delete a Ruleset

bash
gh api repos/{owner}/{repo}/rulesets/{ruleset_id} --method DELETE

Available Rule Types

Branch Rules

  • pull_request - Require pull requests before merging
  • required_status_checks - Require status checks to pass
  • commit_message_pattern - Enforce commit message format
  • commit_author_email_pattern - Enforce author email format
  • committer_email_pattern - Enforce committer email format
  • branch_name_pattern - Enforce branch naming conventions
  • non_fast_forward - Prevent force pushes
  • deletion - Prevent branch deletion
  • creation - Restrict branch creation
  • update - Restrict branch updates
  • required_linear_history - Require linear history
  • required_signatures - Require signed commits

Tag Rules

  • creation - Restrict tag creation
  • update - Prevent moving tags
  • deletion - Prevent tag deletion

Releases

bash
# Create a release
gh release create v1.0.0 --title "v1.0.0" --notes "Release notes here"

# Create release with auto-generated notes
gh release create v1.0.0 --generate-notes

# Create a draft release
gh release create v1.0.0 --draft

# List releases
gh release list

# View a release
gh release view v1.0.0

# Download release assets
gh release download v1.0.0

Pull Requests

bash
# Create a PR
gh pr create --title "Title" --body "Description"

# Create PR with template
gh pr create --fill

# List PRs
gh pr list

# View PR
gh pr view 123

# Checkout a PR locally
gh pr checkout 123

# Merge a PR
gh pr merge 123 --squash

Issues

bash
# Create an issue
gh issue create --title "Bug" --body "Description"

# List issues
gh issue list

# View issue
gh issue view 123

# Close an issue
gh issue close 123

Repository

bash
# Clone a repo
gh repo clone owner/repo

# Create a repo
gh repo create my-repo --public

# Fork a repo
gh repo fork owner/repo

# View repo in browser
gh repo view --web

Expand your agent's capabilities with these related and highly-rated skills.

SecKatie/kmtools

llm

Access and interact with Large Language Models from the command line using Simon Willison's llm CLI tool. Supports OpenAI, Anthropic, Gemini, Llama, and dozens of other models via plugins. Features include chat sessions, embeddings, structured data extraction with schemas, prompt templates, conversation logging, and tool use. This skill is triggered when the user says things like "run a prompt with llm", "use the llm command", "call an LLM from the command line", "set up llm API keys", "install llm plugins", "create embeddings", or "extract structured data from text".

0 0
Explore
SecKatie/kmtools

yt-dlp

Download audio and video from thousands of websites using yt-dlp. Feature-rich command-line tool supporting format selection, subtitle extraction, playlist handling, metadata embedding, and post-processing. This skill is triggered when the user says things like "download this video", "download from YouTube", "extract audio from video", "download this playlist", "get the mp3 from this video", "download subtitles", or "save this video locally".

0 0
Explore
SecKatie/kmtools

jira-cli

Manage Jira tickets from the command line using jira-cli. Contains essential setup instructions, non-interactive command patterns with required flags (--plain, --raw, etc.), authentication troubleshooting, and comprehensive command reference. This skill is triggered when the user says things like "create a Jira ticket", "list my Jira issues", "update Jira issue", "move Jira ticket to done", "log time in Jira", "add comment to Jira", or "search Jira issues". IMPORTANT - Read this skill before running any jira-cli commands to avoid blocking in interactive mode.

0 0
Explore
SecKatie/kmtools

jj-vcs

Jujutsu (jj) is a powerful Git-compatible version control system with innovative features like automatic rebasing, working-copy-as-a-commit, operation log with undo, and first-class conflict tracking. This skill is triggered when the user says things like "use jj", "run jj commands", "jujutsu version control", "migrate from git to jj", "jj rebase", "jj squash", "jj log", or "help with jj workflow".

0 0
Explore
SecKatie/kmtools

just

just is a handy command runner for saving and running project-specific commands. Features include recipe parameters, .env file loading, shell completion, cross-platform support, and recipes in arbitrary languages. This skill is triggered when the user says things like "create a justfile", "write a just recipe", "run just commands", "set up project automation with just", "understand justfile syntax", or "add a task to the justfile".

0 0
Explore
SecKatie/kmtools

lola-modules

Create and manage Lola modules for multi-assistant AI context distribution. Use when building portable AI skills with multi-assistant support (Claude Code, Cursor, Gemini CLI). This skill is triggered when users say "create a lola module", "build a lola skill", "write a module.yml", "add slash commands to lola", or "distribute skills to multiple assistants".

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results