Validate the skill identified by $ARGUMENTS without modifying it. If no path is supplied, infer the skill files changed on the current branch.
Codex: if the invocation token above is not substituted, use the text following the skill name in the current request.
Establish scope
- Resolve each target
SKILL.md, its plugin root, manifest, bundled resources, tests, andagents/openai.yamlwhen present. - Read every applicable
AGENTS.md. In this repository, treatDual-Harness Skill Contractas authoritative. - Determine whether the skill promises dual-harness support or is explicitly harness-specific. Do not demand parity from a deliberate exception, but require the exception to be visible in metadata and documentation.
- When reviewing branch changes, compare the target files with the merge base so removed Claude behavior is visible; do not review only the final text.
Validate both harnesses
Report a concrete failure whenever one of these contracts is violated:
- Discovery and distribution
- Put reusable workflows at
plugins/<plugin>/skills/<name>/SKILL.md; Codex does not expose legacycommands/*.mdworkflows. - Keep
.claude-plugin/plugin.jsonand any native Codex catalog/manifest entries consistent with the plugin’s intended availability. - Bump each affected plugin version once per unreleased branch, after the final plugin edit.
- Put reusable workflows at
- Routing metadata
- Keep the terms Codex needs for implicit routing in
description; it does not use Claude’swhen_to_use,argument-hint, oreffortfor routing. - Treat Claude’s
allowed-toolsand dynamic!context as Claude-only behavior unless a current Codex probe proves otherwise. - If Claude has
disable-model-invocation: true, requirepolicy.allow_implicit_invocation: falseinagents/openai.yamlfor Codex.
- Keep the terms Codex needs for implicit routing in
- Invocation arguments
- Preserve one literal dollar sign immediately followed by
ARGUMENTSwherever Claude must interpolate invocation text at a particular location, including migrated command workflows. Do not repeat that substitutable form in explanatory prose. - Preserve useful
argument-hintmetadata for Claude. Put Codex fallback instructions in adjacent prose instead of replacing the token.
- Preserve one literal dollar sign immediately followed by
- Skill and plugin paths
- In executable text, keep the braced shell variables named
CLAUDE_SKILL_DIRandCLAUDE_PLUGIN_ROOTbare. Reject shell-default wrappers, traversal from a skill directory to its plugin root, hardcoded cache paths, and unanchored relative resource paths. - Put Codex substitution instructions in adjacent prose without repeating a Claude path token in the Codex-only sentence or comment.
- Repeat the resolved local assignment in every independently executed block. Codex shells do not retain state between blocks.
- Inspect inline and fenced dynamic-context commands separately; paths injected before the model sees the prompt must resolve mechanically under Claude.
- In executable text, keep the braced shell variables named
- Runtime-specific behavior
- Keep Claude
allowed-toolspatterns synchronized with the literal commands Claude executes; do not broaden permissions as an incidental portability fix. - Treat hooks as a separate runtime surface. Do not infer hook variables or lifecycle events from skill-shell behavior.
- Preserve documented invocation forms: Claude Code uses
/<plugin>:<skill>and Codex uses$<plugin>:<skill>; use the bare skill name in prose.
- Keep Claude
Prove the result
- Run the target plugin’s focused tests.
- In this repository, run:
bash plugins/codex/tests/skill-paths_test.shnode --test plugins/codex/tests/compatibility.test.mjsbash tests/run-all.sh
- If the edit changes paths, arguments, routing, hooks, permissions, or dynamic context, run a representative installed-plugin probe under both Claude Code and Codex. Static scans alone are insufficient.
- Report blockers first with file and line references, then non-blocking follow-ups, then exact test/probe evidence. If no issue remains, say which contracts were checked rather than giving a generic approval.