Repository navigation
Bundle a discoverable gh api skill for GitHub issues and pull requests - #6658
Conversation
Keep the instructions outside automatic discovery. A repository Git grant is not REST authority, and a general pull request write grant is not draft-only. Verify explicit opt-in and removal in the native Codex packaging check.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR bundles an automatically discoverable Codex skill for GitHub issue and pull-request work with stock gh api. Example: An Agent is asked to comment on pull request 123 in openclaw/openclaw-enterprise.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: automatic discovery follows recorded owner feedback and adds useful guidance absent from current main; one previously reported instruction-provenance finding remains. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe runtime image supplies instructions to Codex; Codex uses gh api for repository operations, while existing credential and network policies determine which requests succeed. flowchart TB
A[Runtime image] --> B[Admin skill directory]
B --> C[Codex skill discovery]
C --> D[gh api request]
D --> E[Deployed access policy]
E --> F[GitHub REST API]
Technical reviewBest possible solution: Keep the existing discovery and authorization owners, and attach concrete incident references to the retained mandatory skill rules. Do we have a high-confidence way to reproduce the issue? This is a skill addition; source inspection confirms fetched main lacks the bundled discovery path, and no target code was executed. Is this the best way to solve the issue? Installing a small instruction file through Codex's existing admin discovery path is proportionate and follows the recorded reviewer direction without duplicating authorization machinery. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0f4a2d3d3ad1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 20, 2026, 6:35 PM ET / 23:35 UTC (Revision 2). |
Install the instructions directly in the runtime stage. The previous staged copy made /usr non-traversable to the runtime user. Give operators a next step on a denied issue read without exposing the raw error.
Use queryless issue reads and require an explicit repository match for each non-draft creation. Leave authorization with the deployed scoped REST policy and hook. Do not replay a POST after an ambiguous outcome or change the ref-constrained draft path.
| description: Read GitHub issues with gh api, or open a non-draft PR with curl if the deployed repository grant allows it. | ||
| --- | ||
|
|
||
| Use this skill only when the operator confirms the **deployed** Agent revision |
There was a problem hiding this comment.
this is terrible ux. agents should just always use this when repos are configured
There was a problem hiding this comment.
Updated in 8fb9770. The runtime installs the skill in Codex’s admin skill directory, so agents can discover it automatically and use it for configured repos. The packaging check starts Codex with a fresh home and checks that the skill is enabled. Packaging check
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Draft — human approval required before merge.
A Codex agent working in a configured GitHub repository should be able to find the right REST endpoint and call it with stock
gh api. The runtime installs the skill in Codex’s standard admin skill directory. Operators can use it without creating a symlink or enabling it for each revision. Operator guideThe skill teaches one pattern for issue and PR work. It shows how to inspect either resource, post a conversation comment on a PR using the issue comments endpoint, and choose the route and JSON fields for other actions. Writes use
gh api --inputwith a JSON file and require independent confirmation of the result.Discovery and access are separate. Codex can discover the instructions in the shared runtime image. The deployed binding and network policy authorize each operation. For example, scoped REST v1 allows issue reads and PR creation with the required grants. Posting comments requires a policy that permits the comments endpoint. Ref- and draft-constrained grants retain their designated client.
Verification
skills/list.gh2.103.2 sent the complete JSON file once to a loopback server. The command succeeded on HTTP 201 and refused 307/308 without resending the POST. Other redirects can result in a GET, so check the intended repository for the result before retrying an uncertain write.092aa4df.