[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F5WZ0QDHNNAHSDBPCKC9XJ":3,"skill-same:01M7F5WZ0QDHNNAHSDBPCKC9XJ":124},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7F5WZ0QDHNNAHSDBPCKC9XJ","pr-review",null,"Install and operate an automated pull-request review gate using repository standards and a confined review worker.","cebertowicz\u002Fcorsia-library","cebertowicz","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7285414?v=4","01M7F5VA4R673W35MEGE53NY44","Steven Cebertowicz","01M7F5VA5ARFVKJPVWWWD2TJSZ",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: pr-review\ndescription: Install and operate an automated pull-request review gate using repository standards and a confined review worker.\nlicense: Apache-2.0\nmetadata:\n  corsia-data: corsia.yaml\n  corsia-format: \"1\"\n  version: \"1.0.2\"\n---\n\n# Pull-request review gate\n\nThe gate evaluates each pull-request head, stages its diff, conversation and standards, starts the `pr-reviewer` worker, and publishes its verdict. The scripts share a state folder under the owning thread.\n\n## Requires\n\n- CORSIA tools: `automation_schedule`, `event_rules`, `measure_sync` and `measure_status`, and the `start_worker` event-rule action.\n- The `pr-reviewer` skill from this library, installed beside this one: the `review` step in `corsia.yaml` and the start rules run it.\n- CORSIA's built-in `github-pr-screen` workflow (`screen_workflow` in `rule-set.json`).\n- A GitHub account connected to CORSIA.\n- A POSIX host (the scripts lock state with `fcntl`), Python 3.11 or later, and `git`.\n\n## Reach\n\n- Subprocesses: `git`, and `corsia github api`, which calls the GitHub API as the connected account.\n- Network: the GitHub API, and `git fetch origin \u003Csha>` from the reviewed repository's remote when the checkout lacks a head.\n- Paths outside the thread folder: each `repo_checkouts` checkout, where stage runs `git worktree prune` and `git worktree add` (a detached worktree per review, inside the thread's staging folder), and `standards_local_root` if set.\n- Writes in shadow mode: local state, staged inputs and shadow records under the thread folder only. Nothing is written to GitHub.\n- Writes in live mode, on each configured repository: commit statuses on the head; pull-request review comments and replies; resolving and unresolving the gate's own review threads; one summary comment per pull request, posted once and then edited in place.\n\n## Set up\n\n1. Install this skill and `pr-reviewer` into the owning agent's thread, and connect GitHub with an account allowed to write commit statuses and pull-request comments. The owning agent must be in a project that tracks each reviewed repository: register that repository's local checkout with `project_repo_register`. A rule that names a repository the project doesn't track is refused.\n2. Commit `references\u002Freview-standards.md` to the reviewed repository at the path listed in `rule-set.json` under `standards`; edit it to suit that repository.\n3. Set `repos`, `repo_checkouts`, `agents_login`, optional `sme`, standards paths, status contexts and other settings in `rule-set.json`. Leave `mode` as `shadow`. Set `extended_window_base` only if you configure the corresponding worker profile.\n4. Register each of the evaluate, stage and publish scripts with `automation_schedule`: kind `script`, no cadence, authenticated, timeout 300 seconds. Name exactly what each writes in its purpose: evaluate writes local state and emits events; stage writes local state, staged inputs and a detached worktree, and emits events; publish writes local state and shadow records, or in live mode commit statuses, pull-request comments and replies, review-thread resolution, and its own summary comment, and emits events.\n5. Run `measure_sync` for both skills' `measures.yaml` files and confirm the result with `measure_status`. This declares the `qa` events that some rules in step 6 match, so it comes first.\n6. Resolve the event rules with `review_gate_config.configured_rules(review_gate_config.load())`, then create each with `event_rules create`, substituting `$repos` and the registered script IDs. For an extended-window base, configure the named worker profile. The start rule uses `start_worker` with the worker skill and `request_identity` fact.\n7. Run in shadow mode on a few pull requests and show the person the results. Switching to live mode posts on their repository: ask them, and switch only on their explicit yes. Then re-register the scripts and rules.\n8. If a head has no verdict, first check the current head and existing events to avoid a duplicate review. Under `review_gate_evaluate.StateStore.transaction()`, clear that PR's `in_flight` claim; if it was marked reviewed without a published verdict, also clear `reviewed` and `mergeability`. Preserve the number of attempts already used as `attempts` = `{\"head\": \u003Chead>, \"n\": \u003Cused>}` using `put`. Re-firing a completed check run for that head is an action on the person's repository: ask them first. Once it re-fires, evaluate requests the next attempt. Verify the verdict on that exact head; do not reset the attempt to zero, which reuses an already-consumed request identity.\n\nRegistered scripts are hash-pinned: changing a file in their folder stops the registered runs. Install changes into a second script folder, register all three there, create the replacement rules, wait for queued old runs to start, disable the old rules, then cancel the old schedules. Tests belong in a separate copy while registered scripts are active.\n","# Pull-request review gate\n\nThe gate evaluates each pull-request head, stages its diff, conversation and standards, starts the `pr-reviewer` worker, and publishes its verdict. The scripts share a state folder under the owning thread.\n\n## Requires\n\n- CORSIA tools: `automation_schedule`, `event_rules`, `measure_sync` and `measure_status`, and the `start_worker` event-rule action.\n- The `pr-reviewer` skill from this library, installed beside this one: the `review` step in `corsia.yaml` and the start rules run it.\n- CORSIA's built-in `github-pr-screen` workflow (`screen_workflow` in `rule-set.json`).\n- A GitHub account connected to CORSIA.\n- A POSIX host (the scripts lock state with `fcntl`), Python 3.11 or later, and `git`.\n\n## Reach\n\n- Subprocesses: `git`, and `corsia github api`, which calls the GitHub API as the connected account.\n- Network: the GitHub API, and `git fetch origin \u003Csha>` from the reviewed repository's remote when the checkout lacks a head.\n- Paths outside the thread folder: each `repo_checkouts` checkout, where stage runs `git worktree prune` and `git worktree add` (a detached worktree per review, inside the thread's staging folder), and `standards_local_root` if set.\n- Writes in shadow mode: local state, staged inputs and shadow records under the thread folder only. Nothing is written to GitHub.\n- Writes in live mode, on each configured repository: commit statuses on the head; pull-request review comments and replies; resolving and unresolving the gate's own review threads; one summary comment per pull request, posted once and then edited in place.\n\n## Set up\n\n1. Install this skill and `pr-reviewer` into the owning agent's thread, and connect GitHub with an account allowed to write commit statuses and pull-request comments. The owning agent must be in a project that tracks each reviewed repository: register that repository's local checkout with `project_repo_register`. A rule that names a repository the project doesn't track is refused.\n2. Commit `references\u002Freview-standards.md` to the reviewed repository at the path listed in `rule-set.json` under `standards`; edit it to suit that repository.\n3. Set `repos`, `repo_checkouts`, `agents_login`, optional `sme`, standards paths, status contexts and other settings in `rule-set.json`. Leave `mode` as `shadow`. Set `extended_window_base` only if you configure the corresponding worker profile.\n4. Register each of the evaluate, stage and publish scripts with `automation_schedule`: kind `script`, no cadence, authenticated, timeout 300 seconds. Name exactly what each writes in its purpose: evaluate writes local state and emits events; stage writes local state, staged inputs and a detached worktree, and emits events; publish writes local state and shadow records, or in live mode commit statuses, pull-request comments and replies, review-thread resolution, and its own summary comment, and emits events.\n5. Run `measure_sync` for both skills' `measures.yaml` files and confirm the result with `measure_status`. This declares the `qa` events that some rules in step 6 match, so it comes first.\n6. Resolve the event rules with `review_gate_config.configured_rules(review_gate_config.load())`, then create each with `event_rules create`, substituting `$repos` and the registered script IDs. For an extended-window base, configure the named worker profile. The start rule uses `start_worker` with the worker skill and `request_identity` fact.\n7. Run in shadow mode on a few pull requests and show the person the results. Switching to live mode posts on their repository: ask them, and switch only on their explicit yes. Then re-register the scripts and rules.\n8. If a head has no verdict, first check the current head and existing events to avoid a duplicate review. Under `review_gate_evaluate.StateStore.transaction()`, clear that PR's `in_flight` claim; if it was marked reviewed without a published verdict, also clear `reviewed` and `mergeability`. Preserve the number of attempts already used as `attempts` = `{\"head\": \u003Chead>, \"n\": \u003Cused>}` using `put`. Re-firing a completed check run for that head is an action on the person's repository: ask them first. Once it re-fires, evaluate requests the next attempt. Verify the verdict on that exact head; do not reset the attempt to zero, which reuses an already-consumed request identity.\n\nRegistered scripts are hash-pinned: changing a file in their folder stops the registered runs. Install changes into a second script folder, register all three there, create the replacement rules, wait for queued old runs to start, disable the old rules, then cancel the old schedules. Tests belong in a separate copy while registered scripts are active.\n",{"name":5,"license":15,"metadata":24,"description":7},{"version":25,"corsia-data":26,"corsia-format":27},"1.0.2","corsia.yaml","1","main","539d752bbf041d50be087929df3abc84830eb75a","skills\u002Fpr-review","https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library","https:\u002F\u002Fgithub.com\u002Fcebertowicz","AI Product Leader · Developer Platforms, Agent Workflows & Evaluation\r\n\r\nPreviously: Founder@ Infuse.us, R&D @ Alethic Labs & Fuji Xerox Palo Alto Laboratory","2026-11-15 15:09:15",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add cebertowicz\u002Fcorsia-library --skill pr-review",{"tool":41,"command":42},"bunx","bunx skills add cebertowicz\u002Fcorsia-library --skill pr-review",{"tool":44,"command":45},"pnpm","pnpm dlx skills add cebertowicz\u002Fcorsia-library --skill pr-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002FSKILL.md",true,[49,55,58,62,66,70,76,80,84,88,92,96,100,104,108,112,116,120],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"CHANGELOG.md","REFERENCE","参考文档",641,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002FCHANGELOG.md",{"path":26,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":56,"sourceHtmlUrl":57},871,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fcorsia.yaml",{"path":59,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":60,"sourceHtmlUrl":61},"measures.yaml",7792,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fmeasures.yaml",{"path":63,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Freview-standards.md",1963,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Freferences\u002Freview-standards.md",{"path":67,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":68,"sourceHtmlUrl":69},"rule-set.json",7209,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Frule-set.json",{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"scripts\u002Freview_gate_config.py","SCRIPT","脚本",4154,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Freview_gate_config.py",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Freview_gate_evaluate.py",29816,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Freview_gate_evaluate.py",{"path":81,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Freview_gate_github.py",2232,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Freview_gate_github.py",{"path":85,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Freview_gate_publish.py",72966,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Freview_gate_publish.py",{"path":89,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002Freview_gate_stage.py",9343,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Freview_gate_stage.py",{"path":93,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":94,"sourceHtmlUrl":95},"scripts\u002Ftests\u002Ftest_generic_config.py",3526,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Ftests\u002Ftest_generic_config.py",{"path":97,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":98,"sourceHtmlUrl":99},"scripts\u002Ftests\u002Ftest_measures_yaml.py",2180,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Ftests\u002Ftest_measures_yaml.py",{"path":101,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":102,"sourceHtmlUrl":103},"scripts\u002Ftests\u002Ftest_review_gate_evaluate.py",31092,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Ftests\u002Ftest_review_gate_evaluate.py",{"path":105,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":106,"sourceHtmlUrl":107},"scripts\u002Ftests\u002Ftest_review_gate_head_worktree.py",4342,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Ftests\u002Ftest_review_gate_head_worktree.py",{"path":109,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":110,"sourceHtmlUrl":111},"scripts\u002Ftests\u002Ftest_review_gate_live_client.py",42580,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Ftests\u002Ftest_review_gate_live_client.py",{"path":113,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":114,"sourceHtmlUrl":115},"scripts\u002Ftests\u002Ftest_review_gate_publish.py",24335,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Ftests\u002Ftest_review_gate_publish.py",{"path":117,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":118,"sourceHtmlUrl":119},"scripts\u002Ftests\u002Ftest_review_gate_rule_runs.py",32829,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Ftests\u002Ftest_review_gate_rule_runs.py",{"path":121,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":122,"sourceHtmlUrl":123},"scripts\u002Ftests\u002Ftest_review_gate_timed.py",1130,"https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Fskills\u002Fpr-review\u002Fscripts\u002Ftests\u002Ftest_review_gate_timed.py",[125,132,138,145,152,158],{"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":19},"01M7F5Z9P7S7JTMKXSQZFT1Q7R","example","Edited fixture description without a version increment.","https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Funchanged_version_after_edit\u002Fcandidate\u002Fskills\u002Fexample\u002FSKILL.md",[],[],{"skillNo":133,"name":127,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":19},"01M7F5Z8PWMAJHMG3HMV2XF56A","Original fixture description.","https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Funchanged_version_after_edit\u002Fbaseline\u002Fskills\u002Fexample\u002FSKILL.md",[],[],{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":19},"01M7F5Z7NR9NESZ8W5376Z1NCQ","linked","Fixture with a symlinked support file.","https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsymlink\u002Fskills\u002Flinked\u002FSKILL.md",[],[],{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":19},"01M7F5Z6FK7Q2T8TPKX5XE3VTF","scripted","Fixture with a script in its scripts folder.","https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fscripts_folder\u002Fskills\u002Fscripted\u002FSKILL.md",[],[],{"skillNo":153,"name":147,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":19},"01M7F5Z3TFMWAD3DJMENKZDSQW","Fixture with code in a nested scripts folder.","https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fscript_nested_scripts\u002Fskills\u002Fscripted\u002FSKILL.md",[],[],{"skillNo":159,"name":147,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":19},"01M7F5Z2QNZ44JWS3NX9TCMXZG","Fixture with code outside a scripts folder.","https:\u002F\u002Fgithub.com\u002Fcebertowicz\u002Fcorsia-library\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fscript_elsewhere\u002Fskills\u002Fscripted\u002FSKILL.md",[],[]]