Agent skill

GitHub

by OpenHands in OpenHands/extensions

Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUBTOKEN environment variable and GitHub CLI.

MITAuto-check passedDevelopment

Install GitHub

skills CLI
$ npx skills add OpenHands/extensions --skill github -a claude-code

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

GitHub CLI
$ gh skill install OpenHands/extensions github --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/OpenHands/extensions.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/github .claude/skills/github && 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
github
GitHub stars
157
Token cost
~1.7k tokens
SKILL.md length
785 words
Files
8 (incl. scripts, references)
Skills in repo
78
Repo updated
First seen
Licence
MIT

At a glance

Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUBTOKEN environment variable and GitHub CLI.

  • Works in 2 steps: Request the merge (merge_action: default… → A 202 returns details.uuid; poll it…
  • Working with code hosted on GitHub
  • SKILL.md covers Connection selection, Merging Pull Requests (async…, Handling Review Comments and Resolving Review Threads via…
  • Runs Python scripts from its folder; calls gh and git; reaches github.com; needs GITHUB_TOKEN

What it does

GitHub is an agent skill from OpenHands/extensions. Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUBTOKEN environment variable and GitHub CLI. Use when working with code hosted on GitHub or managing GitHub resources.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts and reference files (for example `.plugin/plugin.json`, `README.md` and `references/windows.md`).

It sits in Development, covering Pull requests and Secrets management. It works with GitHub. The repository describes itself as: Public registry for OpenHands extensions. The licence is MIT.

When your agent uses it

  • Working with code hosted on GitHub
  • Managing GitHub resources

Example prompts

  • “/github”

Requirements

  • Python 3
  • A credential in GITHUB_TOKEN

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Request the merge (merge_action: default uses the merge queue if the branch has one, else merges directly; or direct_merge / merge_queue)…
  2. A 202 returns details.uuid; poll it every few seconds until status is no longer pending

What it can do on your machine

Read from SKILL.md and the folder at commit d008b81. 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

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • gh
    • git

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    Also links to:

    • cli.github.com
    • docs.github.com

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GITHUB_TOKEN

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

Context cost

GitHub loads about 1.7k tokens when it runs, and up to ~1.9k if it reads all its reference files. Until then it costs about 53 tokens; SKILL.md has 785 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
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); the scripts in this folder are not scanned.

SKILL.md

The full file from OpenHands/extensions at commit d008b81, republished under its MIT licence (© OpenHands). 785 words, ~1,656 tokens.

Download SKILL.mdSave it as .claude/skills/github/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
github
description
Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUB_TOKEN environment variable and GitHub CLI. Use when working with code hosted on GitHub or managing GitHub resources.
triggers
github

Connection selection

Use authenticated GitHub MCP tools first when they are available in the agent's environment. Detect this by tool availability, without depending on a particular MCP server name. Use the token and direct API instructions below only when GitHub MCP tools are unavailable or when raw API or curl access is explicitly needed.

You have access to an environment variable, GITHUB_TOKEN, which allows you to interact with the GitHub API.

<IMPORTANT>
You can use `curl` with the `GITHUB_TOKEN` to interact with GitHub's API.
ALWAYS use the GitHub API for operations instead of a web browser.
ALWAYS use the `create_pr` tool to open a pull request
If the user asks you to check GitHub Actions status, first try to use `gh` to work with workflows, and only fallback to basic API calls if that fails.
Examples:
- `gh run watch` (https://cli.github.com/manual/gh_run_watch) to monitor workflow runs
- `gh pr checks 200 --watch --interval 10` to check until completed.
</IMPORTANT>

Windows PowerShell equivalents for the multi-line shell snippets below are in references/windows.md.

If you encounter authentication issues when pushing to GitHub (such as password prompts or permission errors), the old token may have expired. In such case, update the remote URL to include the current token: git remote set-url origin https://${GITHUB_TOKEN}@github.com/username/repo.git

Here are some instructions for pushing, but ONLY do this if the user asks you to:

  • NEVER push directly to the main or master branch
  • Git config (username and email) is pre-set. Do not modify.
  • You may already be on a branch starting with openhands-workspace. Create a new branch with a better name before pushing.
  • Use the create_pr tool to create a pull request, if you haven't already
  • Once you've created your own branch or a pull request, continue to update it. Do NOT create a new one unless you are explicitly asked to. Update the PR title and description as necessary, but don't change the branch name.
  • Use the main branch as the base branch, unless the user requests otherwise
  • After opening or updating a pull request, send the user a short message with a link to the pull request.
  • Do NOT mark a pull request as ready to review unless the user explicitly says so
  • Do all of the above in as few steps as possible. E.g. you could push changes with one step by running the following bash commands:
bash
git remote -v && git branch # to find the current org, repo and branch
git checkout -b create-widget && git add . && git commit -m "Create widget" && git push -u origin create-widget
Show full SKILL.md (396 more words)Show less

Merging Pull Requests (async merge API)

IMPORTANT: Only merge if the user asks you to, without ambiguity.

GitHub released an async merge API in October 2026; it is now the recommended way to merge PRs programmatically, and the only merge API that supports stacked PRs. It can also add a PR to a merge queue. Prefer it over PUT .../pulls/{n}/merge and the GraphQL mergePullRequest mutation. A GitHub MCP merge tool may still use the older synchronous endpoint; for stacked PRs or merge queues, use the calls below. Docs: https://docs.github.com/en/rest/pulls/pulls#merge-a-pull-request-asynchronously

  1. Request the merge (merge_action: default uses the merge queue if the branch has one, else merges directly; or direct_merge / merge_queue). merge_method, commit_title and commit_message apply only to direct merges:
bash
gh api -X PUT repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/merge-async -f merge_method=squash -f sha=<HEAD_SHA>
  1. A 202 returns details.uuid; poll it every few seconds until status is no longer pending:
bash
gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/merge-async/<UUID>

Final status is merged, enqueued (added to the merge queue, NOT merged yet), or failed (see details.message). A 200 on the PUT means the PR is already merged or queued; a 409 means a merge request is already pending (its UUID is returned).

Handling Review Comments

  • Critically evaluate each review comment before acting on it. Not all feedback is worth implementing:
    • Does it fix a real bug or improve clarity significantly?
    • Does it align with the project's engineering principles (simplicity, maintainability)?
    • Is the suggested change proportional to the benefit, or does it add unnecessary complexity?
  • It's acceptable to respectfully decline suggestions that add verbosity without clear benefit, over-engineer for hypothetical edge cases, or contradict the project's pragmatic approach.
  • After addressing (or deciding not to address) inline review comments, mark the corresponding review threads as resolved.
  • Before resolving a thread, leave a reply comment that either explains the reason for dismissing the feedback or references the specific commit (e.g., commit SHA) that addressed the issue.
  • Prefer resolving threads only once fixes are pushed or a clear decision is documented.
  • Use the GitHub GraphQL API to reply to and resolve review threads (see below).
  • After making changes to a PR, verify the title and description still match the content. Update them if the scope, features, or intent changed.

Resolving Review Threads via GraphQL

To resolve existing review threads programmatically:

  1. Get the thread IDs (replace <OWNER>, <REPO>, <PR_NUMBER>):
bash
gh api graphql -f query='
{
  repository(owner: "<OWNER>", name: "<REPO>") {
    pullRequest(number: <PR_NUMBER>) {
      reviewThreads(first: 20) {
        nodes {
          id
          isResolved
          comments(first: 1) {
            nodes { body }
          }
        }
      }
    }
  }
}'
  1. Reply to the thread explaining how the feedback was addressed:
bash
gh api graphql -f query='
mutation {
  addPullRequestReviewThreadReply(input: {
    pullRequestReviewThreadId: "<THREAD_ID>"
    body: "Fixed in <COMMIT_SHA>"
  }) {
    comment { id }
  }
}'
  1. Resolve the thread:
bash
gh api graphql -f query='
mutation {
  resolveReviewThread(input: {threadId: "<THREAD_ID>"}) {
    thread { isResolved }
  }
}'
  1. Get the failed workflow run ID and rerun it:
bash
# Find the run ID from the failed check URL, or use:
gh run list --repo <OWNER>/<REPO> --branch <BRANCH> --limit 5

# Rerun failed jobs
gh run rerun <RUN_ID> --repo <OWNER>/<REPO> --failed

© OpenHands, 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 7 other files (scripts, references) in skills/github of OpenHands/extensions.

  • SKILL.md
  • .claude-plugin
  • .codex-plugin
  • .plugin/plugin.json
  • README.md
  • references/windows.md
  • scripts/agent_conversation.py
  • scripts/github_client.py

Open the folder on GitHubat commit d008b81

Compare with similar skills

GitHub 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.

GitHub compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
GitHub this skillOpenHands/extensions157—~1.7kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Check PRonyx-dot-app/onyx32k2 repos~2.3kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Pull Request Title and Body Writeropeninterpreter/openinterpreter69k2 repos~1.1kAutomated 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
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Runs a loop on a GitHub pull request: fetch review state, triage comments into actions, implement them and resolve threads, repeating until nothing actionable is left.

    48k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed

More from OpenHands/extensions

All 78 skills in this repo
  • Agent Readiness Report

    OpenHands/extensions

    Evaluate how well a codebase supports autonomous AI-assisted development.

    157 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Discord

    OpenHands/extensions

    Build and automate Discord integrations (bots, webhooks, slash commands, and REST API workflows).

    157 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • GitHub Issue To PR

    OpenHands/extensions

    Create an automation that implements GitHub issues when a configurable trigger label is applied.

    157 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • GitHub Repo Monitor

    OpenHands/extensions

    This skill should be used when the user asks to "monitor a GitHub repository", "watch GitHub for issues or PRs", "respond to @OpenHands mentions on GitHub", "set up an OpenHands GitHub integration"…

    157 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • GitLab Issue To Mr

    OpenHands/extensions

    Create an automation that implements GitLab issues when a configurable trigger label is applied.

    157 GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Jira Issue To PR

    OpenHands/extensions

    This skill should be used when the user asks to "set up a Jira automation to create pull requests", "poll Jira for create-pr issues", "automatically create GitHub PRs from Jira tickets", "deploy a…

    157 GitHub stars~4.1k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about GitHub

What does GitHub do?

Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUBTOKEN environment variable and GitHub CLI. GitHub is an agent skill from OpenHands/extensions. Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUBTOKEN environment variable and GitHub CLI.

When should I use GitHub?

GitHub fits situations like: working with code hosted on GitHub; managing GitHub resources.

How do I install GitHub in Claude Code?

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

How do I install GitHub in Codex?

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

Can I use GitHub 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 OpenHands/extensions --skill github -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/github, .gemini/skills/github, .github/skills/github and .opencode/skills/github in your project.

What does GitHub need to run?

Going by SKILL.md and its folder, GitHub needs Python for the scripts in its folder, the command-line tools its instructions call (gh and git) and credentials named GITHUB_TOKEN. Our summary lists: Python 3; A credential in GITHUB_TOKEN.

Does GitHub access the network?

SKILL.md names 3 domains. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. As links in the text: cli.github.com and docs.github.com. This is read from the text; nothing was executed.

Is GitHub 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does GitHub use?

GitHub 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 GitHub use?

About 1.7k tokens (SKILL.md is roughly 6.6k 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 261 tokens, read only when the agent opens those files.

What are the alternatives to GitHub?

Skills that share tags, products or a category with GitHub: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Check PR (onyx-dot-app/onyx, 32k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Create Pull Request (cline/cline, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains GitHub?

OpenHands (a GitHub organization) maintains it in OpenHands/extensions, which has 157 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on October 6, 2026.

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