SKILL.md
Mode: Cognitive/Prompt-Driven — No standalone utility script; use via agent context.
GitHub Skill
Overview
This skill provides access to the official GitHub MCP server with progressive disclosure for optimal context usage.
Context Savings: ~95% reduction
- MCP Mode: ~50,000 tokens always loaded (80+ tools)
- Skill Mode: ~500 tokens metadata + on-demand loading
Requirements
- Docker installed and running
GITHUBPERSONALACCESS_TOKENenvironment variable set
Toolsets
The server provides 80+ tools across 19 toolsets:
| Toolset | Description |
|---|---|
actions |
Workflow management, runs, jobs, artifacts |
code_security |
Scanning alerts, code analysis |
discussions |
Forum interactions |
gists |
Code snippets management |
issues |
Issue creation, updates, commenting |
labels |
Label management and filtering |
projects |
GitHub Projects board management |
pull_requests |
PR creation, review, merging |
repos |
Code search, commits, releases, branches |
users |
User search and management |
orgs |
Organization and team management |
notifications |
Notification management |
secret_scanning |
Secret scanning alerts |
context |
Context about the user |
Quick Reference
Use the gh CLI for GitHub operations:
# Get repository info
gh repo view anthropics/claude-code
# List issues
gh issue list --repo anthropics/claude-code
# Search code
gh search code "language:python MCP"
# Create issue
gh issue create --repo me/myrepo --title "Bug" --body "Description"
# List pull requests
gh pr list --repo anthropics/claude-code
Common Tools (Default Toolsets: 40 tools)
Repository Operations
search_repositories- Search for repositoriescreate_repository- Create a new repositoryfork_repository- Fork a repositorylist_commits- List repository commitsget_commit- Get commit detailsgetfilecontents- Get file contents from a repositorycreateorupdate_file- Create or update a filedelete_file- Delete a filepush_files- Push multiple filessearch_code- Search for code across GitHublist_branches- List repository branchescreate_branch- Create a new branchlist_tags- List repository tagsget_tag- Get tag detailslist_releases- List releasesgetlatestrelease- Get latest releasegetreleaseby_tag- Get release by tag
Issue Operations
list_issues- List repository issuesissue_read- Read issue detailsissue_write- Create/update issuesaddissuecomment- Add a comment to an issuesearch_issues- Search for issueslistissuetypes- List issue types (for organizations)get_label- Get label detailssubissuewrite- Manage sub-issuesassigncopilotto_issue- Assign Copilot to an issue
Pull Request Operations
listpullrequests- List repository pull requestspullrequestread- Read PR detailscreatepullrequest- Create a new PRupdatepullrequest- Update a PRupdatepullrequest_branch- Update PR branchmergepullrequest- Merge a PRsearchpullrequests- Search for pull requestspullrequestreview_write- Create/submit PR reviewsaddcommenttopendingreview- Add comments to pending reviewrequestcopilotreview- Request Copilot review
User & Team Operations
get_me- Get current authenticated usersearch_users- Search for usersget_teams- Get organization teamsgetteammembers- Get team members
Configuration
The skill uses Docker to run the official GitHub MCP server:
- Image:
ghcr.io/github/github-mcp-server - Auth:
GITHUBPERSONALACCESS_TOKENenvironment variable
Environment Variables
| Variable | Required | Description |
|---|---|---|
GITHUBPERSONALACCESS_TOKEN |
Yes | GitHub PAT for authentication |
GITHUB_HOST |
No | For GitHub Enterprise (default: github.com) |
GITHUB_TOOLSETS |
No | Comma-separated toolsets to enable |
GITHUBREADONLY |
No | Set to 1 for read-only mode |
Limiting Toolsets
When using MCP, configure toolsets via environment variables:
# Only repos and issues
GITHUB_TOOLSETS=repos,issues
# Only pull requests and code security
GITHUB_TOOLSETS=pull_requests,code_security
Error Handling
If operations fail:
- Verify Docker is running:
docker ps - Check GitHub token is set:
echo $GITHUBPERSONALACCESS_TOKEN - Ensure token has required permissions for the operation
- Use
gh auth statusto verify authentication
Related
- Official GitHub MCP Server: <https://github.com/github/github-mcp-server>
- GitHub API Documentation: <https://docs.github.com/en/rest>
Memory Protocol (MANDATORY)
Before starting: Read .claude/context/memory/learnings.md
After completing:
- New pattern ->
.claude/context/memory/learnings.md - Issue found ->
.claude/context/memory/issues.md - Decision made ->
.claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.