MCPInstall

github-integration

Enable the GitHub CLI (gh) in Claude Code cloud sessions and GitHub Copilot coding agent environments. Use this skill when: (1) setting up a project so cloud AI agents can use gh for PRs, issues, and releases, (2) configuring setup scripts or SessionStart hooks for gh installation, (3) adding copilot-setup-steps.yml for GitHub Copilot agents, (4) troubleshooting gh auth failures in cloud sessions, or (5) configuring GHTOKEN for headless environments. Triggers on: "enable gh", "github integration", "Claude Code cloud setup", "copilot setup steps", "gh auth in cloud", "gh not working in cloud", "setup script", or any request involving GitHub CLI access from cloud-based AI coding agents.

Installs
66
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/onsager-ai/dev-skills --skill github-integration
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads github-integration automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

GitHub Integration

Enable gh CLI access in Claude Code cloud and GitHub Copilot coding agent environments so agents can create PRs, manage issues, and interact with GitHub APIs.

When to Use This Skill

Activate when:

  • User wants cloud AI agents to use gh (PRs, issues, releases, API calls)
  • User needs to install gh in Claude Code cloud sessions
  • User wants to add copilot-setup-steps.yml for GitHub Copilot agents
  • gh commands fail with auth or "not found" errors in a cloud session
  • User wants to enable GitHub integration for any cloud-based AI coding agent

Decision Tree

Which cloud environment?

Claude Code cloud (claude.ai/code)?
  → gh is NOT pre-installed in the default image
  → Install via setup script: apt update && apt install -y gh
  → Set GH_TOKEN as environment variable in environment settings
  → For repo-portable setup, use SessionStart hook instead
  → Use -R owner/repo flag with gh due to sandbox proxy

GitHub Copilot coding agent?
  → Add .github/copilot-setup-steps.yml to the repo
  → gh IS pre-installed; just configure GH_TOKEN
  → Commit and push — agent sessions pick it up automatically

gh commands failing?
  → "command not found" → gh not installed; add to setup script
  → HTTP 401 → GH_TOKEN not set; add to environment variables
  → HTTP 403 → Token lacks required scope; check permissions
  → "could not determine repo" → Use -R owner/repo flag
  → See references/cloud-auth.md for more

Need gh in local dev too?
  → Run: gh auth login (interactive, browser-based)
  → Or set GH_TOKEN env var for headless/CI use

Two Environments, Two Approaches

Claude Code Cloud (claude.ai/code)

Claude Code cloud runs sessions in Anthropic-managed VMs. The gh CLI is not pre-installed. You need two things:

  1. Setup script — installs gh when the session starts
  2. GH_TOKEN env var — authenticates gh with your GitHub PAT

Quick Start: Setup Script

In the Claude Code web UI: Environment Settings → Setup script:

#!/bin/bash
apt update && apt install -y gh

Then add GH_TOKEN as an environment variable with your GitHub Personal Access Token (needs repo scope).

Alternative: SessionStart Hook (repo-portable)

Add to .claude/settings.json in your repo:

{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "if [ \"$CLAUDE_CODE_REMOTE\" = \"true\" ]; then apt update && apt install -y gh; fi",
            "timeout": 120
          }
        ]
      }
    ]
  }
}

The CLAUDE_CODE_REMOTE check ensures it only runs in cloud sessions.

Important: The -R Flag

Due to the sandbox proxy, gh may not auto-detect the repo. Use the -R owner/repo flag:

gh pr create -R codervisor/myrepo --title "..." --body "..."
gh issue list -R codervisor/myrepo

GitHub Copilot Coding Agent

Copilot coding agents use .github/copilot-setup-steps.yml. The gh CLI is pre-installed; you just need to authenticate it.

Add this file at .github/copilot-setup-steps.yml:

name: "Copilot Setup Steps"

on: repository_dispatch

jobs:
  copilot-setup-steps:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Authenticate gh CLI
        run: gh auth status
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

See templates/copilot-setup-steps.yml for a full template with dependency installation.

Setup Scripts vs SessionStart Hooks vs copilot-setup-steps

Setup scriptsSessionStart hookscopilot-setup-steps.yml
PlatformClaude Code cloud onlyClaude Code (local + cloud)GitHub Copilot agents only
Configured inEnvironment settings UI.claude/settings.json in repo.github/copilot-setup-steps.yml
RunsBefore Claude launchesAfter Claude launchesBefore Copilot agent launches
Runs on resumeNo (new sessions only)Yes (every session)Yes
NetworkNeeds registry accessNeeds registry accessFull GitHub Actions network

Common gh Commands for Agents

# PRs (use -R in Claude Code cloud)
gh pr create -R owner/repo --title "..." --body "..."
gh pr list -R owner/repo
gh pr view -R owner/repo
gh pr merge -R owner/repo --squash --delete-branch

# Issues
gh issue list -R owner/repo
gh issue view 42 -R owner/repo
gh issue create -R owner/repo --title "..." --body "..."

# API (for anything not covered by subcommands)
gh api repos/owner/repo/actions/runs

Pitfalls

SymptomCauseFix
gh: command not foundNot installed (Claude Code cloud)Add apt install -y gh to setup script
HTTP 401 / auth errorGH_TOKEN not setAdd to environment variables in settings UI
HTTP 403 on pushToken lacks repo scopeRegenerate PAT with repo scope
could not determine repoSandbox proxy hides git remoteUse -R owner/repo flag
gh pr create failsNo upstream branchPush with git push -u origin <branch> first
Setup script failsNo network accessSet network to "Limited" (default) or "Full"

References

  • references/cloud-auth.md — Token auth, scopes, proxy details, troubleshooting
  • references/copilot-setup-steps.md — Full guide to customizing the Copilot setup workflow

Setup & Activation

npx skills add -g onsager-ai/dev-skills --skill github-integration -a claude-code -y

Auto-activates when: user mentions "gh in cloud", "github integration", "setup script", "copilot setup steps", or gh auth failures in cloud environments.

FAQ

What does the github-integration skill do?

Enable the GitHub CLI (gh) in Claude Code cloud sessions and GitHub Copilot coding agent environments. Use this skill when: (1) setting up a project so cloud AI agents can use gh for PRs, issues, and releases, (2) configuring setup scripts or SessionStart hooks for gh installation, (3) adding copilot-setup-steps.yml for GitHub Copilot agents, (4) troubleshooting gh auth failures in cloud sessions, or (5) configuring GHTOKEN for headless environments. Triggers on: "enable gh", "github integration", "Claude Code cloud setup", "copilot setup steps", "gh auth in cloud", "gh not working in cloud", "setup script", or any request involving GitHub CLI access from cloud-based AI coding agents.

How do I install github-integration?

Run npx skills add https://github.com/onsager-ai/dev-skills --skill github-integration in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/github-integration/ (personal) or .claude/skills/github-integration/ (project).

Which AI agents can use github-integration?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is github-integration safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains github-integration?

It is published by onsager-ai in onsager-ai/dev-skills. It has 66 recorded installs.

More from onsager-ai/dev-skills

View all →

codegraph

onsager-ai/dev-skills

Pre-indexed code knowledge graph (MCP, SQLite + tree-sitter) for faster, lower-token exploration of brownfield codebases. Use when starting work on a repo larger than 500 files or when the task involves cross-file traversal — "where is X used", "what calls Y", "what breaks if I change Z", "trace flow from A to B", "explain this subsystem". Skip for single-file edits or sessions shorter than the cold-start cost. Triggers include "codegraph", "code graph", "index this repo", "where is X defined", "find callers of", "callees of", "blast radius of changing X", "explore this codebase". Cuts the grep + Read loops needed to orient, via O(1) SQLite lookups and FTS5 search over 8 MCP tools — but it's an unsound tree-sitter approximation, so grep stays the completeness backstop for renames/exhaustive callers.

Data & Databases819 installs

git-commit

onsager-ai/dev-skills

Best practices for creating clean, atomic git commits with good messages. Use when: (1) staging and committing changes, (2) writing commit messages, (3) deciding what to group in a single commit, (4) handling pre-commit hook failures, (5) choosing between amend and new commit. Triggers on "commit", "stage", "git add", "write a commit message", or "commit my changes".

web-testing

onsager-ai/dev-skills

Open the skill to read its SKILL.md instructions.

Testing & QA61 installs

issue-spec

onsager-ai/dev-skills

Create or revise a focused specification issue when explicitly requested or required by the repository contribution policy. Discover existing work, capture intent and acceptance criteria, and reconcile decisions before implementation.

rust-npm-publish

onsager-ai/dev-skills

Publish Rust binaries to npm using the optionalDependencies platform package pattern. Covers the full publish pipeline, version sync, workspace: protocol, and platform package architecture. Use when: (1) publishing Rust binaries to npm, (2) setting up the platform package pattern (main + per-OS packages), (3) debugging publish failures, (4) managing version sync across pnpm + Cargo workspaces, (5) working with workspace: protocol. Triggers on "publish", "platform packages", "optionalDependencies", "bin.js", "version sync", "workspace protocol", "npm tag", or "prepare-publish".

Backend & APIs61 installs

rust-node-ci

onsager-ai/dev-skills

Open the skill to read its SKILL.md instructions.

Backend & APIs61 installs

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs