[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71SXG126QKTAWDQ5Q7QGWTH":3,"skill-same:01M71SXG126QKTAWDQ5Q7QGWTH":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":6,"updatedAt":56,"install":57,"resources":70},"01M71SXG126QKTAWDQ5Q7QGWTH","pr-review",null,"Fetch open GitHub PR data (diff, files, CI, metadata), perform AI code review using strict KISS\u002FDRY\u002FSOLID rules, save results locally, and present categorized findings. Trigger - any GitHub PR URL or request to \"review PR\", \"check PR\", \"review open PR\".","Artawower\u002Fkaizen","Artawower","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F16963833?v=4","01M71SV5H0DRR8KXVGD4R51Z99","Art","01M71SV5J1B97T7349GGXQCYXT",2,"GPL-3.0","https:\u002F\u002Fgithub.com\u002FArtawower\u002Fkaizen\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_agents\u002Fskills\u002Fpr-review\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"pr","pr review","review","Rules","review pr","trigger","diff","save","present","data","ai code review","request","dry","code","URL","files","open","ci","code review","fetch","2026-11-10 13:02:02",false,"---\nname: pr-review\ndescription: Fetch open GitHub PR data (diff, files, CI, metadata), perform AI code review using strict KISS\u002FDRY\u002FSOLID rules, save results locally, and present categorized findings. Trigger - any GitHub PR URL or request to \"review PR\", \"check PR\", \"review open PR\".\n---\n\n## What I do\n\nPerform end-to-end AI code review of GitHub Pull Requests:\n1. Fetch PR data (diff, files, metadata, CI status, existing reviews) via a bundled Python script\n2. Analyze each changed file against strict code review rules\n3. Categorize findings by severity\n4. Save results locally (JSON + Markdown) for persistent analysis\n5. Present structured review report\n6. Optionally: post comments to GitHub or apply fixes\n\n## When to use me\n\n- User shares a GitHub PR URL and wants a code review\n- User asks to \"review PR\", \"check PR code\", \"review open PR\"\n- User wants to analyze PR quality before merging\n- User wants to compare reviews across multiple PRs (saved locally)\n\n## WORKFLOW\n\n### STEP 1: Fetch PR data\n\nRun the bundled script. It handles URL parsing, GraphQL + REST queries, filtering, chunking, and saves data locally:\n\n```bash\npython3 ~\u002F.agents\u002Fskills\u002Fpr-review\u002Ffetch-pr-data.py \u003CPR_REFERENCE>\n```\n\nSupported input formats:\n- `https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo\u002Fpull\u002F123`\n- `owner\u002Frepo#123`\n- `owner\u002Frepo 123`\n- Just `123` (infers owner\u002Frepo from current git repo)\n\nThe script **automatically**:\n- **Filters out** lock files, generated code, vendor dirs, minified files, source maps, snapshots\n- **Prioritizes** source code (.ts\u002F.py\u002F.go\u002Fetc) over config over docs\u002Fassets\n- **Truncates** PR body to 500 chars (configurable via `--max-body`)\n- **Removes diff duplication** (only `file_patches` with per-file patches, no full unified diff)\n- **Chunks large PRs** into groups of 20 files (configurable via `--chunk-size`)\n\nOutput JSON saved to `~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F`:\n```json\n{\n  \"repo\": \"owner\u002Frepo\",\n  \"pr_number\": 123,\n  \"title\": \"Add auth middleware\",\n  \"body\": \"PR description (truncated)...\",\n  \"stats\": {\n    \"additions\": 150, \"deletions\": 30, \"changed_files\": 25,\n    \"reviewable_files\": 20, \"skipped_files\": 5,\n    \"total_review_tokens_est\": 35000\n  },\n  \"ci\": { \"state\": \"SUCCESS\", \"checks\": [...] },\n  \"reviews\": [...],\n  \"skipped_files\": [\"package-lock.json\", \"dist\u002Fbundle.min.js\"],\n  \"chunking\": {\n    \"total_chunks\": 2,\n    \"chunk_size\": 20,\n    \"chunks\": [\n      { \"chunk\": 1, \"files\": 20, \"tokens_est\": 25000, \"file_paths\": [...] },\n      { \"chunk\": 2, \"files\": 5,  \"tokens_est\": 10000, \"file_paths\": [...] }\n    ]\n  },\n  \"file_patches\": [...]\n}\n```\n\n**If PR fits in 1 chunk** (≤20 files, ~40k tokens): `file_patches` is included inline — proceed to STEP 2.\n**If PR needs multiple chunks**: `file_patches` is NOT included. Use chunked workflow (see STEP 1b).\n\nIf the script fails with auth error, tell user to run `gh auth login`.\nIf the PR is a draft, warn the user and ask if they still want to review.\n\n### STEP 1b: Chunked review (large PRs only)\n\nWhen `chunking.total_chunks > 1`, review chunk-by-chunk:\n\n```bash\npython3 ~\u002F.agents\u002Fskills\u002Fpr-review\u002Ffetch-pr-data.py \u003CPR_REFERENCE> --chunk 1\npython3 ~\u002F.agents\u002Fskills\u002Fpr-review\u002Ffetch-pr-data.py \u003CPR_REFERENCE> --chunk 2\n```\n\nEach chunk returns only its file patches:\n```json\n{\n  \"chunk\": 1,\n  \"total_chunks\": 3,\n  \"files_in_chunk\": 20,\n  \"tokens_est\": 25000,\n  \"file_patches\": [...]\n}\n```\n\n**Chunked workflow**:\n1. Run script without `--chunk` — get metadata + chunking plan\n2. For each chunk N (1 to total_chunks):\n   a. Run script with `--chunk N` — get file patches for this chunk\n   b. Review this chunk's files (STEP 3)\n   c. Collect findings\n3. After all chunks: merge findings, deduplicate cross-file issues, proceed to STEP 4\n\n**Important**: When reviewing chunks, keep the metadata from step 1 in context (CI status, PR description, existing reviews). Only the file_patches change per chunk.\n\n### STEP 2: Pre-review context\n\nBefore reviewing, gather context:\n\n1. **Read PR description** (`body`) — understand the intent and scope\n2. **Check CI status** — note failures, they may indicate broken code\n3. **Check existing reviews** — note previous reviewer feedback\n4. **Check unresolved threads** — avoid duplicating existing feedback\n5. **Scan file list** — identify the scope (frontend, backend, infra, tests)\n6. **If the project has AGENTS.md** — read it to understand project-specific rules and conventions\n\n### STEP 3: Review each changed file\n\nFor each file in `file_patches`, analyze the `patch` (diff) against the review rules.\n\nLoad `..\u002F..\u002Freferences\u002Fcode-reviewer.md` and apply its shared review\npolicy to the requested PR diff. Prioritize verified defects and regressions,\nrespect project conventions and keep optional suggestions separate from blockers.\n\n### STEP 4: Categorize findings\n\nGroup all findings into severity categories:\n\n- **CRITICAL** — Blocking: bugs, security vulns, data loss risks, broken functionality\n- **MAJOR** — Should fix: architecture violations, missing error handling, performance issues, missing tests\n- **MINOR** — Nice to fix: style, naming, code quality improvements, minor DRY violations\n- **INFO** — Observations: positive patterns noticed, architectural notes, suggestions for future\n\n### STEP 5: Save results locally\n\nSave the review in two formats:\n\n#### JSON (for programmatic analysis):\n\nSave to `~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F{owner}_{repo}_{pr_number}_review.json`:\n\n```json\n{\n  \"reviewed_at\": \"2026-02-16T17:33:04Z\",\n  \"repo\": \"owner\u002Frepo\",\n  \"pr_number\": 123,\n  \"pr_url\": \"https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo\u002Fpull\u002F123\",\n  \"title\": \"PR title\",\n  \"author\": \"developer\",\n  \"stats\": { \"additions\": 150, \"deletions\": 30, \"changed_files\": 5 },\n  \"ci_state\": \"SUCCESS\",\n  \"verdict\": \"CHANGES_REQUESTED\",\n  \"summary\": \"One paragraph summary...\",\n  \"findings\": [\n    {\n      \"severity\": \"critical\",\n      \"category\": \"security\",\n      \"file\": \"src\u002Fauth.ts\",\n      \"line\": 42,\n      \"title\": \"SQL injection via unsanitized input\",\n      \"description\": \"User input passed directly to query without parameterization\",\n      \"suggestion\": \"Use parameterized query: db.query('SELECT * FROM users WHERE id = $1', [userId])\"\n    }\n  ],\n  \"finding_counts\": {\n    \"critical\": 1,\n    \"major\": 3,\n    \"minor\": 5,\n    \"info\": 2\n  },\n  \"files_reviewed\": 5\n}\n```\n\n#### Markdown (for human reading):\n\nSave to `~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F{owner}_{repo}_{pr_number}_review.md`.\n\nUse the OUTPUT FORMAT from Step 6.\n\n### STEP 6: Present review to user\n\nUse this STRICT output format:\n\n```\n## PR Review: {TITLE}\n**URL**: {PR_URL}\n**Author**: @{AUTHOR} | **Branch**: {HEAD} → {BASE}\n**Stats**: +{ADDITIONS} -{DELETIONS} across {CHANGED_FILES} files\n**CI**: {CI_STATE} | **Existing reviews**: {REVIEW_COUNT}\n**Verdict**: {APPROVE | CHANGES_REQUESTED | COMMENT}\n\n---\n\n### 1) Summary\nOne concise paragraph of the biggest issues and the overall direction.\n\n### 2) Critical Issues ({COUNT})\n\n#### [{N}] {FILE}:{LINE} — {TITLE}\n**Category**: {security|bug|data-loss}\n> {description of the issue}\n**Fix**: {specific fix with code if needed}\n\n### 3) Major Issues ({COUNT})\n\n#### [{N}] {FILE}:{LINE} — {TITLE}\n**Category**: {architecture|error-handling|performance|testing}\n> {description}\n**Fix**: {specific fix}\n\n### 4) Minor \u002F Style ({COUNT})\n- [{N}] {FILE}:{LINE} — {short description} → {fix}\n\n### 5) Security & Robustness\n- Input validation: {assessment}\n- Error handling: {assessment}\n- Resource cleanup: {assessment}\n- Race conditions: {assessment}\n\n### 6) Proposed Refactor (≤5 steps)\n1. {step 1}\n2. {step 2}\n...\n\n### 7) Tests to Add\n- `{testName}`: {what it asserts}\n\n### 8) Positive Patterns\n- {what's done well — acknowledge good code}\n\n---\n\n**Saved to**: `{path_to_json}` and `{path_to_md}`\n```\n\n### STEP 7: Ask for action\n\n```\nWhat would you like to do?\n- \"post\" — post findings as PR review comments on GitHub\n- \"fix N,N,N\" — apply fixes for specific findings (by number)\n- \"fix all\" — fix all critical + major issues\n- \"compare\" — compare with previous review of this PR\n- \"done\" — review complete, no further action\n```\n\nWait for user response. Do NOT proceed without explicit instruction.\n\n### STEP 8: Execute action (if requested)\n\n#### If \"post\":\nPost review via `gh api` as a single review with inline comments:\n```bash\ngh api \u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{pr}\u002Freviews \\\n  -f commit_id='{head_sha}' \\\n  -f event='COMMENT' \\\n  -f body='AI Review Summary...' \\\n  -f comments[][path]='file.ts' \\\n  -F comments[][line]=42 \\\n  -f comments[][body]='Finding description'\n```\n\n#### If \"fix\":\n1. Checkout the PR branch: `gh pr checkout {pr_number}`\n2. For each selected finding, read the file and apply minimal fix\n3. Run `lsp_diagnostics` on changed files\n4. Report what was fixed\n\n#### If \"compare\":\nLoad previous review from `~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F` and diff findings.\n\n## Hard rules\n\n- NEVER push changes without explicit user permission\n- NEVER approve\u002Fdismiss reviews on GitHub without explicit user permission\n- NEVER modify files not mentioned in the PR diff\n- NEVER ignore AGENTS.md \u002F project-specific rules if the project has them\n- If `gh` is not authenticated — tell user to run `gh auth login` and stop\n- Answer in the same language the user uses\n- Review ONLY the diff — don't critique pre-existing code outside the PR scope\n- Be objective: acknowledge good patterns, don't only criticize\n- Focus on impact: a real bug > 10 style nitpicks\n\n## Context budget\n\nThe script estimates token usage and reports it in `stats.total_review_tokens_est`.\n\n| PR size | Tokens est | Strategy |\n|---------|-----------|----------|\n| ≤20 files, \u003C40k tokens | ~5-40k | Single pass (default) |\n| 20-100 files, 40-200k tokens | ~40-200k | Chunked (auto) |\n| >100 files | >200k | Chunked + consider `--chunk-size 15` for tighter chunks |\n\nAdjust chunk size if needed: `--chunk-size 15` for large patches, `--chunk-size 30` for small ones.\n\n## Viewing saved reviews\n\nAll reviews are saved persistently in `~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F`:\n- `{owner}_{repo}_{pr}_review.json` — structured data\n- `{owner}_{repo}_{pr}_review.md` — human-readable report\n- `{owner}_{repo}_{pr}.json` — raw PR data from fetch\n- `{owner}_{repo}_{pr}_chunkN.json` — chunk data (large PRs)\n\nTo list saved reviews:\n```bash\nls -la ~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F\n```\n\nTo re-analyze a previously fetched PR without re-fetching:\n```bash\ncat ~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F{owner}_{repo}_{pr}.json\n```\n","## What I do\n\nPerform end-to-end AI code review of GitHub Pull Requests:\n1. Fetch PR data (diff, files, metadata, CI status, existing reviews) via a bundled Python script\n2. Analyze each changed file against strict code review rules\n3. Categorize findings by severity\n4. Save results locally (JSON + Markdown) for persistent analysis\n5. Present structured review report\n6. Optionally: post comments to GitHub or apply fixes\n\n## When to use me\n\n- User shares a GitHub PR URL and wants a code review\n- User asks to \"review PR\", \"check PR code\", \"review open PR\"\n- User wants to analyze PR quality before merging\n- User wants to compare reviews across multiple PRs (saved locally)\n\n## WORKFLOW\n\n### STEP 1: Fetch PR data\n\nRun the bundled script. It handles URL parsing, GraphQL + REST queries, filtering, chunking, and saves data locally:\n\n```bash\npython3 ~\u002F.agents\u002Fskills\u002Fpr-review\u002Ffetch-pr-data.py \u003CPR_REFERENCE>\n```\n\nSupported input formats:\n- `https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo\u002Fpull\u002F123`\n- `owner\u002Frepo#123`\n- `owner\u002Frepo 123`\n- Just `123` (infers owner\u002Frepo from current git repo)\n\nThe script **automatically**:\n- **Filters out** lock files, generated code, vendor dirs, minified files, source maps, snapshots\n- **Prioritizes** source code (.ts\u002F.py\u002F.go\u002Fetc) over config over docs\u002Fassets\n- **Truncates** PR body to 500 chars (configurable via `--max-body`)\n- **Removes diff duplication** (only `file_patches` with per-file patches, no full unified diff)\n- **Chunks large PRs** into groups of 20 files (configurable via `--chunk-size`)\n\nOutput JSON saved to `~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F`:\n```json\n{\n  \"repo\": \"owner\u002Frepo\",\n  \"pr_number\": 123,\n  \"title\": \"Add auth middleware\",\n  \"body\": \"PR description (truncated)...\",\n  \"stats\": {\n    \"additions\": 150, \"deletions\": 30, \"changed_files\": 25,\n    \"reviewable_files\": 20, \"skipped_files\": 5,\n    \"total_review_tokens_est\": 35000\n  },\n  \"ci\": { \"state\": \"SUCCESS\", \"checks\": [...] },\n  \"reviews\": [...],\n  \"skipped_files\": [\"package-lock.json\", \"dist\u002Fbundle.min.js\"],\n  \"chunking\": {\n    \"total_chunks\": 2,\n    \"chunk_size\": 20,\n    \"chunks\": [\n      { \"chunk\": 1, \"files\": 20, \"tokens_est\": 25000, \"file_paths\": [...] },\n      { \"chunk\": 2, \"files\": 5,  \"tokens_est\": 10000, \"file_paths\": [...] }\n    ]\n  },\n  \"file_patches\": [...]\n}\n```\n\n**If PR fits in 1 chunk** (≤20 files, ~40k tokens): `file_patches` is included inline — proceed to STEP 2.\n**If PR needs multiple chunks**: `file_patches` is NOT included. Use chunked workflow (see STEP 1b).\n\nIf the script fails with auth error, tell user to run `gh auth login`.\nIf the PR is a draft, warn the user and ask if they still want to review.\n\n### STEP 1b: Chunked review (large PRs only)\n\nWhen `chunking.total_chunks > 1`, review chunk-by-chunk:\n\n```bash\npython3 ~\u002F.agents\u002Fskills\u002Fpr-review\u002Ffetch-pr-data.py \u003CPR_REFERENCE> --chunk 1\npython3 ~\u002F.agents\u002Fskills\u002Fpr-review\u002Ffetch-pr-data.py \u003CPR_REFERENCE> --chunk 2\n```\n\nEach chunk returns only its file patches:\n```json\n{\n  \"chunk\": 1,\n  \"total_chunks\": 3,\n  \"files_in_chunk\": 20,\n  \"tokens_est\": 25000,\n  \"file_patches\": [...]\n}\n```\n\n**Chunked workflow**:\n1. Run script without `--chunk` — get metadata + chunking plan\n2. For each chunk N (1 to total_chunks):\n   a. Run script with `--chunk N` — get file patches for this chunk\n   b. Review this chunk's files (STEP 3)\n   c. Collect findings\n3. After all chunks: merge findings, deduplicate cross-file issues, proceed to STEP 4\n\n**Important**: When reviewing chunks, keep the metadata from step 1 in context (CI status, PR description, existing reviews). Only the file_patches change per chunk.\n\n### STEP 2: Pre-review context\n\nBefore reviewing, gather context:\n\n1. **Read PR description** (`body`) — understand the intent and scope\n2. **Check CI status** — note failures, they may indicate broken code\n3. **Check existing reviews** — note previous reviewer feedback\n4. **Check unresolved threads** — avoid duplicating existing feedback\n5. **Scan file list** — identify the scope (frontend, backend, infra, tests)\n6. **If the project has AGENTS.md** — read it to understand project-specific rules and conventions\n\n### STEP 3: Review each changed file\n\nFor each file in `file_patches`, analyze the `patch` (diff) against the review rules.\n\nLoad `..\u002F..\u002Freferences\u002Fcode-reviewer.md` and apply its shared review\npolicy to the requested PR diff. Prioritize verified defects and regressions,\nrespect project conventions and keep optional suggestions separate from blockers.\n\n### STEP 4: Categorize findings\n\nGroup all findings into severity categories:\n\n- **CRITICAL** — Blocking: bugs, security vulns, data loss risks, broken functionality\n- **MAJOR** — Should fix: architecture violations, missing error handling, performance issues, missing tests\n- **MINOR** — Nice to fix: style, naming, code quality improvements, minor DRY violations\n- **INFO** — Observations: positive patterns noticed, architectural notes, suggestions for future\n\n### STEP 5: Save results locally\n\nSave the review in two formats:\n\n#### JSON (for programmatic analysis):\n\nSave to `~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F{owner}_{repo}_{pr_number}_review.json`:\n\n```json\n{\n  \"reviewed_at\": \"2026-02-16T17:33:04Z\",\n  \"repo\": \"owner\u002Frepo\",\n  \"pr_number\": 123,\n  \"pr_url\": \"https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo\u002Fpull\u002F123\",\n  \"title\": \"PR title\",\n  \"author\": \"developer\",\n  \"stats\": { \"additions\": 150, \"deletions\": 30, \"changed_files\": 5 },\n  \"ci_state\": \"SUCCESS\",\n  \"verdict\": \"CHANGES_REQUESTED\",\n  \"summary\": \"One paragraph summary...\",\n  \"findings\": [\n    {\n      \"severity\": \"critical\",\n      \"category\": \"security\",\n      \"file\": \"src\u002Fauth.ts\",\n      \"line\": 42,\n      \"title\": \"SQL injection via unsanitized input\",\n      \"description\": \"User input passed directly to query without parameterization\",\n      \"suggestion\": \"Use parameterized query: db.query('SELECT * FROM users WHERE id = $1', [userId])\"\n    }\n  ],\n  \"finding_counts\": {\n    \"critical\": 1,\n    \"major\": 3,\n    \"minor\": 5,\n    \"info\": 2\n  },\n  \"files_reviewed\": 5\n}\n```\n\n#### Markdown (for human reading):\n\nSave to `~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F{owner}_{repo}_{pr_number}_review.md`.\n\nUse the OUTPUT FORMAT from Step 6.\n\n### STEP 6: Present review to user\n\nUse this STRICT output format:\n\n```\n## PR Review: {TITLE}\n**URL**: {PR_URL}\n**Author**: @{AUTHOR} | **Branch**: {HEAD} → {BASE}\n**Stats**: +{ADDITIONS} -{DELETIONS} across {CHANGED_FILES} files\n**CI**: {CI_STATE} | **Existing reviews**: {REVIEW_COUNT}\n**Verdict**: {APPROVE | CHANGES_REQUESTED | COMMENT}\n\n---\n\n### 1) Summary\nOne concise paragraph of the biggest issues and the overall direction.\n\n### 2) Critical Issues ({COUNT})\n\n#### [{N}] {FILE}:{LINE} — {TITLE}\n**Category**: {security|bug|data-loss}\n> {description of the issue}\n**Fix**: {specific fix with code if needed}\n\n### 3) Major Issues ({COUNT})\n\n#### [{N}] {FILE}:{LINE} — {TITLE}\n**Category**: {architecture|error-handling|performance|testing}\n> {description}\n**Fix**: {specific fix}\n\n### 4) Minor \u002F Style ({COUNT})\n- [{N}] {FILE}:{LINE} — {short description} → {fix}\n\n### 5) Security & Robustness\n- Input validation: {assessment}\n- Error handling: {assessment}\n- Resource cleanup: {assessment}\n- Race conditions: {assessment}\n\n### 6) Proposed Refactor (≤5 steps)\n1. {step 1}\n2. {step 2}\n...\n\n### 7) Tests to Add\n- `{testName}`: {what it asserts}\n\n### 8) Positive Patterns\n- {what's done well — acknowledge good code}\n\n---\n\n**Saved to**: `{path_to_json}` and `{path_to_md}`\n```\n\n### STEP 7: Ask for action\n\n```\nWhat would you like to do?\n- \"post\" — post findings as PR review comments on GitHub\n- \"fix N,N,N\" — apply fixes for specific findings (by number)\n- \"fix all\" — fix all critical + major issues\n- \"compare\" — compare with previous review of this PR\n- \"done\" — review complete, no further action\n```\n\nWait for user response. Do NOT proceed without explicit instruction.\n\n### STEP 8: Execute action (if requested)\n\n#### If \"post\":\nPost review via `gh api` as a single review with inline comments:\n```bash\ngh api \u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{pr}\u002Freviews \\\n  -f commit_id='{head_sha}' \\\n  -f event='COMMENT' \\\n  -f body='AI Review Summary...' \\\n  -f comments[][path]='file.ts' \\\n  -F comments[][line]=42 \\\n  -f comments[][body]='Finding description'\n```\n\n#### If \"fix\":\n1. Checkout the PR branch: `gh pr checkout {pr_number}`\n2. For each selected finding, read the file and apply minimal fix\n3. Run `lsp_diagnostics` on changed files\n4. Report what was fixed\n\n#### If \"compare\":\nLoad previous review from `~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F` and diff findings.\n\n## Hard rules\n\n- NEVER push changes without explicit user permission\n- NEVER approve\u002Fdismiss reviews on GitHub without explicit user permission\n- NEVER modify files not mentioned in the PR diff\n- NEVER ignore AGENTS.md \u002F project-specific rules if the project has them\n- If `gh` is not authenticated — tell user to run `gh auth login` and stop\n- Answer in the same language the user uses\n- Review ONLY the diff — don't critique pre-existing code outside the PR scope\n- Be objective: acknowledge good patterns, don't only criticize\n- Focus on impact: a real bug > 10 style nitpicks\n\n## Context budget\n\nThe script estimates token usage and reports it in `stats.total_review_tokens_est`.\n\n| PR size | Tokens est | Strategy |\n|---------|-----------|----------|\n| ≤20 files, \u003C40k tokens | ~5-40k | Single pass (default) |\n| 20-100 files, 40-200k tokens | ~40-200k | Chunked (auto) |\n| >100 files | >200k | Chunked + consider `--chunk-size 15` for tighter chunks |\n\nAdjust chunk size if needed: `--chunk-size 15` for large patches, `--chunk-size 30` for small ones.\n\n## Viewing saved reviews\n\nAll reviews are saved persistently in `~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F`:\n- `{owner}_{repo}_{pr}_review.json` — structured data\n- `{owner}_{repo}_{pr}_review.md` — human-readable report\n- `{owner}_{repo}_{pr}.json` — raw PR data from fetch\n- `{owner}_{repo}_{pr}_chunkN.json` — chunk data (large PRs)\n\nTo list saved reviews:\n```bash\nls -la ~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F\n```\n\nTo re-analyze a previously fetched PR without re-fetching:\n```bash\ncat ~\u002F.local\u002Fshare\u002Fai\u002Fpr-reviews\u002F{owner}_{repo}_{pr}.json\n```\n",{"name":5,"description":7},"master","cbded6c96796a063405af105d5b3209ab6219407","dotfiles\u002Fdot_agents\u002Fskills\u002Fpr-review",0,"https:\u002F\u002Fgithub.com\u002FArtawower\u002Fkaizen","https:\u002F\u002Fgithub.com\u002FArtawower","workationmode.com","2026-11-10 19:23:03",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add Artawower\u002Fkaizen --skill pr-review",{"tool":63,"command":64},"bunx","bunx skills add Artawower\u002Fkaizen --skill pr-review",{"tool":66,"command":67},"pnpm","pnpm dlx skills add Artawower\u002Fkaizen --skill pr-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FArtawower\u002Fkaizen\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_agents\u002Fskills\u002Fpr-review\u002FSKILL.md",true,[71],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"fetch-pr-data.py","SCRIPT","脚本",15407,"https:\u002F\u002Fgithub.com\u002FArtawower\u002Fkaizen\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_agents\u002Fskills\u002Fpr-review\u002Ffetch-pr-data.py",[78,105,125,149,169,195],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":87,"publishedAt":44},"01M71SYJ1B45ZKM8J96AZ3TS0H","yt-analyze","Fetch YouTrack task + comments via MCP, critically analyze relevance and requirements, produce concise summary of what to implement, and build an implementation plan mapped to codebase. Trigger - YouTrack issue ID or request to \"analyze task\", \"plan task\", \"break down YT issue\".","https:\u002F\u002Fgithub.com\u002FArtawower\u002Fkaizen\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_agents\u002Fskills\u002Fyt-analyze\u002FSKILL.md",[84],{"categoryNo":85,"categoryName":86,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[88,89,90,43,91,92,93,94,35,95,96,97,98,29,99,100,101,102,103,104],"analyze","yt analyze","yt","implementation plan","MCP","plan task","plan","break","issue","youtrack","down","produce","break down","comments","requirements","implement","task",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":44},"01M71SYF7RSTEXKDWPXJ08EVQG","youtrack-task","Analyzes a YouTrack issue, reviews comments and attachments, and proposes or creates actionable subtasks. Use when the user gives a YouTrack issue ID and wants synthesis, decomposition, or follow-up tasks.","https:\u002F\u002Fgithub.com\u002FArtawower\u002Fkaizen\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_agents\u002Fskills\u002Fyoutrack-task\u002FSKILL.md",[],[112,97,104,113,114,115,116,117,118,96,119,120,121,101,122,123,124],"youtrack task","id","reviews","attachments","decomposition","actionable","up","follow-up","use","when","tasks","Synthesis","user",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":44},"01M71SYCE94601T6DA5G2GDKYA","youtrack-search","Searches YouTrack from natural language or native query syntax and returns a concise report with the most relevant issues. Use when the user wants to find issues, triage work, or translate a plain-language query into YouTrack search.","https:\u002F\u002Fgithub.com\u002FArtawower\u002Fkaizen\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_agents\u002Fskills\u002Fyoutrack-search\u002FSKILL.md",[],[132,133,97,134,135,136,137,138,120,121,139,140,141,142,143,144,145,146,147,148],"search","youtrack search","natural language","relevant","translate","issues","plain-language","query","with","work","concise","native","find","report","syntax","triage","plain",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":163,"publishedAt":44},"01M71SYAXN8EA6DDXEZWVY872S","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002FArtawower\u002Fkaizen\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_agents\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[155,158],{"categoryNo":156,"categoryName":157,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":159,"categoryName":160,"taxonomyType":161,"taxonomyTypeDesc":162},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[164,165,166,167,120,168,121],"writing for agents","for","writing","editing","documents",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":178,"publishedAt":44},"01M71SY8ZKMWPF8ZAENT7MQE28","write-a-prd","Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue. Use when user wants to write a PRD, create a product requirements document, or plan a new feature.","https:\u002F\u002Fgithub.com\u002FArtawower\u002Fkaizen\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_agents\u002Fskills\u002Fwrite-a-prd\u002FSKILL.md",[175],{"categoryNo":176,"categoryName":177,"taxonomyType":161,"taxonomyTypeDesc":162},"01JBSEEDCAT000000000000031","产品经理",[179,180,181,182,183,184,185,186,187,188,189,120,190,121,191,192,102,193,194,94],"write","write a prd","prd","interview","as","exploration","feature","submit","design","module","new","document","user interview","codebase exploration","create","new feature",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":199,"categories":200,"keywords":201,"publishedAt":44},"01M71SY6J9F119TJSMA2YBEP5P","vitest","Plan and write Vitest tests for changed code. Analyses git diff, checks existing tests, produces a concrete test plan using flat test structure (no describe\u002Fit blocks). Use when adding tests for new\u002Fchanged code, improving Vitest coverage, or asking what to test after a change.","https:\u002F\u002Fgithub.com\u002FArtawower\u002Fkaizen\u002Fblob\u002Fmaster\u002Fdotfiles\u002Fdot_agents\u002Fskills\u002Fvitest\u002FSKILL.md",[],[197,202,203,30,165,204,189,120,205,206,121,37,207,208,94,209,210,179,211,212],"coverage","test plan","tests","Existing","adding tests","test","structure","change","flat","blocks","git"]