# Github Operations

管理 GitHub Pull Request 和 Issue。包括创建/更新/合并 PR、添加评论、管理 Issue 等。注意：文件读写、分支操作、代码提交等请使用...

- Repository: https://github.com/agentscope-ai/AgentTeams (5913 stars)
- Category: Git and review
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add agentscope-ai/AgentTeams --skill github-operations -g -a claude-code -y`
Codex: `npx skills add agentscope-ai/AgentTeams --skill github-operations -g -a codex -y`
Cursor: `npx skills add agentscope-ai/AgentTeams --skill github-operations -g -a cursor -y`
Gemini CLI: `npx skills add agentscope-ai/AgentTeams --skill github-operations -g -a gemini-cli -y`

## Description

管理 GitHub Pull Request 和 Issue。包括创建/更新/合并 PR、添加评论、管理 Issue 等。注意：文件读写、分支操作、代码提交等请使用 git-delegation 技能。

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# GitHub PR & Issue Management

## Overview

This skill allows you to manage **Pull Requests and Issues** via the centralized MCP Server. For git operations (clone, pull, push, commit, branch), use the **git-delegation** skill instead.

## Environment Variables

No environment variables needed, `mcporter` reads its config from the default path `./config/mcporter.json` automatically.

| Task | Use This Skill | Use git-delegation |
|------|---------------|-------------------|
| Create/update/close PR | ✅ | |
| Review/merge PR | ✅ | |
| Comment on PR/Issue | ✅ | |
| Create/update/close Issue | ✅ | |
| Clone repository | | ✅ |
| Pull/fetch changes | | ✅ |
| Read/write files | | ✅ |
| Create branches | | ✅ |
| Commit/push code | | ✅ |

---

## How to Call GitHub Tools

Use `mcporter` CLI to call MCP Server tools:

```bash
# Method 1: key=value format (recommended for simple args)
mcporter \
  call mcp-github.<TOOL_NAME> key1=value1 key2=value2

# Method 2: JSON format with --args flag (for complex objects)
mcporter \
  call mcp-github.<TOOL_NAME> --args '{"key1":"value1","key2":"value2"}'
```

**IMPORTANT**:
- Always place `--config` BEFORE the `call` subcommand
- For JSON arguments, use the `--args` flag (not bare JSON string)
- Use `mcp-github.<tool_name>` selector format

### Output

mcporter returns JSON output. Parse with `jq` for clean results.

---

## Pull Request Operations

### create_pull_request

Create a new Pull Request:

```bash
mcporter \
  call mcp-github.create_pull_request --args '{
    "owner": "higress-group",
    "repo": "agentteams",
    "title": "Add new feature",
    "body": "## Summary\n- Change 1\n- Change 2\n\n## Test plan\n- [ ] Test A\n- [ ] Test B",
    "head": "feature-branch",
    "base": "main"
  }'
```

### list_pull_requests

List PRs in a repository:

```bash
mcporter \
  call mcp-github.list_pull_requests owner=higress-group repo=agentteams state=open
```

### get_pull_request

Get details of a specific PR:

The rest: https://github.com/agentscope-ai/AgentTeams/blob/HEAD/manager/agent/worker-skills/github-operations/SKILL.md
