一键导入
pr-create
// Create a GitHub pull request from the current branch. Validates preconditions, generates title and description, and opens the PR as draft. Use when the user asks to create a PR, open a pull request, or submit changes for review.
// Create a GitHub pull request from the current branch. Validates preconditions, generates title and description, and opens the PR as draft. Use when the user asks to create a PR, open a pull request, or submit changes for review.
Create and update repo-local skills that follow the MetaMask Mobile standard. Use for new repo-local skills, skill entrypoints, or harness shims in this repository.
Add and fix Detox E2E tests (smoke and regression) for MetaMask Mobile using withFixtures, Page Objects, and tests/framework. Use when creating a new spec, fixing a failing E2E test, adding page objects and selectors, or adding MetaMetrics analytics expectations (analyticsExpectations).
Write, fix, and update component view tests (*.view.test.tsx) for MetaMask Mobile using the tests/component-view/ framework. Use when creating a new view test file, fixing a failing view test, updating tests after a component change, or creating a new renderer or preset for a view.
Create and review E2E performance tests that measure real user flows on real devices with TimerHelper and PerformanceTracker. Use when creating, editing, or reviewing performance tests, when the user mentions perf tests, timing measurements, performance thresholds, or files in tests/performance/.
Creates or removes a git worktree using the project scripts and shared config. Use when the user asks to create a worktree, add a worktree, remove a worktree, delete a worktree, or work on a parallel branch in a separate directory.
Generate a CHANGELOG entry line for a pull request from code changes. Use when the user asks to write a changelog entry, fill the changelog section of a PR, or determine if changes are user-facing.
| name | pr-create |
| description | Create a GitHub pull request from the current branch. Validates preconditions, generates title and description, and opens the PR as draft. Use when the user asks to create a PR, open a pull request, or submit changes for review. |
git rev-parse --abbrev-ref HEAD
git status --porcelain
git rev-parse --verify origin/<branch>
main --> abort: "Cannot create a PR from main"AskQuestion tool to ask whether to push, with options "Yes, push" and "No, abort" (default: No, abort). Never push without explicit user consent.Generate a PR description for the current branch (see pr-description skill if available).
Run these two steps concurrently since they are independent:
3a. Create the PR
Prefer gh CLI:
gh pr create \
--title "<generated title>" \
--body "<generated body>" \
--base main \
--assignee @me \
--draft
Fallback to GitHub MCP (create_pull_request tool from user-github server):
{
"server": "user-github",
"toolName": "create_pull_request",
"arguments": {
"owner": "MetaMask",
"repo": "metamask-mobile",
"title": "<generated title>",
"body": "<generated body>",
"head": "<branch-name>",
"base": "main",
"draft": true
}
}
3b. Identify code owners
Identify code owners and their Slack handles for the changed files (see pr-codeowners skill if available). This only depends on the diff, not the PR itself.
If code owners were found:
PR ready for review: <PR title>
<PR URL>
<one-line summary of what changed>
cc @<slack-handle-1> @<slack-handle-2>
If no code owners (or only the author's own team):
PR ready for review: <PR title>
<PR URL>
<one-line summary of what changed>
Tell the user they can paste it in #metamask-mobile-dev in the "Mobile PRs that need review" thread of the day.
Use the AskQuestion tool to ask whether to add the PR to the PR review queue, with options "Yes" and "No" (default: Yes). If yes, invoke the pr-review-queue skill if available.
@memain branchadd-team-label.yml) on PR open