mcp-github
Call GitHub MCP tools via mcporter CLI — 40 tools for PRs, issues, repos, code search, releases, and more. Use for: 'search code across repos', 'read files from another branch', 'review PR diff', 'cross-repo queries', 'push files to remote'. Requires GITHUB_TOKEN env var.
What this skill does
<objective>
Call GitHub MCP tools through the mcporter CLI. 40 structured tools for pull requests, issues, repositories, code search, releases, users, and teams. Use this for cross-repo operations, structured data retrieval, and capabilities the local `gh` CLI doesn't offer (semantic code search, file content by ref, batch operations). Requires `GITHUB_TOKEN` env var (set in ~/.zshrc).
</objective>
<process>
## When to Use This vs `gh` CLI
| Task | Use | Why |
|------|-----|-----|
| Local repo PRs (create, merge, view) | `gh` | Already authenticated for current repo |
| Read files from **any** repo/branch/tag | **mcporter** | `get_file_contents` with ref param |
| Search code across GitHub | **mcporter** | `search_code` with language/org/path filters |
| Get PR diff as structured data | **mcporter** | `pull_request_read(method: "get_diff")` |
| Cross-repo issue/PR queries | **mcporter** | No need to clone or switch repos |
| Create/push files to remote repos | **mcporter** | `push_files` for multi-file commits |
| Review PRs programmatically | **mcporter** | `pull_request_review_write` with line comments |
| Repo/org-level search | **mcporter** | `search_repositories`, `search_users` |
| Quick local checks (status, log, diff) | `gh` / `git` | Faster, no network call |
## Call Syntax
```bash
# Colon-delimited (shell-friendly, best for simple args)
mcporter call github.TOOL_NAME key:value key2:value2 --output json
# Function-call style (better for complex/quoted args)
mcporter call 'github.TOOL_NAME(key: "value", key2: "value2")' --output json
```
Always use `--output json` for machine-readable results.
## Tool Catalog Summary (40 tools)
| Category | Count | Key Tools |
|----------|-------|-----------|
| Pull Requests | 10 | `pull_request_read`, `create_pull_request`, `merge_pull_request`, `list_pull_requests`, `pull_request_review_write` |
| Repo Exploration | 8 | `get_file_contents`, `search_code`, `list_commits`, `get_commit`, `search_repositories` |
| Issues | 8 | `issue_read`, `issue_write`, `add_issue_comment`, `list_issues`, `search_issues` |
| Repo Management | 6 | `create_branch`, `push_files`, `create_or_update_file`, `create_repository` |
| Releases | 3 | `list_releases`, `get_latest_release`, `get_release_by_tag` |
| Users & Teams | 4 | `get_me`, `search_users`, `get_teams`, `get_team_members` |
| AI | 1 | `assign_copilot_to_issue` |
**Full parameter details**: Read `references/tool-catalog.md` or run `mcporter list github --all-parameters`
## Workflows
### 1. Review a Pull Request
```bash
# Get PR overview (title, body, state, author, merge status)
mcporter call 'github.pull_request_read(owner: "org", repo: "repo", pullNumber: 42, method: "get")' --output json
# Get the full diff
mcporter call 'github.pull_request_read(owner: "org", repo: "repo", pullNumber: 42, method: "get_diff")' --output json
# List changed files
mcporter call 'github.pull_request_read(owner: "org", repo: "repo", pullNumber: 42, method: "list_files")' --output json
# Get CI/check status
mcporter call 'github.pull_request_read(owner: "org", repo: "repo", pullNumber: 42, method: "get_status")' --output json
# Read existing review comments
mcporter call 'github.pull_request_read(owner: "org", repo: "repo", pullNumber: 42, method: "get_review_comments")' --output json
# Submit a review with inline comments
mcporter call 'github.pull_request_review_write(owner: "org", repo: "repo", pullNumber: 42, method: "create", event: "COMMENT", body: "Looks good overall", comments: "[{\"path\": \"src/main.py\", \"line\": 15, \"body\": \"Consider error handling here\"}]")' --output json
```
### 2. Explore a Remote Repository
```bash
# Browse repo root (returns directory listing)
mcporter call 'github.get_file_contents(owner: "org", repo: "repo", path: "")' --output json
# Read a specific file
mcporter call 'github.get_file_contents(owner: "org", repo: "repo", path: "src/config.py")' --output json
# Read file at a specific branch/tag/PR
mcporter call 'github.get_file_contents(owner: "org", repo: "repo", path: "README.md", ref: "refs/heads/develop")' --output json
mcporter call 'github.get_file_contents(owner: "org", repo: "repo", path: "README.md", ref: "refs/tags/v1.0.0")' --output json
mcporter call 'github.get_file_contents(owner: "org", repo: "repo", path: "README.md", ref: "refs/pull/42/head")' --output json
# View recent commits
mcporter call 'github.list_commits(owner: "org", repo: "repo", perPage: 10)' --output json
# Get a specific commit's diff
mcporter call 'github.get_commit(owner: "org", repo: "repo", sha: "abc1234")' --output json
# List branches and tags
mcporter call 'github.list_branches(owner: "org", repo: "repo")' --output json
mcporter call 'github.list_tags(owner: "org", repo: "repo")' --output json
```
### 3. Search Code Across GitHub
```bash
# Search by content
mcporter call 'github.search_code(query: "content:useEffect language:typescript org:vercel")' --output json
# Search in a specific repo and path
mcporter call 'github.search_code(query: "content:DATABASE_URL repo:HelloWorldSungin/ArkNode-AI path:src/config")' --output json
# Search by filename
mcporter call 'github.search_code(query: "filename:CLAUDE.md org:anthropics")' --output json
# Combine multiple filters
mcporter call 'github.search_code(query: "content:FastAPI language:python org:tiangolo path:docs")' --output json
```
**Query syntax for `search_code`:** `content:X language:Y org:Z repo:A/B path:C filename:D extension:E`
### 4. Manage Issues
```bash
# Create an issue
mcporter call 'github.issue_write(owner: "org", repo: "repo", method: "create", title: "Bug: login fails on mobile", body: "Steps to reproduce...", labels: "[\"bug\", \"mobile\"]", assignees: "[\"username\"]")' --output json
# Get issue with comments
mcporter call 'github.issue_read(owner: "org", repo: "repo", issue_number: 99, method: "get")' --output json
mcporter call 'github.issue_read(owner: "org", repo: "repo", issue_number: 99, method: "get_comments")' --output json
# Search issues across repos
mcporter call 'github.search_issues(query: "is:open label:bug org:HelloWorldSungin")' --output json
# Close an issue
mcporter call 'github.issue_write(owner: "org", repo: "repo", method: "update", issue_number: 99, state: "closed", state_reason: "completed")' --output json
# Add a comment
mcporter call 'github.add_issue_comment(owner: "org", repo: "repo", issue_number: 99, body: "Fixed in PR #100")' --output json
```
</process>
<tips>
- **`pull_request_read` method param is critical** — it's one tool with 7 methods: `get`, `get_diff`, `get_comments`, `get_reviews`, `get_status`, `list_files`, `get_review_comments`. Always specify the method.
- **`get_file_contents` ref param** supports `refs/heads/BRANCH`, `refs/tags/TAG`, `refs/pull/PR/head` for reading files at any ref. Omit ref for default branch.
- **`search_code` query syntax**: `content:X language:Y org:Z repo:A/B path:C filename:D extension:E`. These are GitHub qualifiers, not free text.
- **Pagination**: list/search tools support `page` (1-indexed) + `perPage` (max 100). Default perPage varies by tool.
- **`issue_read` also has methods**: `get`, `get_comments`, `get_sub_issues`, `get_labels`. Specify the one you need.
- **Multi-file commits**: Use `push_files` with a `files` array to commit multiple files atomically — avoids multiple `create_or_update_file` calls.
- **`list_pull_requests` sort options**: `created`, `updated`, `popularity`, `long-running`. The `long-running` sort is useful for finding stale PRs.
- If `GITHUB_TOKEN` is not set, mcporter will fail with an auth error. Check with `echo $GITHUB_TOKEN`.
- Discover all tools and parameters: `mcporter list github --all-parameters`
</tips>
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.