用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/gautam-achieveai/ClaudePlugins --skill update-pr-tracking命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | update-pr-tracking |
| description | Internal helper. Load only when explicitly named by another skill or agent. |
| user-invocable | true |
| disable-model-invocation | false |
| allowed-tools | Read, Write, Edit, Bash, Glob |
Persist review results to local tracking files so future reviews know what was already reviewed and when. This skill is the single source of truth for all tracking file operations — other skills use it rather than writing tracking files directly.
For full schema details, load reference/tracking-schema.md.
The calling skill passes these values as $ARGUMENTS or context:
| Field | Required | Source |
|---|---|---|
prNumber | Yes | PR number from the provider |
title | Yes | PR title |
sourceBranch | Yes | Without refs/heads/ prefix |
targetBranch | Yes | Without refs/heads/ prefix |
author | Yes | PR author (GitHub author.login; ADO createdBy.displayName) |
createdAt | Yes | PR creation date from the provider |
lastKnownPushAt | Yes | Latest push timestamp (GitHub head-commit date; ADO lastMergeSourceCommit.committer.date) |
verdict | Yes | APPROVE, APPROVE_WITH_COMMENTS, REQUEST_CHANGES, or null (if error) |
status | Yes | completed or error |
reviewType | Yes | initial or re-review |
sourceCommitId | No | HEAD commit hash of source branch |
findings | No | { critical, high, medium, low } counts |
commentsSummary | No | Array of top findings (one-line each) |
blockerCount | No | Number of [BLOCKER]-tagged findings |
errorReason | No | Error description if status is error |
Determine the storage path at the target repo root (current working directory, not the plugin repo):
if [ -d ".claude" ]; then
STORAGE_PATH=".claude/.pull-requests"
elif [ -d ".copilot" ]; then
STORAGE_PATH=".copilot/.pull-requests"
else
STORAGE_PATH="scratchpad/pull-requests"
fi
Create $STORAGE_PATH and $STORAGE_PATH/reviews/ if they don't exist.
Resolve the provider and repo coordinates from git remote -v (see
provider-resolution.md):
github.com): provider = "github", repository = <repo>,
project = <owner>, orgUrl = https://github.com/<owner>.dev.azure.com / visualstudio.com): provider = "ado",
repository = <repo>, project = <project>, orgUrl = https://<org>.visualstudio.com/.tracking.jsonRead $STORAGE_PATH/tracking.json.
If not found (first run) — initialize:
{
"version": 1,
"provider": "<github | ado>",
"repository": "<repo>",
"project": "<project | owner>",
"orgUrl": "<org/owner URL>",
"lastRunAt": null,
"pullRequests": {}
}
If found — validate:
repository matches the detected repoproject matches the detected project/ownerIf mismatch → rename to tracking.json.bak, reinitialize, warn user.
If corrupt (invalid JSON) → rename to tracking.json.bak, reinitialize, warn user.
tracking.jsonUpdate (or create) the entry keyed by PR number:
{
"prNumber": <number>,
"title": "<title>",
"sourceBranch": "<source>",
"targetBranch": "<target>",
"author": "<author>",
"status": "active",
"lastKnownPushAt": "<from input>",
"lastReviewedAt": "<current UTC time>",
"lastReviewVerdict": "<verdict from input>",
"lastReviewStatus": "<status from input>",
"reviewCount": <previous + 1, or 1 if new>,
"createdAt": "<from input>"
}
Do NOT update lastRunAt — that field is owned by the
code-reviewer:review-pending-prs batch orchestrator.
Write tracking.json.
reviews/pr-<number>.jsonIf the file doesn't exist, create it:
{
"prNumber": <number>,
"title": "<title>",
"author": "<author>",
"reviews": []
}
Append a new entry to the reviews array:
{
"reviewedAt": "<current UTC time>",
"reviewType": "<from input>",
"verdict": "<from input>",
"status": "<from input>",
"sourceCommitId": "<from input, or null>",
"findings": { "critical": 0, "high": 0, "medium": 0, "low": 0 },
"commentsSummary": [],
"blockerCount": 0
}
Populate findings, commentsSummary, and blockerCount from input if
provided. If status is error, set commentsSummary to
["Review failed: <errorReason>"].
Write the file.
Return a brief confirmation to the calling skill:
Tracking is best-effort. If any write fails, warn the calling skill but do NOT fail the review. The review itself (posted to the PR) is the primary output — tracking is supplementary.
| Scenario | Action |
|---|---|
| Storage path doesn't exist | Create it |
tracking.json corrupt | Rename to .bak, reinitialize, warn |
tracking.json repo mismatch | Rename to .bak, reinitialize, warn |
reviews/ directory missing | Create it |
| Write fails | Warn, return error status to caller |