Agent skill

Gh Infra

by babarot in babarot/gh-infra

Overview of gh-infra and command workflow (import, validate, plan, apply).

MITAuto-check passed

Install Gh Infra

skills CLI
$ npx skills add babarot/gh-infra --skill gh-infra -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install babarot/gh-infra gh-infra --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/babarot/gh-infra.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/gh-infra .claude/skills/gh-infra && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gh-infra
GitHub stars
136
Token cost
~1.1k tokens
SKILL.md length
352 words
Files
3 (incl. references)
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Overview of gh-infra and command workflow (import, validate, plan, apply).

  • Managing GitHub repository settings
  • SKILL.md covers Use This Skill For, Related Skills, Resource Selection and Command Workflow, plus 4 more sections
  • Calls gh
  • Actions settings

What it does

Gh Infra is an agent skill from babarot/gh-infra. Overview of gh-infra and command workflow (import, validate, plan, apply). Use when managing GitHub repository settings, labels, actions settings, rulesets, secrets, variables, or files declaratively via YAML manifests.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/commands.md` and `references/patterns.md`).

It works with GitHub. The repository describes itself as: Declarative GitHub infrastructure management via YAML. The licence is MIT.

When your agent uses it

  • Managing GitHub repository settings
  • Actions settings
  • Files declaratively via YAML manifests

Example prompts

  • “/gh-infra”

What it can do on your machine

Read from SKILL.md and the folder at commit 11bab7d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gh Infra loads about 1.1k tokens when it runs, and up to ~1.9k if it reads all its reference files. Until then it costs about 57 tokens; SKILL.md has 352 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from babarot/gh-infra at commit 11bab7d, republished under its MIT licence (© babarot). 352 words, ~1,077 tokens.

Download SKILL.mdSave it as .claude/skills/gh-infra/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
gh-infra
description
Overview of gh-infra and command workflow (import, validate, plan, apply). Use when managing GitHub repository settings, labels, actions settings, rulesets, secrets, variables, or files declaratively via YAML manifests.

gh-infra

gh-infra is a declarative GitHub infrastructure tool for repository settings and managed files.

Use this skill to choose the right resource kind, command flow, and operating pattern. Use the related skills for schema details.

Key characteristics:

  • No state file. GitHub is the source of truth.
  • Selective management. Omitted fields are left untouched.
  • Four resource kinds: Repository, RepositorySet, File, FileSet.
  • Supports both bootstrap import and reverse import into existing manifests.

Use This Skill For

  • Choosing between Repository / RepositorySet / File / FileSet
  • Running import, validate, plan, and apply
  • Picking a central-management vs self-managed repo layout
  • Finding the right manifest skill for a concrete edit
  • Routing import --into work to the dedicated skill
TaskSkill
Write/edit Repository or RepositorySet YAMLrepository-manifest
Write/edit File or FileSet YAMLfile-manifest
Set up CI workflows and authci-cd
Pull live GitHub state back into existing manifestsimport-into

Resource Selection

Use:

  • Repository for one repository's settings in one file
  • RepositorySet for many repositories with shared defaults
  • File for files in one repository
  • FileSet for distributing shared files to many repositories

Every manifest starts with apiVersion and kind.

Single-repo resources:

yaml
apiVersion: gh-infra/v1
kind: Repository
metadata:
  owner: <github-owner>
  name: <repo-name>
spec:
  # ...

Set resources:

yaml
apiVersion: gh-infra/v1
kind: RepositorySet
metadata:
  owner: <github-owner>    # no "name" field
defaults:                   # RepositorySet: shared defaults
  spec: { ... }
repositories:               # RepositorySet: per-repo entries
  - name: <repo-name>
    spec: { ... }
yaml
apiVersion: gh-infra/v1
kind: FileSet
metadata:
  owner: <github-owner>    # no "name" field
spec:
  repositories: [...]       # FileSet: target repos
  files: [...]              # FileSet: files to distribute

A single YAML file can contain multiple ----separated documents. Anchors do not cross document boundaries.

Command Workflow

Default workflow:

text
import -> edit YAML -> validate -> plan -> apply
import

Bootstrap a manifest from live GitHub state:

bash
gh infra import <owner/repo>
Show full SKILL.md (140 more words)Show less
validate

Validate syntax and schema without contacting GitHub:

bash
gh infra validate [path...]
plan

Show diff against live GitHub state:

bash
gh infra plan [path...]

Use --ci for drift-detection workflows.

apply

Apply changes to GitHub:

bash
gh infra apply [path...]

Use --auto-approve in CI. --force-secrets re-sends all declared secrets.

Path Behavior

For validate, plan, and apply:

  • No argument or .: read *.yaml and *.yml in the current directory
  • File path: read that file only
  • Directory path: read top-level *.yaml and *.yml only
  • Multiple paths: gh infra plan ./repos/ ./files/ — manifests from all paths are combined
  • Overlapping paths (e.g., . and ./repos/) are rejected
  • Subdirectories are not scanned
  • Unknown YAML kinds are skipped unless --fail-on-unknown is set

Common Patterns

  • Central management repo: keep org-wide manifests in repos/ and files/
  • Self-managed repo: keep one manifest inside the managed repository and auto-apply on merge

Read references/patterns.md for layout guidance.

Example Multi-Doc File

yaml
apiVersion: gh-infra/v1
kind: Repository
metadata:
  owner: my-org
  name: my-repo
spec:
  visibility: public
---
apiVersion: gh-infra/v1
kind: File
metadata:
  owner: my-org
  name: my-repo
spec:
  files:
    - path: .github/CODEOWNERS
      content: |
        * @username
  via: push

© babarot, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/gh-infra of babarot/gh-infra.

  • SKILL.md
  • references/commands.md
  • references/patterns.md

Open the folder on GitHubat commit 11bab7d

Compare with similar skills

Gh Infra next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gh Infra compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gh Infra this skillbabarot/gh-infra136—~1.1kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Greplooponyx-dot-app/onyx32k4 repos~3.3kAutomated safety check: PassMIT
GitHub Deep Researchbytedance/deer-flow84k4 repos~1.3kAutomated safety check: PassMIT
Diagnosing Superpowers Sessionsobra/superpowers297k3 repos~1.7kAutomated safety check: PassMIT
Update V8 Versionopeninterpreter/openinterpreter69k2 repos~845Automated safety check: PassApache-2.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed
  • GitHub Deep Research

    bytedance/deer-flow

    Researches a GitHub repository over four rounds using the GitHub API and web search, then writes a structured markdown report with timeline, metrics and Mermaid diagrams.

    84k GitHub starsUsed in 4 repos~1.3k tokens
    Research & ScienceAuto-check passed
  • Investigates a session where Superpowers went wrong, reads the transcripts on disk and produces an evidence-cited report, optionally prepared as a bug report for the maintainers.

    297k GitHub starsUsed in 3 repos~1.7k tokens
    Agent WorkflowsAuto-check passed
  • Update V8 Version

    openinterpreter/openinterpreter

    Bumps the pinned v8 and rusty_v8 versions in Codex, validates the release-candidate path with the v8-canary check, and traces failures to upstream build changes.

    69k GitHub starsUsed in 2 repos~845 tokens
    DevOps & CloudAuto-check passed
  • Last30days

    mvanhorn/last30days-skill

    Research what people actually say about any topic in the last 30 days.

    64k GitHub stars~7.9k tokensUpdated today
    Research & ScienceAuto-check: notes

More from babarot/gh-infra

  • File Manifest

    babarot/gh-infra

    Complete YAML schema reference for File and FileSet resources.

    136 GitHub stars~793 tokensUpdated today
    Auto-check passed
  • Import Into

    babarot/gh-infra

    A skill your agent uses when pulling live GitHub state back into existing gh-infra manifests with gh infra import --into, especially for write/patch/skip decisions, shared file sources…

    136 GitHub stars~746 tokensUpdated today
    Auto-check passed
  • Repository Manifest

    babarot/gh-infra

    Complete YAML schema reference for Repository and RepositorySet resources.

    136 GitHub stars~914 tokensUpdated today
    Auto-check passed
  • Vhs Demo

    babarot/gh-infra

    A skill your agent uses when running demo recordings, diagnosing recording failures, or regenerating GIFs from existing MP4s.

    136 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Vhs Tape Authoring

    babarot/gh-infra

    A skill your agent uses when creating new VHS demo tapes or editing existing ones.

    136 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • CI CD

    babarot/gh-infra

    CI/CD integration patterns for gh-infra: auto-apply on merge, scheduled drift detection, self-managed vs central-management layouts, and authentication setup for GitHub Actions workflows.

    136 GitHub stars~482 tokensUpdated today
    Auto-check passed

Works with

Questions about Gh Infra

What does Gh Infra do?

Overview of gh-infra and command workflow (import, validate, plan, apply). Gh Infra is an agent skill from babarot/gh-infra. Overview of gh-infra and command workflow (import, validate, plan, apply).

When should I use Gh Infra?

Gh Infra fits situations like: managing GitHub repository settings; actions settings; files declaratively via YAML manifests.

How do I install Gh Infra in Claude Code?

Run `npx skills add babarot/gh-infra --skill gh-infra -a claude-code`. Or copy the skill folder (skills/gh-infra in babarot/gh-infra) into .claude/skills/gh-infra in your project. Claude Code loads it when a task matches its description.

How do I install Gh Infra in Codex?

Run `npx skills add babarot/gh-infra --skill gh-infra -a codex`. Or copy the skill folder (skills/gh-infra in babarot/gh-infra) into .agents/skills/gh-infra in your project. Codex loads it when a task matches its description.

Can I use Gh Infra in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add babarot/gh-infra --skill gh-infra -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gh-infra, .gemini/skills/gh-infra, .github/skills/gh-infra and .opencode/skills/gh-infra in your project.

What does Gh Infra need to run?

Going by SKILL.md and its folder, Gh Infra needs the command-line tools its instructions call (gh).

Does Gh Infra access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Gh Infra safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gh Infra use?

Gh Infra is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gh Infra use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 788 tokens, read only when the agent opens those files.

What are the alternatives to Gh Infra?

Skills that share tags, products or a category with Gh Infra: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Greploop (onyx-dot-app/onyx, 32k stars), GitHub Deep Research (bytedance/deer-flow, 84k stars) and Diagnosing Superpowers Sessions (obra/superpowers, 297k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gh Infra?

babarot (a GitHub user) maintains it in babarot/gh-infra, which has 136 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 10, 2026.

Source: babarot/gh-infra on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.