Skip to content

fix(agent): expose Greenpill review skill to Codex#15

Open
Oba-One wants to merge 1 commit into
mainfrom
codex/greenpill-review-skill-discovery
Open

fix(agent): expose Greenpill review skill to Codex#15
Oba-One wants to merge 1 commit into
mainfrom
codex/greenpill-review-skill-discovery

Conversation

@Oba-One

@Oba-One Oba-One commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

  • expose the canonical Greenpill production-readiness workflow through Codex's repository skill discovery path
  • use the distinct greenpill-review name so Codex's built-in /review command is not shadowed
  • add Codex display metadata and a regression test for the discovery contract

Codex discovers repository skills under .agents/skills; the existing workflow remains canonical under .claude/skills/review and the new entrypoint delegates to it without duplication.

References:

Validation

  • remote branch is based directly on synced main
  • wrapper frontmatter uses greenpill-review and does not collide with built-in review
  • canonical relative path and canonical skill availability validated at the published commit
  • Codex display metadata and the discovery regression test are present
  • CodeRabbit check passes

The desktop sandbox protects the exact local .agents path, so this scoped branch was created directly from synced main through GitHub rather than through a worktree.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a Greenpill Network production-readiness review workflow with guided instructions and metadata.
    • Kept the standard review mode separate from the Greenpill review workflow.
  • Tests

    • Added coverage to verify review-skill discovery, metadata, paths, and expected guidance.

Walkthrough

Adds a Codex Greenpill production-readiness review skill, its display metadata, and tests verifying file discovery, content, naming, canonical references, and separation from the built-in /review mode.

Changes

Greenpill review skill

Layer / File(s) Summary
Skill entrypoint and metadata
.agents/skills/greenpill-review/SKILL.md, .agents/skills/greenpill-review/agents/openai.yaml
Defines the review workflow, invocation modes, canonical skill references, display name, description, and default prompt.
Discovery validation
scripts/repo-skill-discovery.test.ts
Verifies required skill files, expected workflow wording, canonical references, mode separation, and metadata values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit reviewed the greenpill way,
With tidy skills to guide the day.
“Read-only hops, fixes on cue,
Built-in review stays separate too!”
The tests nod softly: “All paths are true.”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: exposing the Greenpill review skill to Codex.
Description check ✅ Passed The description matches the changeset and explains the Codex discovery path, metadata, and regression test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/greenpill-review-skill-discovery

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Oba-One Oba-One added automated/codex Created by Codex automation draft labels Jul 14, 2026 — with ChatGPT Codex Connector
@Oba-One
Oba-One marked this pull request as ready for review July 14, 2026 20:26
@Oba-One Oba-One removed the draft label Jul 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/repo-skill-discovery.test.ts`:
- Around line 17-19: Update the regular expressions in the test around the skill
content assertions to tolerate optional carriage returns before line feeds:
include \r? in both the frontmatter name match and the prohibited name check.
Preserve the existing multiline anchoring and assertion behavior.
- Around line 1-6: Update the rootDir initialization near the imports to use
fileURLToPath from node:url on import.meta.url before passing it to resolve,
replacing direct .pathname access while preserving the existing repository-root
resolution behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e819996d-2d2b-4a81-aaed-ec3f3dc54450

📥 Commits

Reviewing files that changed from the base of the PR and between 9a07564 and 648a31d.

📒 Files selected for processing (3)
  • .agents/skills/greenpill-review/SKILL.md
  • .agents/skills/greenpill-review/agents/openai.yaml
  • scripts/repo-skill-discovery.test.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Private map/member-node intake must never expose emails, raw notes, IP addresses, user agents, spam metadata, steward review notes, pending submissions, or raw upstream EAS/Green Goods work and media feedback.

Files:

  • scripts/repo-skill-discovery.test.ts
**/*.{ts,tsx,astro}

📄 CodeRabbit inference engine (AGENTS.md)

Keep implementation within the smallest applicable package boundary and do not expand beyond issue acceptance criteria.

Files:

  • scripts/repo-skill-discovery.test.ts
🪛 SkillSpector (2.3.11)
.agents/skills/greenpill-review/SKILL.md

[warning] 11: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.

(Agent Snooping (AS3))


[warning] 11: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.

(Agent Snooping (AS3))

🔇 Additional comments (2)
.agents/skills/greenpill-review/SKILL.md (1)

1-23: LGTM!

.agents/skills/greenpill-review/agents/openai.yaml (1)

1-5: LGTM!

Comment on lines +1 to +6
import assert from 'node:assert/strict';
import { access, readFile } from 'node:fs/promises';
import { resolve } from 'node:path';
import test from 'node:test';

const rootDir = resolve(new URL('..', import.meta.url).pathname);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use fileURLToPath to support paths with spaces and Windows drives.

Extracting .pathname from import.meta.url leaves URI-encoded characters (like %20 for spaces) unresolved and retains leading slashes on Windows (e.g., /C:/). This will cause file resolution to fail if the repository is cloned into a directory with spaces. Use fileURLToPath for robust cross-platform compatibility.

💻 Proposed fix
 import assert from 'node:assert/strict';
 import { access, readFile } from 'node:fs/promises';
 import { resolve } from 'node:path';
 import test from 'node:test';
+import { fileURLToPath } from 'node:url';
 
-const rootDir = resolve(new URL('..', import.meta.url).pathname);
+const rootDir = fileURLToPath(new URL('..', import.meta.url));
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import assert from 'node:assert/strict';
import { access, readFile } from 'node:fs/promises';
import { resolve } from 'node:path';
import test from 'node:test';
const rootDir = resolve(new URL('..', import.meta.url).pathname);
import assert from 'node:assert/strict';
import { access, readFile } from 'node:fs/promises';
import { resolve } from 'node:path';
import test from 'node:test';
import { fileURLToPath } from 'node:url';
const rootDir = fileURLToPath(new URL('..', import.meta.url));
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/repo-skill-discovery.test.ts` around lines 1 - 6, Update the rootDir
initialization near the imports to use fileURLToPath from node:url on
import.meta.url before passing it to resolve, replacing direct .pathname access
while preserving the existing repository-root resolution behavior.

Comment on lines +17 to +19
const skill = await readFile(codexSkillPath, 'utf8');
assert.match(skill, /^---\nname: greenpill-review\n/m);
assert.doesNotMatch(skill, /^name: review$/m);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make regex matching robust against Windows CRLF line endings.

If the repository is checked out with CRLF line endings on Windows, the hardcoded \n will fail to match lines ending with \r\n. Additionally, $ in JavaScript's /m mode matches before \n, meaning ^name: review$ would incorrectly fail to match name: review\r, leading to a false positive test for assert.doesNotMatch. Account for optional carriage returns with \r?.

💻 Proposed fix
   const skill = await readFile(codexSkillPath, 'utf8');
-  assert.match(skill, /^---\nname: greenpill-review\n/m);
-  assert.doesNotMatch(skill, /^name: review$/m);
+  assert.match(skill, /^---\r?\nname: greenpill-review\r?\n/m);
+  assert.doesNotMatch(skill, /^name: review\r?$/m);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const skill = await readFile(codexSkillPath, 'utf8');
assert.match(skill, /^---\nname: greenpill-review\n/m);
assert.doesNotMatch(skill, /^name: review$/m);
const skill = await readFile(codexSkillPath, 'utf8');
assert.match(skill, /^---\r?\nname: greenpill-review\r?\n/m);
assert.doesNotMatch(skill, /^name: review\r?$/m);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/repo-skill-discovery.test.ts` around lines 17 - 19, Update the
regular expressions in the test around the skill content assertions to tolerate
optional carriage returns before line feeds: include \r? in both the frontmatter
name match and the prohibited name check. Preserve the existing multiline
anchoring and assertion behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated/codex Created by Codex automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant