[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C24KNTD02ZT0S7RYNMBZ45":3,"skill-same:01M6C24KNTD02ZT0S7RYNMBZ45":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":54,"linkOnly":55,"markdownContent":56,"markdownBody":57,"frontMatter":58,"refName":59,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":13,"ownerHtmlUrl":64,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":65,"install":66,"resources":79},"01M6C24KNTD02ZT0S7RYNMBZ45","fixpr","PR 阻塞项修复","Analyze and fix PR blockers (CI failures, merge conflicts, bot\u002Freview feedback) to get a PR into a mergeable state — never merges it. GitHub status is the sole source of truth over local assumptions. Slash command \u002Ffixpr. Also embodied as the copilot-fixpr subagent type for parallel\u002Fautomated PR-fixing dispatch. Use when a PR has failing CI, merge conflicts, or unresolved bot comments and needs to be driven to green.","分析并修复 PR 阻塞项（CI 失败、合并冲突、机器人\u002F审查反馈），使 PR 进入可合并状态 —— 但绝不合并它。GitHub 状态是唯一真实来源，优先于本地假设。斜杠命令 \u002Ffixpr。同时也作为 copilot-fixpr subagent 类型，用于并行\u002F自动化的 PR 修复派发。当 PR 存在 CI 失败、合并冲突或未解决的机器人评论、需要推动其转为通过（变绿）时使用。","jleechanorg\u002Fjleechan-skills","jleechanorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221404966?v=4","01M6C1VJ99XG950X1DWPEBCBGX",null,"01M6C1VJDK5YVDNT3362RT5WSB",6,"MIT","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffixpr\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理","SCENARIO","使用场景",[5,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53],"parallel","failing","when","source","get","local","green","conflicts","never","use","fix","command","bot","feedback","analyze","subagent","ci","state","pr","copilot","status","merge","github","review","2026-11-10 10:12:30",false,"---\nname: fixpr\ndescription: Analyze and fix PR blockers (CI failures, merge conflicts, bot\u002Freview feedback) to get a PR into a mergeable state — never merges it. GitHub status is the sole source of truth over local assumptions. Slash command \u002Ffixpr. Also embodied as the copilot-fixpr subagent type for parallel\u002Fautomated PR-fixing dispatch. Use when a PR has failing CI, merge conflicts, or unresolved bot comments and needs to be driven to green.\n---\n\n# \u002Ffixpr — PR Fix Analysis (local-first, GitHub-authoritative)\n\n**Purpose**: get a PR to a mergeable state (all checks passing, no conflicts, no blocking reviews) — never merge it. The user retains control over when\u002Fif to merge.\n\n## The three commandments\n\n1. **Focused local-first**: reproduce the failure when the relevant workflow supports local reproduction, fix it, and run the narrow local checks for the changed behavior before pushing. Do not require an unfiltered local suite; CI owns full regression. After pushing, verify required checks at the exact current PR head, or apply the documented `\u002Fgreen` local-equivalent exception when CI is backlogged.\n2. **GitHub is the sole source of truth**: never assume local conditions match GitHub reality. Fetch fresh GitHub status before any analysis, display it inline, and re-verify after every fix. `mergeable: \"MERGEABLE\"` decides Gate 2 (no conflicts) but does **not** mean CI passed — verify both `mergeable == \"MERGEABLE\"` and individual `statusCheckRollup` conclusions (reporting `mergeStateStatus` as informational context only).\n3. **Never merge**: success means the merge button would be green, not that you clicked it.\n\n## 2026-07 fleet-drive lessons (read before touching a multi-PR backlog)\n\nThese came out of driving a real 40+ PR backlog and matter as much as the mechanics below:\n\n- **CodeRabbit is optional advisory review, not a merge gate.** CodeRabbit feedback is optional\u002Fadvisory — read its feedback and triage actionable suggestions during the draft workflow, but its verdict (including `CHANGES_REQUESTED`), approval, silence, and review state are not `\u002Fgreen` or merge eligibility gates.\n- **Check for active external automation before touching a PR.** A meaningful share of any backlog is already under active bot iteration (this exact `\u002Ffixpr` methodology running as the `copilot-fixpr` subagent, or codex automation) at any given moment — that work is partly self-resolving. Touching a PR that's mid-automation just races it; check recent commit\u002Fcomment cadence first.\n- **Evidence\u002Freview staleness compounds fast — re-derive, don't trust cached citations.** The dominant risk in a PR-fixing pass is stale artifacts, not incorrect code. Every real bug found in recent sessions came from re-deriving evidence at the PR's actual current head SHA rather than trusting an existing citation or a previous run's output.\n- **\"70+ open PRs\" overstates actionability.** Typically only a minority are genuinely ready for a human merge call at any moment; most are either awaiting review\u002FCI or under active automation. Triage before batch-driving.\n\n## Workflow\n\n### Step 0: Verify GitHub CLI auth (mandatory pre-flight)\n\n```bash\nif ! gh auth status; then\n  echo \"GitHub CLI auth status failed; perform the canonical Keychain probe and a cheap non-UI GitHub API call before considering login. Do not create or expand credentials as part of this workflow.\"\n  exit 1\nfi\n```\n\n### Step 1: Gather repository context\n\nExtract repo owner\u002Fname from git remote (handle both HTTPS and SSH URL forms), determine the default branch without assuming `main` (could be `master`\u002F`develop`). Quote all bash variables.\n\n### Step 2: Fetch fresh GitHub PR status (authoritative — never trust cache or local state)\n\n```bash\nstatus=$(gh pr view \"$PR\" --json mergeStateStatus,statusCheckRollup,mergeable,reviews,comments)\nmergeable=$(echo \"$status\" | jq -r '.mergeable \u002F\u002F \"UNKNOWN\"')\nmerge_state=$(echo \"$status\" | jq -r '.mergeStateStatus \u002F\u002F \"UNKNOWN\"')\n\n# statusCheckRollup is an array of individual checks — align with canonical\n# success-only contract and exclude exact advisory checks (\"Green Gate\", \"Cursor Bugbot\").\nfailed_checks=$(echo \"$status\" | jq '[(.statusCheckRollup \u002F\u002F [])[]\n  | select((.__typename == \"StatusContext\" and (((.state \u002F\u002F \"\") | ascii_upcase) != \"SUCCESS\")) or\n           (.__typename == \"CheckRun\" and .name != \"Green Gate\" and .name != \"Cursor Bugbot\" and\n            ((((.status \u002F\u002F \"\") | ascii_upcase) != \"COMPLETED\") or (((.conclusion \u002F\u002F \"\") | ascii_upcase) != \"SUCCESS\"))))]')\nfailed_count=$(echo \"$failed_checks\" | jq 'length')\n\nif [[ \"$mergeable\" == \"MERGEABLE\" ]] && [[ \"$failed_count\" -eq 0 ]]; then\n  echo \"Actually ready to merge (mergeable: MERGEABLE, mergeStateStatus: $merge_state)\"\nelse\n  echo \"Blocked: mergeable=$mergeable, mergeStateStatus=$merge_state, $failed_count failing checks\"\nfi\n\n# Human-readable failing-check summary\ngh pr view \"$PR\" --json statusCheckRollup --jq \\\n  '[(.statusCheckRollup \u002F\u002F [])[]\n   | select((.__typename == \"StatusContext\" and (((.state \u002F\u002F \"\") | ascii_upcase) != \"SUCCESS\")) or\n            (.__typename == \"CheckRun\" and .name != \"Green Gate\" and .name != \"Cursor Bugbot\" and\n             ((((.status \u002F\u002F \"\") | ascii_upcase) != \"COMPLETED\") or (((.conclusion \u002F\u002F \"\") | ascii_upcase) != \"SUCCESS\"))))]\n   | map(\"\\((.name \u002F\u002F .context) \u002F\u002F \"unknown\"): \\((.description \u002F\u002F .state \u002F\u002F .conclusion \u002F\u002F \"no description provided\"))\")\n   | .[]'\n```\n\nFetch and display inline, all from GitHub (never assume local state matches):\n- **CI\u002Fchecks**: `statusCheckRollup` per above.\n- **Merge conflicts**: `mergeable`, `mergeStateStatus`; `gh pr diff \u003CPR>` for actual conflict content.\n- **Bot\u002Freview feedback**: `reviews`, `comments` — both are LISTS; iterate, never `.get()` the array itself. Human reviews may block merge authorization (e.g. `CHANGES_REQUESTED by @human`), but CodeRabbit\u002FBugbot verdicts (including `CHANGES_REQUESTED`), approvals, silence, and review states are optional advisory feedback and are never `\u002Fgreen` or merge eligibility gates.\n\n**Defensive parsing pattern** (GitHub API responses vary between dict\u002Flist shapes; never assume):\n```python\nchecks = status_data.get('statusCheckRollup') or [] if isinstance(status_data, dict) else []\nif isinstance(checks, dict):\n    checks = (checks.get('contexts') or {}).get('nodes') or []\nfor check in checks:\n    if isinstance(check, dict):\n        name = check.get('name') or check.get('context') or 'unknown'\n        if name in ('Green Gate', 'Cursor Bugbot'):\n            continue\n        typename = check.get('__typename')\n        if typename == 'StatusContext':\n            if (check.get('state') or '').upper() != 'SUCCESS':\n                print(f\"Failed: {name}\")\n        elif typename == 'CheckRun':\n            status = (check.get('status') or '').upper()\n            conclusion = (check.get('conclusion') or '').upper()\n            if status != 'COMPLETED' or conclusion != 'SUCCESS':\n                print(f\"Failed: {name}\")\n        else:\n            outcome = (check.get('conclusion') or check.get('state') or '').upper()\n            if outcome != 'SUCCESS':\n                print(f\"Failed: {name}\")\n```\n\n### Step 3: Detect CI-vs-local discrepancies\n\nRun the focused local equivalent for the failing workflow where one is supported; never run an unfiltered full local suite in this repository because CI owns full regression. If local passes but GitHub CI fails, that's a discrepancy — common causes: Python\u002Fdependency version drift, missing CI env vars, race conditions only manifesting in CI, timezone\u002Flocale differences, filesystem case-sensitivity (CI often Linux, local often macOS).\n\n**When discrepancy detected, trigger `\u002Fredgreen` (alias `\u002Ftdd`)**:\n1. **RED**: `\u002Fredgreen --pr \u003CPR> --check \"\u003Ccheck-name>\" --gh-log \"\u003Cthe exact GitHub error>\"` — reproduce the GitHub failure as a local failing test.\n2. **GREEN**: fix the code so both local and GitHub pass.\n3. **REFACTOR**: clean up while keeping coverage.\n\nDo not modify code for a CI-vs-local discrepancy until `\u002Fredgreen` has produced the matching local failure — fixing blind against a discrepancy you haven't reproduced is how \"fixes\" that don't actually fix GitHub happen.\n\n### Step 4: Apply fixes\n\nFocus on the immediate blockers in this PR. Common categories: environment issues (deps, env vars, timeouts), code issues (imports, assertions, types), test issues (expectations, races, edge cases).\n\n**Pattern detection** (optional `--scope=pattern`): after fixing the immediate blocker, scan the codebase for the same pattern elsewhere (e.g. a Firestore-mocking mismatch that recurs across several test files) and fix all instances — prevents the same class of failure recurring in the next PR.\n\n### Step 5: Merge conflicts (if present)\n\n```bash\ngit pull origin main\n# resolve conflicts\nPR_NUMBER=\"\u003Cpr-number>\"\nBRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)\nDOCS_DIR=\"docs\u002Fconflicts\u002F$(echo \"$BRANCH_NAME\" | tr '\u002F' '-')-pr${PR_NUMBER}\"\nmkdir -p \"$DOCS_DIR\"\n# document EACH conflict resolution in $DOCS_DIR\u002Fconflict_summary.md, then:\n# rerun affected focused checks, then commit+push; verify required CI at the exact pushed head\n```\n\n**Every conflict resolution must document**: file, conflict type, original markers, resolution, WHY, risk level (Low\u002FMedium\u002FHigh). Preservation priority: never lose functionality (combine features when possible), prefer bug fixes over new features on conflict, maintain backward compatibility, keep security improvements from both branches.\n\nExample `conflict_summary.md` entry:\n```markdown\n### File: src\u002Fauth.py\n**Conflict Type**: Authentication logic\n**Risk Level**: High\n**Original Conflict**:\n\\```python\n\u003C\u003C\u003C\u003C\u003C\u003C\u003C HEAD\ndef login(user, password):\n    return basic_auth(user, password)\n=======\ndef login(user, password, mfa=None):\n    if mfa:\n        return mfa_auth(user, password, mfa)\n    return basic_auth(user, password)\n>>>>>>> main\n\\```\n**Resolution**: Kept main branch version with MFA support\n**Reasoning**: Main branch added MFA (security improvement), backward compatible (mfa is optional), no conflicting business logic on our branch.\n```\n\n### Step 6: Pre-push checklist (mandatory — do not push if any item unchecked)\n\n```\n[ ] Reproduced the failure locally (saw the exact error locally)\n[ ] Focused local equivalent passes, or exact CI workflow owns broader regression\n[ ] If conflicts existed: resolved and documented under the repository conflict-resolution owner; rerun affected checks\n[ ] git status is clean (no uncommitted changes)\n```\n\n### Step 7: Push and re-verify GitHub (never claim success from local state alone)\n\n```bash\ngit add \u003Cexplicit-task-paths> && git commit -m \"fix: address CI failures \u002F merge conflicts for PR #${PR_NUMBER}\"\n# Verify and print current branch, upstream, and explicit target; never push to main\u002Fmaster.\ngit push \u003Cverified-remote> \u003Cverified-task-branch>\nsleep 60   # let GitHub CI process\ngh pr view \"$PR_NUMBER\" --json statusCheckRollup,mergeable,mergeStateStatus\n```\n\n## Auto-apply mode (`--auto-apply`)\n\nMore autonomous, but scoped to safe fixes only: import corrections, whitespace\u002Fformatting, doc updates, bot-suggested non-logic-changing improvements. Always preserve existing functionality, business logic, and security patterns from both branches. Apply one category at a time, test after each, stop on unexpected failure.\n\n## Risk classification for conflict\u002Ffix decisions\n\n- **Low**: docs, comments, formatting, test additions.\n- **Medium**: UI changes, non-critical features, config updates.\n- **High**: auth, data handling, payment processing, API contract changes.\n\n## Complex\u002Fparallel mode — 4 specialist agent roles\n\nFor PRs with >10 distinct issues or extensive CI failures, spawn specialists instead of one linear pass (Claude\u002Fthe orchestrator retains overall workflow control):\n1. **CI-Analysis-Agent** — GitHub CI failure analysis and fix recommendations.\n2. **Conflict-Resolution-Agent** — merge conflict analysis and safe resolution.\n3. **Bot-Feedback-Agent** — processes automated bot comments, implements applicable suggestions.\n4. **Verification-Agent** — validates fix effectiveness, re-checks mergeability.\n\nThis is also the shape the `copilot-fixpr` subagent type embodies for automated\u002Fparallel dispatch across a PR fleet.\n\n## Examples\n\n```bash\n\u002Ffixpr 1234                                # analyze + fix, default scope\n\u002Ffixpr 1234 --auto-apply                   # auto-apply safe fixes only\n\u002Ffixpr 1234 --scope=pattern                # fix + scan codebase for the same pattern elsewhere\n\u002Ffixpr 1234 --scope=comprehensive --auto-apply\n\n# CI-vs-local discrepancy (auto-triggers \u002Fredgreen):\n# Local: all tests pass. GitHub: test-unit FAILING.\n\u002Ffixpr 1234\n# -> detects discrepancy, issues:\n\u002Fredgreen --pr 1234 --check \"test-unit\" --gh-log \"AssertionError: Expected 'foo' but got 'FOO'\"\n# -> reproduces locally, fixes, verifies both environments\n```\n\n## Integration points\n\n- `\u002Fcopilot` — comprehensive PR workflow orchestration (fixpr is one phase of it).\n- `\u002Fcommentreply` — respond to review feedback after fixing.\n- `\u002Fpushl` — push fixes to remote.\n- `\u002Fredgreen` (alias `\u002Ftdd`) — auto-triggered for CI-vs-local discrepancies.\n- Project test suite — verify locally before every push.\n\n## Error recovery\n\nGracefully handle missing tools by trying alternatives; explain clearly what failed and why; suggest manual steps when automation isn't possible; preserve partial progress rather than failing completely.\n","# \u002Ffixpr — PR Fix Analysis (local-first, GitHub-authoritative)\n\n**Purpose**: get a PR to a mergeable state (all checks passing, no conflicts, no blocking reviews) — never merge it. The user retains control over when\u002Fif to merge.\n\n## The three commandments\n\n1. **Focused local-first**: reproduce the failure when the relevant workflow supports local reproduction, fix it, and run the narrow local checks for the changed behavior before pushing. Do not require an unfiltered local suite; CI owns full regression. After pushing, verify required checks at the exact current PR head, or apply the documented `\u002Fgreen` local-equivalent exception when CI is backlogged.\n2. **GitHub is the sole source of truth**: never assume local conditions match GitHub reality. Fetch fresh GitHub status before any analysis, display it inline, and re-verify after every fix. `mergeable: \"MERGEABLE\"` decides Gate 2 (no conflicts) but does **not** mean CI passed — verify both `mergeable == \"MERGEABLE\"` and individual `statusCheckRollup` conclusions (reporting `mergeStateStatus` as informational context only).\n3. **Never merge**: success means the merge button would be green, not that you clicked it.\n\n## 2026-07 fleet-drive lessons (read before touching a multi-PR backlog)\n\nThese came out of driving a real 40+ PR backlog and matter as much as the mechanics below:\n\n- **CodeRabbit is optional advisory review, not a merge gate.** CodeRabbit feedback is optional\u002Fadvisory — read its feedback and triage actionable suggestions during the draft workflow, but its verdict (including `CHANGES_REQUESTED`), approval, silence, and review state are not `\u002Fgreen` or merge eligibility gates.\n- **Check for active external automation before touching a PR.** A meaningful share of any backlog is already under active bot iteration (this exact `\u002Ffixpr` methodology running as the `copilot-fixpr` subagent, or codex automation) at any given moment — that work is partly self-resolving. Touching a PR that's mid-automation just races it; check recent commit\u002Fcomment cadence first.\n- **Evidence\u002Freview staleness compounds fast — re-derive, don't trust cached citations.** The dominant risk in a PR-fixing pass is stale artifacts, not incorrect code. Every real bug found in recent sessions came from re-deriving evidence at the PR's actual current head SHA rather than trusting an existing citation or a previous run's output.\n- **\"70+ open PRs\" overstates actionability.** Typically only a minority are genuinely ready for a human merge call at any moment; most are either awaiting review\u002FCI or under active automation. Triage before batch-driving.\n\n## Workflow\n\n### Step 0: Verify GitHub CLI auth (mandatory pre-flight)\n\n```bash\nif ! gh auth status; then\n  echo \"GitHub CLI auth status failed; perform the canonical Keychain probe and a cheap non-UI GitHub API call before considering login. Do not create or expand credentials as part of this workflow.\"\n  exit 1\nfi\n```\n\n### Step 1: Gather repository context\n\nExtract repo owner\u002Fname from git remote (handle both HTTPS and SSH URL forms), determine the default branch without assuming `main` (could be `master`\u002F`develop`). Quote all bash variables.\n\n### Step 2: Fetch fresh GitHub PR status (authoritative — never trust cache or local state)\n\n```bash\nstatus=$(gh pr view \"$PR\" --json mergeStateStatus,statusCheckRollup,mergeable,reviews,comments)\nmergeable=$(echo \"$status\" | jq -r '.mergeable \u002F\u002F \"UNKNOWN\"')\nmerge_state=$(echo \"$status\" | jq -r '.mergeStateStatus \u002F\u002F \"UNKNOWN\"')\n\n# statusCheckRollup is an array of individual checks — align with canonical\n# success-only contract and exclude exact advisory checks (\"Green Gate\", \"Cursor Bugbot\").\nfailed_checks=$(echo \"$status\" | jq '[(.statusCheckRollup \u002F\u002F [])[]\n  | select((.__typename == \"StatusContext\" and (((.state \u002F\u002F \"\") | ascii_upcase) != \"SUCCESS\")) or\n           (.__typename == \"CheckRun\" and .name != \"Green Gate\" and .name != \"Cursor Bugbot\" and\n            ((((.status \u002F\u002F \"\") | ascii_upcase) != \"COMPLETED\") or (((.conclusion \u002F\u002F \"\") | ascii_upcase) != \"SUCCESS\"))))]')\nfailed_count=$(echo \"$failed_checks\" | jq 'length')\n\nif [[ \"$mergeable\" == \"MERGEABLE\" ]] && [[ \"$failed_count\" -eq 0 ]]; then\n  echo \"Actually ready to merge (mergeable: MERGEABLE, mergeStateStatus: $merge_state)\"\nelse\n  echo \"Blocked: mergeable=$mergeable, mergeStateStatus=$merge_state, $failed_count failing checks\"\nfi\n\n# Human-readable failing-check summary\ngh pr view \"$PR\" --json statusCheckRollup --jq \\\n  '[(.statusCheckRollup \u002F\u002F [])[]\n   | select((.__typename == \"StatusContext\" and (((.state \u002F\u002F \"\") | ascii_upcase) != \"SUCCESS\")) or\n            (.__typename == \"CheckRun\" and .name != \"Green Gate\" and .name != \"Cursor Bugbot\" and\n             ((((.status \u002F\u002F \"\") | ascii_upcase) != \"COMPLETED\") or (((.conclusion \u002F\u002F \"\") | ascii_upcase) != \"SUCCESS\"))))]\n   | map(\"\\((.name \u002F\u002F .context) \u002F\u002F \"unknown\"): \\((.description \u002F\u002F .state \u002F\u002F .conclusion \u002F\u002F \"no description provided\"))\")\n   | .[]'\n```\n\nFetch and display inline, all from GitHub (never assume local state matches):\n- **CI\u002Fchecks**: `statusCheckRollup` per above.\n- **Merge conflicts**: `mergeable`, `mergeStateStatus`; `gh pr diff \u003CPR>` for actual conflict content.\n- **Bot\u002Freview feedback**: `reviews`, `comments` — both are LISTS; iterate, never `.get()` the array itself. Human reviews may block merge authorization (e.g. `CHANGES_REQUESTED by @human`), but CodeRabbit\u002FBugbot verdicts (including `CHANGES_REQUESTED`), approvals, silence, and review states are optional advisory feedback and are never `\u002Fgreen` or merge eligibility gates.\n\n**Defensive parsing pattern** (GitHub API responses vary between dict\u002Flist shapes; never assume):\n```python\nchecks = status_data.get('statusCheckRollup') or [] if isinstance(status_data, dict) else []\nif isinstance(checks, dict):\n    checks = (checks.get('contexts') or {}).get('nodes') or []\nfor check in checks:\n    if isinstance(check, dict):\n        name = check.get('name') or check.get('context') or 'unknown'\n        if name in ('Green Gate', 'Cursor Bugbot'):\n            continue\n        typename = check.get('__typename')\n        if typename == 'StatusContext':\n            if (check.get('state') or '').upper() != 'SUCCESS':\n                print(f\"Failed: {name}\")\n        elif typename == 'CheckRun':\n            status = (check.get('status') or '').upper()\n            conclusion = (check.get('conclusion') or '').upper()\n            if status != 'COMPLETED' or conclusion != 'SUCCESS':\n                print(f\"Failed: {name}\")\n        else:\n            outcome = (check.get('conclusion') or check.get('state') or '').upper()\n            if outcome != 'SUCCESS':\n                print(f\"Failed: {name}\")\n```\n\n### Step 3: Detect CI-vs-local discrepancies\n\nRun the focused local equivalent for the failing workflow where one is supported; never run an unfiltered full local suite in this repository because CI owns full regression. If local passes but GitHub CI fails, that's a discrepancy — common causes: Python\u002Fdependency version drift, missing CI env vars, race conditions only manifesting in CI, timezone\u002Flocale differences, filesystem case-sensitivity (CI often Linux, local often macOS).\n\n**When discrepancy detected, trigger `\u002Fredgreen` (alias `\u002Ftdd`)**:\n1. **RED**: `\u002Fredgreen --pr \u003CPR> --check \"\u003Ccheck-name>\" --gh-log \"\u003Cthe exact GitHub error>\"` — reproduce the GitHub failure as a local failing test.\n2. **GREEN**: fix the code so both local and GitHub pass.\n3. **REFACTOR**: clean up while keeping coverage.\n\nDo not modify code for a CI-vs-local discrepancy until `\u002Fredgreen` has produced the matching local failure — fixing blind against a discrepancy you haven't reproduced is how \"fixes\" that don't actually fix GitHub happen.\n\n### Step 4: Apply fixes\n\nFocus on the immediate blockers in this PR. Common categories: environment issues (deps, env vars, timeouts), code issues (imports, assertions, types), test issues (expectations, races, edge cases).\n\n**Pattern detection** (optional `--scope=pattern`): after fixing the immediate blocker, scan the codebase for the same pattern elsewhere (e.g. a Firestore-mocking mismatch that recurs across several test files) and fix all instances — prevents the same class of failure recurring in the next PR.\n\n### Step 5: Merge conflicts (if present)\n\n```bash\ngit pull origin main\n# resolve conflicts\nPR_NUMBER=\"\u003Cpr-number>\"\nBRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)\nDOCS_DIR=\"docs\u002Fconflicts\u002F$(echo \"$BRANCH_NAME\" | tr '\u002F' '-')-pr${PR_NUMBER}\"\nmkdir -p \"$DOCS_DIR\"\n# document EACH conflict resolution in $DOCS_DIR\u002Fconflict_summary.md, then:\n# rerun affected focused checks, then commit+push; verify required CI at the exact pushed head\n```\n\n**Every conflict resolution must document**: file, conflict type, original markers, resolution, WHY, risk level (Low\u002FMedium\u002FHigh). Preservation priority: never lose functionality (combine features when possible), prefer bug fixes over new features on conflict, maintain backward compatibility, keep security improvements from both branches.\n\nExample `conflict_summary.md` entry:\n```markdown\n### File: src\u002Fauth.py\n**Conflict Type**: Authentication logic\n**Risk Level**: High\n**Original Conflict**:\n\\```python\n\u003C\u003C\u003C\u003C\u003C\u003C\u003C HEAD\ndef login(user, password):\n    return basic_auth(user, password)\n=======\ndef login(user, password, mfa=None):\n    if mfa:\n        return mfa_auth(user, password, mfa)\n    return basic_auth(user, password)\n>>>>>>> main\n\\```\n**Resolution**: Kept main branch version with MFA support\n**Reasoning**: Main branch added MFA (security improvement), backward compatible (mfa is optional), no conflicting business logic on our branch.\n```\n\n### Step 6: Pre-push checklist (mandatory — do not push if any item unchecked)\n\n```\n[ ] Reproduced the failure locally (saw the exact error locally)\n[ ] Focused local equivalent passes, or exact CI workflow owns broader regression\n[ ] If conflicts existed: resolved and documented under the repository conflict-resolution owner; rerun affected checks\n[ ] git status is clean (no uncommitted changes)\n```\n\n### Step 7: Push and re-verify GitHub (never claim success from local state alone)\n\n```bash\ngit add \u003Cexplicit-task-paths> && git commit -m \"fix: address CI failures \u002F merge conflicts for PR #${PR_NUMBER}\"\n# Verify and print current branch, upstream, and explicit target; never push to main\u002Fmaster.\ngit push \u003Cverified-remote> \u003Cverified-task-branch>\nsleep 60   # let GitHub CI process\ngh pr view \"$PR_NUMBER\" --json statusCheckRollup,mergeable,mergeStateStatus\n```\n\n## Auto-apply mode (`--auto-apply`)\n\nMore autonomous, but scoped to safe fixes only: import corrections, whitespace\u002Fformatting, doc updates, bot-suggested non-logic-changing improvements. Always preserve existing functionality, business logic, and security patterns from both branches. Apply one category at a time, test after each, stop on unexpected failure.\n\n## Risk classification for conflict\u002Ffix decisions\n\n- **Low**: docs, comments, formatting, test additions.\n- **Medium**: UI changes, non-critical features, config updates.\n- **High**: auth, data handling, payment processing, API contract changes.\n\n## Complex\u002Fparallel mode — 4 specialist agent roles\n\nFor PRs with >10 distinct issues or extensive CI failures, spawn specialists instead of one linear pass (Claude\u002Fthe orchestrator retains overall workflow control):\n1. **CI-Analysis-Agent** — GitHub CI failure analysis and fix recommendations.\n2. **Conflict-Resolution-Agent** — merge conflict analysis and safe resolution.\n3. **Bot-Feedback-Agent** — processes automated bot comments, implements applicable suggestions.\n4. **Verification-Agent** — validates fix effectiveness, re-checks mergeability.\n\nThis is also the shape the `copilot-fixpr` subagent type embodies for automated\u002Fparallel dispatch across a PR fleet.\n\n## Examples\n\n```bash\n\u002Ffixpr 1234                                # analyze + fix, default scope\n\u002Ffixpr 1234 --auto-apply                   # auto-apply safe fixes only\n\u002Ffixpr 1234 --scope=pattern                # fix + scan codebase for the same pattern elsewhere\n\u002Ffixpr 1234 --scope=comprehensive --auto-apply\n\n# CI-vs-local discrepancy (auto-triggers \u002Fredgreen):\n# Local: all tests pass. GitHub: test-unit FAILING.\n\u002Ffixpr 1234\n# -> detects discrepancy, issues:\n\u002Fredgreen --pr 1234 --check \"test-unit\" --gh-log \"AssertionError: Expected 'foo' but got 'FOO'\"\n# -> reproduces locally, fixes, verifies both environments\n```\n\n## Integration points\n\n- `\u002Fcopilot` — comprehensive PR workflow orchestration (fixpr is one phase of it).\n- `\u002Fcommentreply` — respond to review feedback after fixing.\n- `\u002Fpushl` — push fixes to remote.\n- `\u002Fredgreen` (alias `\u002Ftdd`) — auto-triggered for CI-vs-local discrepancies.\n- Project test suite — verify locally before every push.\n\n## Error recovery\n\nGracefully handle missing tools by trying alternatives; explain clearly what failed and why; suggest manual steps when automation isn't possible; preserve partial progress rather than failing completely.\n",{"name":5,"description":7},"main","42ccd02cbf5e8e47839dc3eab6fc754dc6b339cf",".claude\u002Fskills\u002Ffixpr",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 14:55:35",{"source":9,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill fixpr",{"tool":72,"command":73},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill fixpr",{"tool":75,"command":76},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill fixpr","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffixpr\u002FSKILL.md",true,[],[81,89,96,103,111,120],{"skillNo":82,"name":83,"nameZh":13,"description":84,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":88},"01M7DRVZXXMGY4G81K5GVF4V20","disk-reclaim-playbook","Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdisk-reclaim-playbook\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":90,"name":91,"nameZh":13,"description":92,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":88},"01M7B63PNTT2TY78RFKHD8SP3X","claudea-bench","Compare `claudea` and normal `claude` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fclaudea-bench\u002FSKILL.md",[],[],{"skillNo":97,"name":48,"nameZh":13,"description":98,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":102},"01M7622KQJ32AV4K5BXEMVSSEB","Alias for the canonical pr-lifecycle PR workflow skill (\u002Fpr-workflow, \u002Fprw).","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpr\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":104,"name":105,"nameZh":13,"description":106,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":110},"01M7432W92AKC4D1TKJ00VCMMT","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwhisper\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":112,"name":113,"nameZh":13,"description":114,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":115,"licenseFileUrl":116,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":110},"01M7432T6BN1A9SHB8RBQR5EMP","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":13,"description":123,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":110},"01M7432NDC7S6C6MX7M6RW8CTT","pr-report","This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, \u002Fpr-report, or wants per-PR summary with delta files\u002Flines. Generates a structured report for one or more open PRs covering purpose, files changed, +\u002F− line counts, \u002Fcode-standards + \u002Fthermo review findings, \u002Fponytail simplification opportunities, file-overlap combination candidates, and \u002Fgreen status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fpr-report\u002FSKILL.md",[],[]]