OneKey Gateway
Use One Access Key to connect to various commercial APIs. Please visit the OneKey Gateway Keys and read the docs OneKey MCP Router Doc and OneKey Gateway Doc.
github Skill
Use the OneKey Gateway to access tools for this server via a unified access key.
Quick Start
Set your OneKey access key:
export DEEPNLP_ONEKEY_ROUTER_ACCESS=YOUR_API_KEY
If no key is provided, the scripts fall back to the demo key BETA_TEST_KEY_MARCH_2026.
Common settings:
unique_id: github/github
api_id: one of the tools listed below
Tools
add_comment_to_pending_review
Add review comment to the requester's latest pending pull request review. A pending review needs to already exist to call this (check with the user if not sure).
Parameters:
body (string, required): The text of the review comment
line (number, optional): The line of the blob in the pull request diff that the comment applies to. For multi-line comments, the last line of the range
owner (string, required): Repository owner
path (string, required): The relative path to the file that necessitates a comment
pullNumber (number, required): Pull request number
repo (string, required): Repository name
side (string, optional): The side of the diff to comment on. LEFT indicates the previous state, RIGHT indicates the new state Values: LEFT, RIGHT
startLine (number, optional): For multi-line comments, the first line of the range that the comment applies to
startSide (string, optional): For multi-line comments, the starting side of the diff that the comment applies to. LEFT indicates the previous state, RIGHT indicates the new state Values: LEFT, RIGHT
subjectType (string, required): The level at which the comment is targeted Values: FILE, LINE
add_issue_comment
Add a comment to a specific issue in a GitHub repository. Use this tool to add comments to pull requests as well (in this case pass pull request number as issue_number), but only if user is not asking specifically to add review comments.
Parameters:
body (string, required): Comment content
issue_number (number, required): Issue number to comment on
owner (string, required): Repository owner
repo (string, required): Repository name
create_branch
Create a new branch in a GitHub repository
Parameters:
branch (string, required): Name for new branch
from_branch (string, optional): Source branch (defaults to repo default)
owner (string, required): Repository owner
repo (string, required): Repository name
create_or_update_file
Create or update a single file in a GitHub repository.
If updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations.
In order to obtain the SHA of original file version before updating, use the following git command:
git ls-tree HEAD
If the SHA is not provided, the tool will attempt to acquire it by fetching the current file contents from the repository, which may lead to rewriting latest committed changes if the file has changed since last retrieval.
Parameters:
branch (string, required): Branch to create/update the file in
content (string, required): Content of the file
message (string, required): Commit message
owner (string, required): Repository owner (username or organization)
path (string, required): Path where to create/update the file
repo (string, required): Repository name
sha (string, optional): The blob SHA of the file being replaced.
create_pull_request
Create a new pull request in a GitHub repository.
Parameters:
base (string, required): Branch to merge into
body (string, optional): PR description
draft (boolean, optional): Create as draft PR
head (string, required): Branch containing changes
maintainer_can_modify (boolean, optional): Allow maintainer edits
owner (string, required): Repository owner
repo (string, required): Repository name
title (string, required): PR title
create_repository
Create a new GitHub repository in your account or specified organization
Parameters:
autoInit (boolean, optional): Initialize with README
description (string, optional): Repository description
name (string, required): Repository name
organization (string, optional): Organization to create the repository in (omit to create in your personal account)
private (boolean, optional): Whether repo should be private
delete_file
Delete a file from a GitHub repository
Parameters:
branch (string, required): Branch to delete the file from
message (string, required): Commit message
owner (string, required): Repository owner (username or organization)
path (string, required): Path to the file to delete
repo (string, required): Repository name
fork_repository
Fork a GitHub repository to your account or specified organization
Parameters:
organization (string, optional): Organization to fork to
owner (string, required): Repository owner
repo (string, required): Repository name
get_commit
Get details for a commit from a GitHub repository
Parameters:
include_diff (boolean, optional): Whether to include file diffs and stats in the response. Default is true.
owner (string, required): Repository owner
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
repo (string, required): Repository name
sha (string, required): Commit SHA, branch name, or tag name
get_file_contents
Get the contents of a file or directory from a GitHub repository
Parameters:
owner (string, required): Repository owner (username or organization)
path (string, optional): Path to file/directory
ref (string, optional): Accepts optional git refs such as refs/tags/{tag}, refs/heads/{branch} or refs/pull/{pr_number}/head
repo (string, required): Repository name
sha (string, optional): Accepts optional commit SHA. If specified, it will be used instead of ref
get_label
Get a specific label from a repository.
Parameters:
name (string, required): Label name.
owner (string, required): Repository owner (username or organization name)
repo (string, required): Repository name
get_latest_release
Get the latest release in a GitHub repository
Parameters:
owner (string, required): Repository owner
repo (string, required): Repository name
get_me
Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when information is missing to build other tool calls.
Parameters:
get_release_by_tag
Get a specific release by its tag name in a GitHub repository
Parameters:
owner (string, required): Repository owner
repo (string, required): Repository name
tag (string, required): Tag name (e.g., 'v1.0.0')
get_tag
Get details about a specific git tag in a GitHub repository
Parameters:
owner (string, required): Repository owner
repo (string, required): Repository name
tag (string, required): Tag name
get_team_members
Get member usernames of a specific team in an organization. Limited to organizations accessible with current credentials
Parameters:
org (string, required): Organization login (owner) that contains the team.
team_slug (string, required): Team slug
get_teams
Get details of the teams the user is a member of. Limited to organizations accessible with current credentials
Parameters:
user (string, optional): Username to get teams for. If not provided, uses the authenticated user.
issue_read
Get information about a specific issue in a GitHub repository.
Parameters:
issue_number (number, required): The number of the issue
method (string, required): The read operation to perform on a single issue.
Options are:
- get - Get details of a specific issue.
- get_comments - Get issue comments.
- get_sub_issues - Get sub-issues of the issue.
- get_labels - Get labels assigned to the issue. Values: get, get_comments, get_sub_issues, get_labels
owner (string, required): The owner of the repository
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
repo (string, required): The name of the repository
issue_write
Create a new or update an existing issue in a GitHub repository.
Parameters:
assignees (array of string, optional): Usernames to assign to this issue
body (string, optional): Issue body content
duplicate_of (number, optional): Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'.
issue_number (number, optional): Issue number to update
labels (array of string, optional): Labels to apply to this issue
method (string, required): Write operation to perform on a single issue.
Options are:
- 'create' - creates a new issue.
- 'update' - updates an existing issue. Values: create, update
milestone (number, optional): Milestone number
owner (string, required): Repository owner
repo (string, required): Repository name
state (string, optional): New state Values: open, closed
state_reason (string, optional): Reason for the state change. Ignored unless state is changed. Values: completed, not_planned, duplicate
title (string, optional): Issue title
type (string, optional): Type of this issue. Only use if the repository has issue types configured. Use list_issue_types tool to get valid type values for the organization. If the repository doesn't support issue types, omit this parameter.
list_branches
List branches in a GitHub repository
Parameters:
owner (string, required): Repository owner
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
repo (string, required): Repository name
list_commits
Get list of commits of a branch in a GitHub repository. Returns at least 30 results per page by default, but can return more if specified using the perPage parameter (up to 100).
Parameters:
author (string, optional): Author username or email address to filter commits by
owner (string, required): Repository owner
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
repo (string, required): Repository name
sha (string, optional): Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA.
list_issue_types
List supported issue types for repository owner (organization).
Parameters:
owner (string, required): The organization owner of the repository
list_issues
List issues in a GitHub repository. For pagination, use the 'endCursor' from the previous response's 'pageInfo' in the 'after' parameter.
Parameters:
after (string, optional): Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs.
direction (string, optional): Order direction. If provided, the 'orderBy' also needs to be provided. Values: ASC, DESC
labels (array of string, optional): Filter by labels
orderBy (string, optional): Order issues by field. If provided, the 'direction' also needs to be provided. Values: CREATED_AT, UPDATED_AT, COMMENTS
owner (string, required): Repository owner
perPage (number, optional): Results per page for pagination (min 1, max 100)
repo (string, required): Repository name
since (string, optional): Filter by date (ISO 8601 timestamp)
state (string, optional): Filter by state, by default both open and closed issues are returned when not provided Values: OPEN, CLOSED
list_pull_requests
List pull requests in a GitHub repository. If the user specifies an author, then DO NOT use this tool and use the search_pull_requests tool instead.
Parameters:
base (string, optional): Filter by base branch
direction (string, optional): Sort direction Values: asc, desc
head (string, optional): Filter by head user/org and branch
owner (string, required): Repository owner
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
repo (string, required): Repository name
sort (string, optional): Sort by Values: created, updated, popularity, long-running
state (string, optional): Filter by state Values: open, closed, all
list_releases
List releases in a GitHub repository
Parameters:
owner (string, required): Repository owner
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
repo (string, required): Repository name
list_tags
List git tags in a GitHub repository
Parameters:
owner (string, required): Repository owner
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
repo (string, required): Repository name
merge_pull_request
Merge a pull request in a GitHub repository.
Parameters:
commit_message (string, optional): Extra detail for merge commit
commit_title (string, optional): Title for merge commit
merge_method (string, optional): Merge method Values: merge, squash, rebase
owner (string, required): Repository owner
pullNumber (number, required): Pull request number
repo (string, required): Repository name
pull_request_read
Get information on a specific pull request in GitHub repository.
Parameters:
method (string, required): Action to specify what pull request data needs to be retrieved from GitHub.
Possible options:
- get - Get details of a specific pull request.
- get_diff - Get the diff of a pull request.
- get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.
- get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.
- get_review_comments - Get review threads on a pull request. Each thread contains logically grouped review comments made on the same code location during pull request reviews. Returns threads with metadata (isResolved, isOutdated, isCollapsed) and their associated comments. Use cursor-based pagination (perPage, after) to control results.
- get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.
- get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned. Values: get, get_diff, get_status, get_files, get_review_comments, get_reviews, get_comments
owner (string, required): Repository owner
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
pullNumber (number, required): Pull request number
repo (string, required): Repository name
pull_request_review_write
Create and/or submit, delete review of a pull request.
Available methods:
- create: Create a new review of a pull request. If "event" parameter is provided, the review is submitted. If "event" is omitted, a pending review is created.
- submit_pending: Submit an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request. The "body" and "event" parameters are used when submitting the review.
- delete_pending: Delete an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request.
Parameters:
body (string, optional): Review comment text
commitID (string, optional): SHA of commit to review
event (string, optional): Review action to perform. Values: APPROVE, REQUEST_CHANGES, COMMENT
method (string, required): The write operation to perform on pull request review. Values: create, submit_pending, delete_pending
owner (string, required): Repository owner
pullNumber (number, required): Pull request number
repo (string, required): Repository name
push_files
Push multiple files to a GitHub repository in a single commit
Parameters:
branch (string, required): Branch to push to
files (array of object, required): Array of file objects to push, each object with path (string) and content (string)
files[].content (string, required): file content
files[].path (string, required): path to the file
message (string, required): Commit message
owner (string, required): Repository owner
repo (string, required): Repository name
request_copilot_review
Request a GitHub Copilot code review for a pull request. Use this for automated feedback on pull requests, usually before requesting a human reviewer.
Parameters:
owner (string, required): Repository owner
pullNumber (number, required): Pull request number
repo (string, required): Repository name
search_code
Fast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns.
Parameters:
order (string, optional): Sort order for results Values: asc, desc
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
query (string, required): Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more.
sort (string, optional): Sort field ('indexed' only)
search_issues
Search for issues in GitHub repositories using issues search syntax already scoped to is:issue
Parameters:
order (string, optional): Sort order Values: asc, desc
owner (string, optional): Optional repository owner. If provided with repo, only issues for this repository are listed.
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
query (string, required): Search query using GitHub issues search syntax
repo (string, optional): Optional repository name. If provided with owner, only issues for this repository are listed.
sort (string, optional): Sort field by number of matches of categories, defaults to best match Values: comments, reactions, reactions-+1, reactions--1, reactions-smile, reactions-thinking_face, reactions-heart, reactions-tada, interactions, created, updated
search_pull_requests
Search for pull requests in GitHub repositories using issues search syntax already scoped to is:pr
Parameters:
order (string, optional): Sort order Values: asc, desc
owner (string, optional): Optional repository owner. If provided with repo, only pull requests for this repository are listed.
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
query (string, required): Search query using GitHub pull request search syntax
repo (string, optional): Optional repository name. If provided with owner, only pull requests for this repository are listed.
sort (string, optional): Sort field by number of matches of categories, defaults to best match Values: comments, reactions, reactions-+1, reactions--1, reactions-smile, reactions-thinking_face, reactions-heart, reactions-tada, interactions, created, updated
search_repositories
Find GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub.
Parameters:
minimal_output (boolean, optional): Return minimal repository information (default: true). When false, returns full GitHub API repository objects.
order (string, optional): Sort order Values: asc, desc
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
query (string, required): Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering.
sort (string, optional): Sort repositories by field, defaults to best match Values: stars, forks, help-wanted-issues, updated
search_users
Find GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members.
Parameters:
order (string, optional): Sort order Values: asc, desc
page (number, optional): Page number for pagination (min 1)
perPage (number, optional): Results per page for pagination (min 1, max 100)
query (string, required): User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user.
sort (string, optional): Sort users by number of followers or repositories, or when the person joined GitHub. Values: followers, repositories, joined
sub_issue_write
Add a sub-issue to a parent issue in a GitHub repository.
Parameters:
after_id (number, optional): The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified)
before_id (number, optional): The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified)
issue_number (number, required): The number of the parent issue
method (string, required): The action to perform on a single sub-issue
Options are:
- 'add' - add a sub-issue to a parent issue in a GitHub repository.
- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.
- 'reprioritize' - change the order of sub-issues within a parent issue in a GitHub repository. Use either 'after_id' or 'before_id' to specify the new position.
owner (string, required): Repository owner
replace_parent (boolean, optional): When true, replaces the sub-issue's current parent issue. Use with 'add' method only.
repo (string, required): Repository name
sub_issue_id (number, required): The ID of the sub-issue to add. ID is not the same as issue number
update_pull_request
Update an existing pull request in a GitHub repository.
Parameters:
base (string, optional): New base branch name
body (string, optional): New description
draft (boolean, optional): Mark pull request as draft (true) or ready for review (false)
maintainer_can_modify (boolean, optional): Allow maintainer edits
owner (string, required): Repository owner
pullNumber (number, required): Pull request number to update
repo (string, required): Repository name
reviewers (array of string, optional): GitHub usernames to request reviews from
state (string, optional): New state Values: open, closed
title (string, optional): New title
update_pull_request_branch
Update the branch of a pull request with the latest changes from the base branch.
Parameters:
expectedHeadSha (string, optional): The expected SHA of the pull request's HEAD ref
owner (string, required): Repository owner
pullNumber (number, required): Pull request number
repo (string, required): Repository name
Usage
CLI
add_comment_to_pending_review
npx onekey agent github/github add_comment_to_pending_review '{}'
add_issue_comment
npx onekey agent github/github add_issue_comment '{}'
create_branch
npx onekey agent github/github create_branch '{}'
create_or_update_file
npx onekey agent github/github create_or_update_file '{}'
create_pull_request
npx onekey agent github/github create_pull_request '{}'
create_repository
npx onekey agent github/github create_repository '{}'
delete_file
npx onekey agent github/github delete_file '{}'
fork_repository
npx onekey agent github/github fork_repository '{}'
get_commit
npx onekey agent github/github get_commit '{}'
get_file_contents
npx onekey agent github/github get_file_contents '{}'
get_label
npx onekey agent github/github get_label '{}'
get_latest_release
npx onekey agent github/github get_latest_release '{}'
get_me
npx onekey agent github/github get_me '{}'
get_release_by_tag
npx onekey agent github/github get_release_by_tag '{}'
get_tag
npx onekey agent github/github get_tag '{}'
get_team_members
npx onekey agent github/github get_team_members '{}'
get_teams
npx onekey agent github/github get_teams '{}'
issue_read
npx onekey agent github/github issue_read '{}'
issue_write
npx onekey agent github/github issue_write '{}'
list_branches
npx onekey agent github/github list_branches '{}'
list_commits
npx onekey agent github/github list_commits '{}'
list_issue_types
npx onekey agent github/github list_issue_types '{}'
list_issues
npx onekey agent github/github list_issues '{}'
list_pull_requests
npx onekey agent github/github list_pull_requests '{}'
list_releases
npx onekey agent github/github list_releases '{}'
list_tags
npx onekey agent github/github list_tags '{}'
merge_pull_request
npx onekey agent github/github merge_pull_request '{}'
pull_request_read
npx onekey agent github/github pull_request_read '{}'
pull_request_review_write
npx onekey agent github/github pull_request_review_write '{}'
push_files
npx onekey agent github/github push_files '{}'
request_copilot_review
npx onekey agent github/github request_copilot_review '{}'
search_code
npx onekey agent github/github search_code '{}'
search_issues
npx onekey agent github/github search_issues '{}'
search_pull_requests
npx onekey agent github/github search_pull_requests '{}'
search_repositories
npx onekey agent github/github search_repositories '{}'
search_users
npx onekey agent github/github search_users '{}'
sub_issue_write
npx onekey agent github/github sub_issue_write '{}'
update_pull_request
npx onekey agent github/github update_pull_request '{}'
update_pull_request_branch
npx onekey agent github/github update_pull_request_branch '{}'
Scripts
Each tool has a dedicated script in this folder:
skills/github/scripts/add_comment_to_pending_review.py
skills/github/scripts/add_issue_comment.py
skills/github/scripts/create_branch.py
skills/github/scripts/create_or_update_file.py
skills/github/scripts/create_pull_request.py
skills/github/scripts/create_repository.py
skills/github/scripts/delete_file.py
skills/github/scripts/fork_repository.py
skills/github/scripts/get_commit.py
skills/github/scripts/get_file_contents.py
skills/github/scripts/get_label.py
skills/github/scripts/get_latest_release.py
skills/github/scripts/get_me.py
skills/github/scripts/get_release_by_tag.py
skills/github/scripts/get_tag.py
skills/github/scripts/get_team_members.py
skills/github/scripts/get_teams.py
skills/github/scripts/issue_read.py
skills/github/scripts/issue_write.py
skills/github/scripts/list_branches.py
skills/github/scripts/list_commits.py
skills/github/scripts/list_issue_types.py
skills/github/scripts/list_issues.py
skills/github/scripts/list_pull_requests.py
skills/github/scripts/list_releases.py
skills/github/scripts/list_tags.py
skills/github/scripts/merge_pull_request.py
skills/github/scripts/pull_request_read.py
skills/github/scripts/pull_request_review_write.py
skills/github/scripts/push_files.py
skills/github/scripts/request_copilot_review.py
skills/github/scripts/search_code.py
skills/github/scripts/search_issues.py
skills/github/scripts/search_pull_requests.py
skills/github/scripts/search_repositories.py
skills/github/scripts/search_users.py
skills/github/scripts/sub_issue_write.py
skills/github/scripts/update_pull_request.py
skills/github/scripts/update_pull_request_branch.py
Example
python3 scripts/<tool_name>.py --data '{"key": "value"}'
Related DeepNLP OneKey Gateway Documents
AI Agent Marketplace
Skills Marketplace
AI Agent A2Z Deployment
PH AI Agent A2Z Infra
GitHub AI Agent Marketplace
Dependencies
CLI Dependency
Install onekey-gateway from npm
npm install @aiagenta2z/onekey-gateway
Script Dependency
Install the required Python package before running any scripts.
pip install ai-agent-marketplace
Alternatively, install dependencies from the requirements file:
pip install -r requirements.txt
If the package is already installed, skip installation.
Agent rule
Before executing command lines or running any script in the scripts/ directory, ensure the dependencies are installed.
Use the npx onekey CLI as the preferred method to run the skills.
1---2name: github3description: Auto-generated skill for github tools via OneKey Gateway.4---56### OneKey Gateway7Use One Access Key to connect to various commercial APIs. Please visit the [OneKey Gateway Keys](https://www.deepnlp.org/workspace/keys) and read the docs [OneKey MCP Router Doc](https://www.deepnlp.org/doc/onekey_mcp_router) and [OneKey Gateway Doc](https://deepnlp.org/doc/onekey_agent_router).8910# github Skill11Use the OneKey Gateway to access tools for this server via a unified access key.12## Quick Start13Set your OneKey access key:14```bash15export DEEPNLP_ONEKEY_ROUTER_ACCESS=YOUR_API_KEY16```17If no key is provided, the scripts fall back to the demo key `BETA_TEST_KEY_MARCH_2026`.18Common settings:19- `unique_id`: `github/github`20- `api_id`: one of the tools listed below21## Tools22### `add_comment_to_pending_review`23Add review comment to the requester's latest pending pull request review. A pending review needs to already exist to call this (check with the user if not sure).2425Parameters:26- `body` (string, required): The text of the review comment27- `line` (number, optional): The line of the blob in the pull request diff that the comment applies to. For multi-line comments, the last line of the range28- `owner` (string, required): Repository owner29- `path` (string, required): The relative path to the file that necessitates a comment30- `pullNumber` (number, required): Pull request number31- `repo` (string, required): Repository name32- `side` (string, optional): The side of the diff to comment on. LEFT indicates the previous state, RIGHT indicates the new state Values: LEFT, RIGHT33- `startLine` (number, optional): For multi-line comments, the first line of the range that the comment applies to34- `startSide` (string, optional): For multi-line comments, the starting side of the diff that the comment applies to. LEFT indicates the previous state, RIGHT indicates the new state Values: LEFT, RIGHT35- `subjectType` (string, required): The level at which the comment is targeted Values: FILE, LINE36### `add_issue_comment`37Add a comment to a specific issue in a GitHub repository. Use this tool to add comments to pull requests as well (in this case pass pull request number as issue_number), but only if user is not asking specifically to add review comments.3839Parameters:40- `body` (string, required): Comment content41- `issue_number` (number, required): Issue number to comment on42- `owner` (string, required): Repository owner43- `repo` (string, required): Repository name44### `create_branch`45Create a new branch in a GitHub repository4647Parameters:48- `branch` (string, required): Name for new branch49- `from_branch` (string, optional): Source branch (defaults to repo default)50- `owner` (string, required): Repository owner51- `repo` (string, required): Repository name52### `create_or_update_file`53Create or update a single file in a GitHub repository. 54If updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations.5556In order to obtain the SHA of original file version before updating, use the following git command:57git ls-tree HEAD <path to file>5859If the SHA is not provided, the tool will attempt to acquire it by fetching the current file contents from the repository, which may lead to rewriting latest committed changes if the file has changed since last retrieval.6061Parameters:62- `branch` (string, required): Branch to create/update the file in63- `content` (string, required): Content of the file64- `message` (string, required): Commit message65- `owner` (string, required): Repository owner (username or organization)66- `path` (string, required): Path where to create/update the file67- `repo` (string, required): Repository name68- `sha` (string, optional): The blob SHA of the file being replaced.69### `create_pull_request`70Create a new pull request in a GitHub repository.7172Parameters:73- `base` (string, required): Branch to merge into74- `body` (string, optional): PR description75- `draft` (boolean, optional): Create as draft PR76- `head` (string, required): Branch containing changes77- `maintainer_can_modify` (boolean, optional): Allow maintainer edits78- `owner` (string, required): Repository owner79- `repo` (string, required): Repository name80- `title` (string, required): PR title81### `create_repository`82Create a new GitHub repository in your account or specified organization8384Parameters:85- `autoInit` (boolean, optional): Initialize with README86- `description` (string, optional): Repository description87- `name` (string, required): Repository name88- `organization` (string, optional): Organization to create the repository in (omit to create in your personal account)89- `private` (boolean, optional): Whether repo should be private90### `delete_file`91Delete a file from a GitHub repository9293Parameters:94- `branch` (string, required): Branch to delete the file from95- `message` (string, required): Commit message96- `owner` (string, required): Repository owner (username or organization)97- `path` (string, required): Path to the file to delete98- `repo` (string, required): Repository name99### `fork_repository`100Fork a GitHub repository to your account or specified organization101102Parameters:103- `organization` (string, optional): Organization to fork to104- `owner` (string, required): Repository owner105- `repo` (string, required): Repository name106### `get_commit`107Get details for a commit from a GitHub repository108109Parameters:110- `include_diff` (boolean, optional): Whether to include file diffs and stats in the response. Default is true.111- `owner` (string, required): Repository owner112- `page` (number, optional): Page number for pagination (min 1)113- `perPage` (number, optional): Results per page for pagination (min 1, max 100)114- `repo` (string, required): Repository name115- `sha` (string, required): Commit SHA, branch name, or tag name116### `get_file_contents`117Get the contents of a file or directory from a GitHub repository118119Parameters:120- `owner` (string, required): Repository owner (username or organization)121- `path` (string, optional): Path to file/directory122- `ref` (string, optional): Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head`123- `repo` (string, required): Repository name124- `sha` (string, optional): Accepts optional commit SHA. If specified, it will be used instead of ref125### `get_label`126Get a specific label from a repository.127128Parameters:129- `name` (string, required): Label name.130- `owner` (string, required): Repository owner (username or organization name)131- `repo` (string, required): Repository name132### `get_latest_release`133Get the latest release in a GitHub repository134135Parameters:136- `owner` (string, required): Repository owner137- `repo` (string, required): Repository name138### `get_me`139Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when information is missing to build other tool calls.140141Parameters:142- None143### `get_release_by_tag`144Get a specific release by its tag name in a GitHub repository145146Parameters:147- `owner` (string, required): Repository owner148- `repo` (string, required): Repository name149- `tag` (string, required): Tag name (e.g., 'v1.0.0')150### `get_tag`151Get details about a specific git tag in a GitHub repository152153Parameters:154- `owner` (string, required): Repository owner155- `repo` (string, required): Repository name156- `tag` (string, required): Tag name157### `get_team_members`158Get member usernames of a specific team in an organization. Limited to organizations accessible with current credentials159160Parameters:161- `org` (string, required): Organization login (owner) that contains the team.162- `team_slug` (string, required): Team slug163### `get_teams`164Get details of the teams the user is a member of. Limited to organizations accessible with current credentials165166Parameters:167- `user` (string, optional): Username to get teams for. If not provided, uses the authenticated user.168### `issue_read`169Get information about a specific issue in a GitHub repository.170171Parameters:172- `issue_number` (number, required): The number of the issue173- `method` (string, required): The read operation to perform on a single issue.174Options are:1751. get - Get details of a specific issue.1762. get_comments - Get issue comments.1773. get_sub_issues - Get sub-issues of the issue.1784. get_labels - Get labels assigned to the issue. Values: get, get_comments, get_sub_issues, get_labels179- `owner` (string, required): The owner of the repository180- `page` (number, optional): Page number for pagination (min 1)181- `perPage` (number, optional): Results per page for pagination (min 1, max 100)182- `repo` (string, required): The name of the repository183### `issue_write`184Create a new or update an existing issue in a GitHub repository.185186Parameters:187- `assignees` (array of string, optional): Usernames to assign to this issue188- `body` (string, optional): Issue body content189- `duplicate_of` (number, optional): Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'.190- `issue_number` (number, optional): Issue number to update191- `labels` (array of string, optional): Labels to apply to this issue192- `method` (string, required): Write operation to perform on a single issue.193Options are:194- 'create' - creates a new issue.195- 'update' - updates an existing issue. Values: create, update196- `milestone` (number, optional): Milestone number197- `owner` (string, required): Repository owner198- `repo` (string, required): Repository name199- `state` (string, optional): New state Values: open, closed200- `state_reason` (string, optional): Reason for the state change. Ignored unless state is changed. Values: completed, not_planned, duplicate201- `title` (string, optional): Issue title202- `type` (string, optional): Type of this issue. Only use if the repository has issue types configured. Use list_issue_types tool to get valid type values for the organization. If the repository doesn't support issue types, omit this parameter.203### `list_branches`204List branches in a GitHub repository205206Parameters:207- `owner` (string, required): Repository owner208- `page` (number, optional): Page number for pagination (min 1)209- `perPage` (number, optional): Results per page for pagination (min 1, max 100)210- `repo` (string, required): Repository name211### `list_commits`212Get list of commits of a branch in a GitHub repository. Returns at least 30 results per page by default, but can return more if specified using the perPage parameter (up to 100).213214Parameters:215- `author` (string, optional): Author username or email address to filter commits by216- `owner` (string, required): Repository owner217- `page` (number, optional): Page number for pagination (min 1)218- `perPage` (number, optional): Results per page for pagination (min 1, max 100)219- `repo` (string, required): Repository name220- `sha` (string, optional): Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA.221### `list_issue_types`222List supported issue types for repository owner (organization).223224Parameters:225- `owner` (string, required): The organization owner of the repository226### `list_issues`227List issues in a GitHub repository. For pagination, use the 'endCursor' from the previous response's 'pageInfo' in the 'after' parameter.228229Parameters:230- `after` (string, optional): Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs.231- `direction` (string, optional): Order direction. If provided, the 'orderBy' also needs to be provided. Values: ASC, DESC232- `labels` (array of string, optional): Filter by labels233- `orderBy` (string, optional): Order issues by field. If provided, the 'direction' also needs to be provided. Values: CREATED_AT, UPDATED_AT, COMMENTS234- `owner` (string, required): Repository owner235- `perPage` (number, optional): Results per page for pagination (min 1, max 100)236- `repo` (string, required): Repository name237- `since` (string, optional): Filter by date (ISO 8601 timestamp)238- `state` (string, optional): Filter by state, by default both open and closed issues are returned when not provided Values: OPEN, CLOSED239### `list_pull_requests`240List pull requests in a GitHub repository. If the user specifies an author, then DO NOT use this tool and use the search_pull_requests tool instead.241242Parameters:243- `base` (string, optional): Filter by base branch244- `direction` (string, optional): Sort direction Values: asc, desc245- `head` (string, optional): Filter by head user/org and branch246- `owner` (string, required): Repository owner247- `page` (number, optional): Page number for pagination (min 1)248- `perPage` (number, optional): Results per page for pagination (min 1, max 100)249- `repo` (string, required): Repository name250- `sort` (string, optional): Sort by Values: created, updated, popularity, long-running251- `state` (string, optional): Filter by state Values: open, closed, all252### `list_releases`253List releases in a GitHub repository254255Parameters:256- `owner` (string, required): Repository owner257- `page` (number, optional): Page number for pagination (min 1)258- `perPage` (number, optional): Results per page for pagination (min 1, max 100)259- `repo` (string, required): Repository name260### `list_tags`261List git tags in a GitHub repository262263Parameters:264- `owner` (string, required): Repository owner265- `page` (number, optional): Page number for pagination (min 1)266- `perPage` (number, optional): Results per page for pagination (min 1, max 100)267- `repo` (string, required): Repository name268### `merge_pull_request`269Merge a pull request in a GitHub repository.270271Parameters:272- `commit_message` (string, optional): Extra detail for merge commit273- `commit_title` (string, optional): Title for merge commit274- `merge_method` (string, optional): Merge method Values: merge, squash, rebase275- `owner` (string, required): Repository owner276- `pullNumber` (number, required): Pull request number277- `repo` (string, required): Repository name278### `pull_request_read`279Get information on a specific pull request in GitHub repository.280281Parameters:282- `method` (string, required): Action to specify what pull request data needs to be retrieved from GitHub. 283Possible options: 284 1. get - Get details of a specific pull request.285 2. get_diff - Get the diff of a pull request.286 3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.287 4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.288 5. get_review_comments - Get review threads on a pull request. Each thread contains logically grouped review comments made on the same code location during pull request reviews. Returns threads with metadata (isResolved, isOutdated, isCollapsed) and their associated comments. Use cursor-based pagination (perPage, after) to control results.289 6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.290 7. get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned. Values: get, get_diff, get_status, get_files, get_review_comments, get_reviews, get_comments291- `owner` (string, required): Repository owner292- `page` (number, optional): Page number for pagination (min 1)293- `perPage` (number, optional): Results per page for pagination (min 1, max 100)294- `pullNumber` (number, required): Pull request number295- `repo` (string, required): Repository name296### `pull_request_review_write`297Create and/or submit, delete review of a pull request.298299Available methods:300- create: Create a new review of a pull request. If "event" parameter is provided, the review is submitted. If "event" is omitted, a pending review is created.301- submit_pending: Submit an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request. The "body" and "event" parameters are used when submitting the review.302- delete_pending: Delete an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request.303304Parameters:305- `body` (string, optional): Review comment text306- `commitID` (string, optional): SHA of commit to review307- `event` (string, optional): Review action to perform. Values: APPROVE, REQUEST_CHANGES, COMMENT308- `method` (string, required): The write operation to perform on pull request review. Values: create, submit_pending, delete_pending309- `owner` (string, required): Repository owner310- `pullNumber` (number, required): Pull request number311- `repo` (string, required): Repository name312### `push_files`313Push multiple files to a GitHub repository in a single commit314315Parameters:316- `branch` (string, required): Branch to push to317- `files` (array of object, required): Array of file objects to push, each object with path (string) and content (string)318- `files[].content` (string, required): file content319- `files[].path` (string, required): path to the file320- `message` (string, required): Commit message321- `owner` (string, required): Repository owner322- `repo` (string, required): Repository name323### `request_copilot_review`324Request a GitHub Copilot code review for a pull request. Use this for automated feedback on pull requests, usually before requesting a human reviewer.325326Parameters:327- `owner` (string, required): Repository owner328- `pullNumber` (number, required): Pull request number329- `repo` (string, required): Repository name330### `search_code`331Fast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns.332333Parameters:334- `order` (string, optional): Sort order for results Values: asc, desc335- `page` (number, optional): Page number for pagination (min 1)336- `perPage` (number, optional): Results per page for pagination (min 1, max 100)337- `query` (string, required): Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more.338- `sort` (string, optional): Sort field ('indexed' only)339### `search_issues`340Search for issues in GitHub repositories using issues search syntax already scoped to is:issue341342Parameters:343- `order` (string, optional): Sort order Values: asc, desc344- `owner` (string, optional): Optional repository owner. If provided with repo, only issues for this repository are listed.345- `page` (number, optional): Page number for pagination (min 1)346- `perPage` (number, optional): Results per page for pagination (min 1, max 100)347- `query` (string, required): Search query using GitHub issues search syntax348- `repo` (string, optional): Optional repository name. If provided with owner, only issues for this repository are listed.349- `sort` (string, optional): Sort field by number of matches of categories, defaults to best match Values: comments, reactions, reactions-+1, reactions--1, reactions-smile, reactions-thinking_face, reactions-heart, reactions-tada, interactions, created, updated350### `search_pull_requests`351Search for pull requests in GitHub repositories using issues search syntax already scoped to is:pr352353Parameters:354- `order` (string, optional): Sort order Values: asc, desc355- `owner` (string, optional): Optional repository owner. If provided with repo, only pull requests for this repository are listed.356- `page` (number, optional): Page number for pagination (min 1)357- `perPage` (number, optional): Results per page for pagination (min 1, max 100)358- `query` (string, required): Search query using GitHub pull request search syntax359- `repo` (string, optional): Optional repository name. If provided with owner, only pull requests for this repository are listed.360- `sort` (string, optional): Sort field by number of matches of categories, defaults to best match Values: comments, reactions, reactions-+1, reactions--1, reactions-smile, reactions-thinking_face, reactions-heart, reactions-tada, interactions, created, updated361### `search_repositories`362Find GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub.363364Parameters:365- `minimal_output` (boolean, optional): Return minimal repository information (default: true). When false, returns full GitHub API repository objects.366- `order` (string, optional): Sort order Values: asc, desc367- `page` (number, optional): Page number for pagination (min 1)368- `perPage` (number, optional): Results per page for pagination (min 1, max 100)369- `query` (string, required): Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering.370- `sort` (string, optional): Sort repositories by field, defaults to best match Values: stars, forks, help-wanted-issues, updated371### `search_users`372Find GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members.373374Parameters:375- `order` (string, optional): Sort order Values: asc, desc376- `page` (number, optional): Page number for pagination (min 1)377- `perPage` (number, optional): Results per page for pagination (min 1, max 100)378- `query` (string, required): User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user.379- `sort` (string, optional): Sort users by number of followers or repositories, or when the person joined GitHub. Values: followers, repositories, joined380### `sub_issue_write`381Add a sub-issue to a parent issue in a GitHub repository.382383Parameters:384- `after_id` (number, optional): The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified)385- `before_id` (number, optional): The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified)386- `issue_number` (number, required): The number of the parent issue387- `method` (string, required): The action to perform on a single sub-issue388Options are:389- 'add' - add a sub-issue to a parent issue in a GitHub repository.390- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.391- 'reprioritize' - change the order of sub-issues within a parent issue in a GitHub repository. Use either 'after_id' or 'before_id' to specify the new position.392- `owner` (string, required): Repository owner393- `replace_parent` (boolean, optional): When true, replaces the sub-issue's current parent issue. Use with 'add' method only.394- `repo` (string, required): Repository name395- `sub_issue_id` (number, required): The ID of the sub-issue to add. ID is not the same as issue number396### `update_pull_request`397Update an existing pull request in a GitHub repository.398399Parameters:400- `base` (string, optional): New base branch name401- `body` (string, optional): New description402- `draft` (boolean, optional): Mark pull request as draft (true) or ready for review (false)403- `maintainer_can_modify` (boolean, optional): Allow maintainer edits404- `owner` (string, required): Repository owner405- `pullNumber` (number, required): Pull request number to update406- `repo` (string, required): Repository name407- `reviewers` (array of string, optional): GitHub usernames to request reviews from408- `state` (string, optional): New state Values: open, closed409- `title` (string, optional): New title410### `update_pull_request_branch`411Update the branch of a pull request with the latest changes from the base branch.412413Parameters:414- `expectedHeadSha` (string, optional): The expected SHA of the pull request's HEAD ref415- `owner` (string, required): Repository owner416- `pullNumber` (number, required): Pull request number417- `repo` (string, required): Repository name418419# Usage420## CLI421422### add_comment_to_pending_review423```shell424npx onekey agent github/github add_comment_to_pending_review '{}'425```426427### add_issue_comment428```shell429npx onekey agent github/github add_issue_comment '{}'430```431432### create_branch433```shell434npx onekey agent github/github create_branch '{}'435```436437### create_or_update_file438```shell439npx onekey agent github/github create_or_update_file '{}'440```441442### create_pull_request443```shell444npx onekey agent github/github create_pull_request '{}'445```446447### create_repository448```shell449npx onekey agent github/github create_repository '{}'450```451452### delete_file453```shell454npx onekey agent github/github delete_file '{}'455```456457### fork_repository458```shell459npx onekey agent github/github fork_repository '{}'460```461462### get_commit463```shell464npx onekey agent github/github get_commit '{}'465```466467### get_file_contents468```shell469npx onekey agent github/github get_file_contents '{}'470```471472### get_label473```shell474npx onekey agent github/github get_label '{}'475```476477### get_latest_release478```shell479npx onekey agent github/github get_latest_release '{}'480```481482### get_me483```shell484npx onekey agent github/github get_me '{}'485```486487### get_release_by_tag488```shell489npx onekey agent github/github get_release_by_tag '{}'490```491492### get_tag493```shell494npx onekey agent github/github get_tag '{}'495```496497### get_team_members498```shell499npx onekey agent github/github get_team_members '{}'500```501502### get_teams503```shell504npx onekey agent github/github get_teams '{}'505```506507### issue_read508```shell509npx onekey agent github/github issue_read '{}'510```511512### issue_write513```shell514npx onekey agent github/github issue_write '{}'515```516517### list_branches518```shell519npx onekey agent github/github list_branches '{}'520```521522### list_commits523```shell524npx onekey agent github/github list_commits '{}'525```526527### list_issue_types528```shell529npx onekey agent github/github list_issue_types '{}'530```531532### list_issues533```shell534npx onekey agent github/github list_issues '{}'535```536537### list_pull_requests538```shell539npx onekey agent github/github list_pull_requests '{}'540```541542### list_releases543```shell544npx onekey agent github/github list_releases '{}'545```546547### list_tags548```shell549npx onekey agent github/github list_tags '{}'550```551552### merge_pull_request553```shell554npx onekey agent github/github merge_pull_request '{}'555```556557### pull_request_read558```shell559npx onekey agent github/github pull_request_read '{}'560```561562### pull_request_review_write563```shell564npx onekey agent github/github pull_request_review_write '{}'565```566567### push_files568```shell569npx onekey agent github/github push_files '{}'570```571572### request_copilot_review573```shell574npx onekey agent github/github request_copilot_review '{}'575```576577### search_code578```shell579npx onekey agent github/github search_code '{}'580```581582### search_issues583```shell584npx onekey agent github/github search_issues '{}'585```586587### search_pull_requests588```shell589npx onekey agent github/github search_pull_requests '{}'590```591592### search_repositories593```shell594npx onekey agent github/github search_repositories '{}'595```596597### search_users598```shell599npx onekey agent github/github search_users '{}'600```601602### sub_issue_write603```shell604npx onekey agent github/github sub_issue_write '{}'605```606607### update_pull_request608```shell609npx onekey agent github/github update_pull_request '{}'610```611612### update_pull_request_branch613```shell614npx onekey agent github/github update_pull_request_branch '{}'615```616617## Scripts618Each tool has a dedicated script in this folder:619- `skills/github/scripts/add_comment_to_pending_review.py`620- `skills/github/scripts/add_issue_comment.py`621- `skills/github/scripts/create_branch.py`622- `skills/github/scripts/create_or_update_file.py`623- `skills/github/scripts/create_pull_request.py`624- `skills/github/scripts/create_repository.py`625- `skills/github/scripts/delete_file.py`626- `skills/github/scripts/fork_repository.py`627- `skills/github/scripts/get_commit.py`628- `skills/github/scripts/get_file_contents.py`629- `skills/github/scripts/get_label.py`630- `skills/github/scripts/get_latest_release.py`631- `skills/github/scripts/get_me.py`632- `skills/github/scripts/get_release_by_tag.py`633- `skills/github/scripts/get_tag.py`634- `skills/github/scripts/get_team_members.py`635- `skills/github/scripts/get_teams.py`636- `skills/github/scripts/issue_read.py`637- `skills/github/scripts/issue_write.py`638- `skills/github/scripts/list_branches.py`639- `skills/github/scripts/list_commits.py`640- `skills/github/scripts/list_issue_types.py`641- `skills/github/scripts/list_issues.py`642- `skills/github/scripts/list_pull_requests.py`643- `skills/github/scripts/list_releases.py`644- `skills/github/scripts/list_tags.py`645- `skills/github/scripts/merge_pull_request.py`646- `skills/github/scripts/pull_request_read.py`647- `skills/github/scripts/pull_request_review_write.py`648- `skills/github/scripts/push_files.py`649- `skills/github/scripts/request_copilot_review.py`650- `skills/github/scripts/search_code.py`651- `skills/github/scripts/search_issues.py`652- `skills/github/scripts/search_pull_requests.py`653- `skills/github/scripts/search_repositories.py`654- `skills/github/scripts/search_users.py`655- `skills/github/scripts/sub_issue_write.py`656- `skills/github/scripts/update_pull_request.py`657- `skills/github/scripts/update_pull_request_branch.py`658### Example659```bash660python3 scripts/<tool_name>.py --data '{"key": "value"}'661```662663### Related DeepNLP OneKey Gateway Documents664[AI Agent Marketplace](https://www.deepnlp.org/store/ai-agent) 665[Skills Marketplace](https://www.deepnlp.org/store/skills)666[AI Agent A2Z Deployment](https://www.deepnlp.org/workspace/deploy) 667[PH AI Agent A2Z Infra](https://www.producthunt.com/products/ai-agent-a2z) 668[GitHub AI Agent Marketplace](https://github.com/aiagenta2z/ai-agent-marketplace)669## Dependencies670671### CLI Dependency672Install onekey-gateway from npm673```674npm install @aiagenta2z/onekey-gateway675```676677### Script Dependency678Install the required Python package before running any scripts.679680```bash681pip install ai-agent-marketplace682```683Alternatively, install dependencies from the requirements file:684685```bash686pip install -r requirements.txt687```688If the package is already installed, skip installation.689690### Agent rule691Before executing command lines or running any script in the scripts/ directory, ensure the dependencies are installed.692Use the `npx onekey` CLI as the preferred method to run the skills.