一键导入
checkout-pr
Add a remote for a given PR's head repository and checkout a local pr-xxx-work branch. Use when the user wants to work on someone else's PR locally.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add a remote for a given PR's head repository and checkout a local pr-xxx-work branch. Use when the user wants to work on someone else's PR locally.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyze an onboard run's performance/scheduling/dependency/dump data using simpler's BUILT-IN DFX tools (simpler_setup.tools.*) instead of hand-rolling instrumentation. Use AFTER an onboard run when you need per-run device timing (Total/Orch/Sched), AICPU scheduler-overhead / Tail-OH breakdown, the task dependency graph, scope ring-fill peaks, or to inspect args dumps. These are simpler's own tools (shipped in the wheel), distinct from any cross-repo workload. Reach for this before writing custom timing/logging into the runtime.
Set up a cross-repo investigation when a workload from another repo (pypto, pypto-lib, etc.) needs to be run, especially when you want to swap in simpler-main HEAD or the current worktree's simpler instead of the version that repo pins. Clones-or-updates each external repo every invocation so stale local clones don't lie about CI parity. MUST invoke before chasing "X doesn't work on simpler" reports where X lives outside this repo.
Summarize user-facing changes merged in the current Friday-anchored week (most recent Friday up through yesterday) in the simpler repo into a markdown changelog with before/after code examples. Also emits a full all-PR inventory (WEEKLY_ALL_PRS) and Chinese (_zh) translations of both docs. Use when the user asks for a weekly changelog, weekly summary, or weekly external changes report.
Detect the host's actual Ascend silicon and refuse mismatched `--platform` onboard hardware test invocations BEFORE any device is locked. MUST invoke this skill before running pytest or task-submit commands that use `--platform a2a3` or `--platform a5` (onboard only — sim variants pass through). Use when invoking onboard hardware tests, repro'ing flaky-test reports, or wrapping pytest in task-submit. Skip for `--platform a2a3sim` / `--platform a5sim` (silicon-agnostic).
Review a GitHub PR by analyzing the correct diff (merge-base to HEAD), reconciling stated vs. real goal, and applying type-specific scrutiny. Optionally folds in independent reviews from local `codex` / `gemini` CLIs when the invocation explicitly opts in (`codex`, `gemini`, or `all` in the arguments). Use when the user asks to review a PR, analyze PR changes, or give feedback on a pull request.
Testing guide and pre-commit testing strategy for PTO Runtime. Use when running tests, adding tests, or deciding what to test before committing.
| name | checkout-pr |
| description | Add a remote for a given PR's head repository and checkout a local pr-xxx-work branch. Use when the user wants to work on someone else's PR locally. |
Add a remote for a PR's head repository (if not already added) and checkout a local working branch.
Accept PR number (123, #123). Required.
PR_DATA=$(gh pr view $PR_NUMBER --repo "$PR_REPO_OWNER/$PR_REPO_NAME" --json \
number,title,headRefName,headRepository,headRepositoryOwner,\
baseRefName,state,maintainerCanModify,author)
HEAD_BRANCH=$(echo "$PR_DATA" | jq -r '.headRefName')
HEAD_REPO_OWNER=$(echo "$PR_DATA" | jq -r '.headRepositoryOwner.login')
HEAD_REPO_NAME=$(echo "$PR_DATA" | jq -r '.headRepository.name')
PR_AUTHOR=$(echo "$PR_DATA" | jq -r '.author.login')
MAINTAINER_CAN_MODIFY=$(echo "$PR_DATA" | jq -r '.maintainerCanModify')
PR_STATE=$(echo "$PR_DATA" | jq -r '.state')
Validate PR state: OPEN (continue), CLOSED (warn user), MERGED (exit).
If the PR head is on the canonical repo ($HEAD_REPO_OWNER == $UPSTREAM_OWNER), use the existing upstream remote. Otherwise, use the PR author's username as the remote name.
if [ "$HEAD_REPO_OWNER" = "$UPSTREAM_OWNER" ]; then
# PR branch is on the canonical repo — use upstream
FORK_REMOTE="upstream"
else
# PR branch is on a fork — use author name as remote
FORK_REMOTE="$HEAD_REPO_OWNER"
if git remote | grep -q "^${FORK_REMOTE}$"; then
echo "Remote '$FORK_REMOTE' already exists, fetching latest..."
else
git remote add "$FORK_REMOTE" \
"git@github.com:$HEAD_REPO_OWNER/$HEAD_REPO_NAME.git"
fi
fi
git fetch "$FORK_REMOTE" "$HEAD_BRANCH"
Run checkout-fork-branch with PUSH_REMOTE=$FORK_REMOTE and HEAD_BRANCH from Step 1.
Print summary:
Remote: $FORK_REMOTE -> git@github.com:$HEAD_REPO_OWNER/$HEAD_REPO_NAME.git
Branch: $LOCAL_BRANCH -> $FORK_REMOTE/$HEAD_BRANCH
Push: PUSH_REMOTE=$FORK_REMOTE BRANCH_NAME=$LOCAL_BRANCH:$HEAD_BRANCH
Remind user that /github-pr and /fix-pr will pick up the correct push target automatically (via upstream tracking).