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.

FieldValue
IDgithub
Categorygit
Required env varsGITHUB_TOKEN
ToolDescription
github_search_codeSearch for code in a repository using GitHub code search syntax
github_get_issueGet details of a GitHub issue by number
github_search_issuesSearch issues and pull requests across a repo or globally
github_create_issueCreate a new GitHub issue with title, body, and labels
github_create_prCreate a pull request from a head branch to a base branch
github_list_recent_commitsList recent commits on a branch (default: main)
github_get_fileGet a file’s contents from a repository at a given ref

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