gh

Provision GitHub org repositories and probe fine-grained personal access tokens.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/spinlockdevelopment/dev-setup --skill gh-spinlockdevelopment
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh
Source: https://github.com/spinlockdevelopment/dev-setup/tree/main/plugins/spindev-core/skills/gh
Command: npx skills add https://github.com/spinlockdevelopment/dev-setup --skill gh-spinlockdevelopment

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, python3, curl, and includes scripts (resource) components.

What problem does it solve?

This Skill removes uncertainty and friction when provisioning GitHub organization repositories, configuring branch protection, and creating or verifying fine-grained personal access tokens so admins and automation avoid opaque 403 errors and misconfigured protections.

Core Features & Use Cases

  • Fine-grained PAT guidance: Walkthrough and scripts to create tokens with the precise repository-administration permissions required for org repo creation.
  • Idempotent org repo creation: Create or skip existing private repos in an org with safe defaults.
  • Organization-level rulesets & triage: Apply an org-level ruleset to protect main/staging/prod, detect plan gating (Team required), and probe tokens to diagnose "Resource not accessible by personal access token" 403s.

Quick Start

Use the gh skill to create a fine-grained PAT targeted at your organization and run the probe-token check to verify repo creation and ruleset access.

Frequently Asked Questions about gh

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

FAQPage Schema
Why does my personal access token get a 'Resource not accessible' 403 error when creating a GitHub organization repository?

A 'Resource not accessible by personal access token' 403 error during GitHub org repo creation means your fine-grained PAT lacks the precise repository-administration permissions. You must probe and verify the token's capabilities using the GH CLI and curl before attempting provisioning.

How do I apply organization-level rulesets for branch protection to main and staging branches?

To apply organization-level rulesets for branch protection, use the gh CLI to target your org and enforce protections on main, staging, and prod branches. This Skill automates ruleset application while detecting if your GitHub plan requires a Team tier upgrade.

Do I need a GitHub Team plan to use organization-level rulesets for branch protection?

Yes, applying organization-level rulesets for branch protection often requires a GitHub Team plan. This Skill detects plan gating requirements during ruleset application and triages any related access failures to ensure your branch protection rules apply successfully.

What is the best way to automate idempotent private repository creation in a GitHub organization?

The best way to automate idempotent private repo creation in a GitHub org is using the gh CLI with safe defaults to create new repositories or skip existing ones. This prevents duplicate repos and ensures non-destructive provisioning for your automation workflows.

How do I check if my fine-grained personal access token has the correct permissions for repo management?

You can check your fine-grained personal access token's repo management permissions by running a non-destructive capability probe. This Skill uses python3, curl, and the GH CLI to verify token access and diagnose 403 errors before you attempt org-level changes.