Skip to content

Latest commit

 

History

History
104 lines (96 loc) · 15.5 KB

File metadata and controls

104 lines (96 loc) · 15.5 KB

Cross-model tool mappings

Generated from tool-mappings.yml. Edit that file, then run python3 scripts/sync-codex-skill-wrappers.py to regenerate this page and the links in codex-skills/.

The canonical skills under skills/ are written for Claude Code and name concrete tools --- mostly gh/git commands. This registry maps each canonical operation to the equivalent GitHub MCP tool so any model can run a skill.

Important

Every comment-posting operation below carries the agent-disclosure marker in its body, on its own line after a blank line: _Posted by <your agent> (AI agent) --- not written by a human._

Substitute your own agent's name --- this registry is read by every model, so a hard-coded Claude Code would have a Codex or Gemini session misattribute its own comment. Keep the rest of the line verbatim. Check the substituted name against scripts/check-pr-fully-clean.py's REVIEW_BODY_MARKERS too --- code review is one of them, so an agent named for code review would reintroduce the false-clean the emoji ban prevents.

This registry is the substitution point for remote/web sessions, which have no gh at all --- so a marker-free template here is a marker-free comment there, in exactly the population that cannot fall back to the CLI examples in the skills. See disclose-agent-authorship. Two exemptions: a body another machine parses as a command (@dependabot rebase), and a comment posted under a genuine bot token, where the forge already reports type: Bot.

How each model resolves an operation

  • Claude Code --- GitHub MCP tool in remote/web sessions; the CLI command locally.
  • Codex --- GitHub MCP tool if the session has it; otherwise the CLI command.
  • VS Code Copilot --- GitHub MCP tool.
  • Gemini CLI --- GitHub MCP tool if configured in MCP settings; otherwise the CLI command.
  • Generic shell / CLI --- The CLI command (fallback for any agent that just runs a shell).

Operations

Operation Does CLI (gh/git) GitHub MCP tool
VIEW_PR Read a pull request's details and metadata. gh pr view "<N>" mcp__github__pull_request_read (method=get)
LIST_PRS List pull requests. gh pr list mcp__github__list_pull_requests
WHO_AM_I Resolve the invoking user's login, for the PR-scope filter in memories/reviewing-prs.md. gh api user --jq .login mcp__github__get_me
SEARCH_PRS Search pull requests by keyword / query string. gh pr list --search "<query>" mcp__github__search_pull_requests
DIFF_PR Read a pull request's diff. gh pr diff "<N>" mcp__github__pull_request_read (method=get_diff)
PR_CHECKS Read a pull request's CI check / status results. gh pr checks "<N>" mcp__github__pull_request_read (method=get_check_runs)
READ_PR_COMMENTS Read a pull request's top-level (conversation) comments. gh pr view "<N>" --comments mcp__github__pull_request_read (method=get_comments)
READ_PR_REVIEW_COMMENTS Read a pull request's inline review threads. The MCP tool returns thread objects under a review_threads key, each with id (a PRRT_ thread node ID for resolve_thread), is_resolved, is_outdated, is_collapsed, and a nested comments array (wrapping GraphQL reviewThreads' camelCase isResolved/isOutdated). The CLI fallback (gh api "repos/<owner>/<repo>/pulls/<N>/comments") returns flat comment objects without resolution state; inspecting thread resolution via CLI requires a GraphQL reviewThreads query. gh api "repos/<owner>/<repo>/pulls/<N>/comments" mcp__github__pull_request_read (method=get_review_comments)
READ_PR_REVIEWS Read a pull request's formal reviews (state per reviewer, e.g. APPROVED / CHANGES_REQUESTED / COMMENTED). gh pr view "<N>" --json reviews mcp__github__pull_request_read (method=get_reviews)
REQUEST_COPILOT_REVIEW Request a GitHub Copilot code review on a pull request. gh api "repos/<owner>/<repo>/pulls/<N>/requested_reviewers" -X POST -f "reviewers[]=copilot-pull-request-reviewer[bot]" mcp__github__request_copilot_review
CREATE_PR Open a new pull request. gh pr create mcp__github__create_pull_request
EDIT_PR Edit a pull request (reviewers, labels, base, etc.). gh pr edit "<N>" mcp__github__update_pull_request
MERGE_PR Merge a pull request directly, pinned to the head the clean gate evaluated; a base that requires a merge queue is out of scope until #3030 lands. gh pr merge "<N>" -R "<owner>/<repo>" --match-head-commit "<sha>" mcp__github__merge_pull_request (expectedHeadSha="<sha>")
MARK_PR_READY Flip a draft pull request to ready for review. gh pr ready "<N>" mcp__github__update_pull_request (draft=false)
UPDATE_PR_BRANCH Merge the base branch into a pull request's head branch, pinned to the head that was checked. gh api -X PUT "repos/<owner>/<repo>/pulls/<N>/update-branch" -f expected_head_sha="<sha>" mcp__github__update_pull_request_branch (expectedHeadSha="<sha>")
REOPEN_PR Reopen a closed pull request. gh pr reopen "<N>" mcp__github__update_pull_request (state=open)
COMMENT_PR Post a top-level comment on a pull request. The body ends with the agent-disclosure marker --- see disclose-agent-authorship. gh pr comment "<N>" --body "..." mcp__github__add_issue_comment
REPLY_REVIEW_COMMENT Reply to an inline pull-request review comment. The path carries the PR number; the id-only route (PATCH .../pulls/comments/<id>) EDITS that comment instead. The body ends with the agent-disclosure marker --- see disclose-agent-authorship. gh api -X POST "repos/<owner>/<repo>/pulls/<N>/comments/<id>/replies" -F "body=@<file>" mcp__github__add_reply_to_pull_request_comment
RESOLVE_REVIEW_THREAD Mark an inline pull-request review thread as resolved. gh api graphql -f query='mutation { resolveReviewThread(input:{threadId:"<thread_node_id>"}) { thread { isResolved } } }' mcp__github__resolve_review_thread
WATCH_PR Subscribe to / unsubscribe from a pull request's activity. Prefer this over WATCH_REPO or LIST_NOTIFICATIONS below where it's available --- it needs no toolset enabled, and targets the PR directly rather than degrading into per-PR polling or a whole-repo subscription. (no CLI equivalent) mcp__github__subscribe_pr_activity / mcp__github__unsubscribe_pr_activity
WATCH_REPO Watch a whole repository's notifications. Requires the GitHub MCP server's notifications toolset, which is off by default. Coarser than WATCH_PR --- use only when WATCH_PR's tool isn't available (e.g. a local CLI session) and no PR-scoped alternative exists. gh api -X PUT "repos/<owner>/<repo>/subscription" -f subscribed=true mcp__github__manage_repository_notification_subscription (action=watch)
LIST_NOTIFICATIONS List the authenticated user's notifications across every repo, optionally filtered to one repo. One call covers every subscribed thread, which is cheaper than polling N PRs individually and can see a PR another session opened. Requires the notifications toolset, off by default. gh api --paginate notifications mcp__github__list_notifications
MANAGE_NOTIFICATION_SUBSCRIPTION Watch, ignore, or delete the subscription on a specific notification thread (needs a thread/notification id from LIST_NOTIFICATIONS, not a bare PR/issue number --- there is no REST endpoint to subscribe to an arbitrary PR/issue directly without an existing thread). Narrower than WATCH_PR; only useful once a thread already exists (e.g. you were mentioned or already participated). Requires the notifications toolset, off by default. gh api -X PUT "notifications/threads/<thread_id>/subscription" -f subscribed=true mcp__github__manage_notification_subscription (action=watch)
VIEW_ISSUE Read an issue's details. gh issue view "<N>" mcp__github__issue_read
LIST_ISSUES List issues. gh issue list mcp__github__list_issues
SEARCH_ISSUES Search issues by keyword / query string. gh issue list --search "<query>" mcp__github__search_issues
READ_ISSUE_COMMENTS Read an issue's comments. gh issue view "<N>" --comments mcp__github__issue_read (method=get_comments)
ISSUE_LINKED_PRS List the pull requests cross-referenced from an issue's timeline (i.e. PRs that link or close it). gh api --paginate "repos/<owner>/<repo>/issues/<N>/timeline" (no GitHub MCP tool; approximate with SEARCH_PRS)
CREATE_ISSUE Open a new issue. An agent-filed issue carries the ai-authored and model:<model-id> labels --- see issue-first and label-agent-filed-issues. The MCP path accepts labels on method=create, and silently creates an unknown label name rather than rejecting it. gh issue create mcp__github__issue_write (method=create)
COMMENT_ISSUE Post a comment on an issue. The body ends with the agent-disclosure marker --- see disclose-agent-authorship. gh issue comment "<N>" --body "..." mcp__github__add_issue_comment
CLOSE_ISSUE Close an issue with a reason. gh issue close "<N>" --reason "..." mcp__github__issue_write (method=update, state=closed, state_reason=...)
REOPEN_ISSUE Reopen a closed issue. The body ends with the agent-disclosure marker --- see disclose-agent-authorship. gh issue reopen "<N>" --comment "..." mcp__github__issue_write (method=update, state=open)
LABEL_ISSUE Set an issue's labels. The two behave differently and are not interchangeable: --add-label ADDS to the existing set, while the MCP path REPLACES the whole set, so pass the union of existing and new labels there. The MCP path also silently creates an unknown label name instead of rejecting it. gh issue edit "<N>" --add-label "..." mcp__github__issue_write (method=update, labels=[...])
GET_LABEL Read a single label's name, color, and description. There is no MCP tool to create or update a label; use gh label create/edit, or gh api from a workflow. gh api "repos/<owner>/<repo>/labels/<name>" mcp__github__get_label
LIST_DISCUSSIONS List a repository's discussions. Readable over REST; writes are GraphQL-only. gh api repos/{owner}/{repo}/discussions mcp__github__list_discussions
VIEW_DISCUSSION Read a discussion topic and its comment thread. Readable over REST. gh api repos/{owner}/{repo}/discussions/{number}[/comments] mcp__github__get_discussion / mcp__github__get_discussion_comments
COMMENT_DISCUSSION Post a reply on a discussion (top-level or threaded). The body ends with the agent-disclosure marker --- see disclose-agent-authorship. gh api graphql (addDiscussionComment) mcp__github__discussion_comment_write (method=add|reply)
ANSWER_DISCUSSION Mark a comment as the accepted answer on a Q&A discussion. gh api graphql (markDiscussionCommentAsAnswer) mcp__github__discussion_comment_write (method=mark_answer)
CREATE_DISCUSSION Open a new discussion in a category. gh api graphql (createDiscussion) (no GitHub MCP tool; use gh api graphql)
CLOSE_DISCUSSION Close a discussion with a reason (RESOLVED, OUTDATED, DUPLICATE). gh api graphql (closeDiscussion) (no GitHub MCP tool; use gh api graphql)
PUSH Push commits to a branch. git push -u origin "<branch>" (use git; no GitHub MCP equivalent)
COMMIT Record staged changes as a commit. git commit -m "..." (use git; mcp__github__create_or_update_file commits a single file)
FETCH Fetch refs from the remote. git fetch origin "<branch>" (use git; no GitHub MCP equivalent)
MERGE_BRANCH Merge a branch into the current one. git merge "origin/<branch>" (use git; no GitHub MCP equivalent)
CREATE_BRANCH Create a new branch (e.g. off the default branch). git switch -c "<branch>" "origin/<base>" mcp__github__create_branch
CREATE_WORKTREE Create a dedicated worktree on a new branch off the default branch, so parallel sessions never share a checkout (AGENTS.md "Worktree isolation"). git worktree add "../<repo>-<slug>" -b "<branch>" "origin/<base>" (use git; no GitHub MCP equivalent)
DELETE_REF Delete a remote branch or tag ref. git push origin --delete "<branch>" (or git push origin ":refs/tags/<tag>") (no GitHub MCP tool; use gh api -X DELETE "repos///git/refs/heads/")
READ_FILE Read a file's contents from the repo. gh api "repos/<owner>/<repo>/contents/<path>" mcp__github__get_file_contents
LIST_COMMITS List a branch's commits (pass the branch or ref as sha, e.g. sha=gh-pages to see which build a Pages branch currently serves). git log "<branch>" (or gh api "repos/<owner>/<repo>/commits" -f "sha=<branch>") mcp__github__list_commits
WRITE_FILE Create or update file(s) on a branch. The MCP tools do it in one call; the CLI path is two Bash calls, never one --- stage and commit here, then run the PUSH operation separately; hooks/no-commit-chained-to-push.py refuses the chained form. git add "<path>" && git commit -m "..." mcp__github__create_or_update_file (one file) / mcp__github__push_files (multiple)
LIST_SECRETS List a repo's Actions secrets. The value is never readable, so this can confirm a secret exists and when it last changed, never what it is or whether it works. Use the REST endpoint when created_at is needed: gh secret list --json offers name, numSelectedRepos, selectedReposURL, updatedAt, and visibility (gh 2.96.0), so updatedAt is available from the CLI but created_at is not. --paginate needs the --jq '.secrets[]' projection: the endpoint returns an object rather than an array, so a bare --paginate concatenates one object per page and the result is not valid JSON. gh api "repos/<owner>/<repo>/actions/secrets" --paginate --jq '.secrets[]' (no GitHub MCP tool; use gh api)
SET_SECRET Set an Actions secret. Omit --body so the value is read from stdin, keeping it out of argv (visible in ps) and shell history. Exiting 0 means the value was stored, not that it is valid. gh secret set "<name>" --repo "<owner>/<repo>" (no GitHub MCP tool; use gh)
RUN_WORKFLOW Dispatch a workflow_dispatch workflow run on a ref. Pass --ref explicitly; omitting it dispatches against the default branch, which is rarely what a PR-scoped dispatch wants. The MCP tool's ref is required for the same reason. gh workflow run "<workflow>.yml" --repo "<owner>/<repo>" --ref "<branch>" --field "<key>=<value>" mcp__github__actions_run_trigger (method=run_workflow)
LIST_WORKFLOW_RUNS List a workflow's recent runs, with conclusion and timestamps. gh run list --workflow "<workflow>.yml" --repo "<owner>/<repo>" mcp__github__actions_list (method=list_workflow_runs)
GET_WORKFLOW_RUN Read a workflow run's details, status, and conclusion. gh run view "<run_id>" --repo "<owner>/<repo>" (or gh api "repos/<owner>/<repo>/actions/runs/<run_id>") mcp__github__actions_get (method=get_workflow_run)