Skip to content

GitHub

The GitHub skill gives Claude access to repositories, issues, pull requests, and code search. It covers both source control and issue tracking, making it the most widely used skill across built-in workflows.

Field Value
ID github
Category git
Required env vars GITHUB_TOKEN
Tool Description
github_search_code Search for code in a repository using GitHub code search syntax
github_get_issue Get details of a GitHub issue by number
github_search_issues Search issues and pull requests across a repo or globally
github_list_issues List a repo’s most recently created issues, newest first
github_list_issue_comments List comments on an issue or PR, optionally since a time
github_create_issue Create a new GitHub issue with title, body, and labels
github_create_pr Create a pull request from a head branch to a base branch
github_add_labels Add labels to an issue or pull request (also applies label safe outputs)
github_set_issue_state Reopen a closed issue or pull request, or close an open one (also applies issue_state safe outputs)
github_list_recent_commits List recent commits on a branch (default: main)
github_get_file Get a file’s contents from a repository at a given ref
github_list_pr_files List the files changed in a pull request with status and line counts (read-only)
github_list_dependabot_alerts List open Dependabot alerts: package, severity, advisory id, patched version (read-only; needs a token with Dependabot alerts access, not the built-in Actions token)

The GitHub skill requires a personal access token (PAT) or GitHub App installation token.

  1. Go to GitHub Settings > Developer settings > Personal access tokens > Fine-grained tokens.
  2. Create a token scoped to the repositories SWEny will access.
  3. Grant these permissions:
    • Contents: Read and write (for code search, file reads, and commits)
    • Issues: Read and write (for issue search and creation)
    • Pull requests: Read and write (for PR creation)
    • Metadata: Read-only (required by default)
  4. Set the environment variable:
Terminal window
export GITHUB_TOKEN="github_pat_..."

In a GitHub Actions workflow, the built-in GITHUB_TOKEN is automatically available:

env:
GITHUB_TOKEN: ${{ github.token }}

For cross-repository access, use a PAT or GitHub App token instead.

The GitHub skill appears in nearly every node of the built-in workflows:

Triage workflow:

  • gather — Search code and recent commits to understand what changed
  • investigate — Read source files to correlate errors with code
  • create_issue — File an issue when no existing ticket covers the problem

Implement workflow:

  • analyze — Fetch the issue and read relevant source files
  • implement — Create a branch and commit the fix
  • create_pr — Open a pull request referencing the original issue
  • skip — Comment on the issue if the fix is too complex