provider-review-prompt-path-guard
Prevent adversarial review dispatch failures caused by sandbox/tmp path mismatches and provider CLI working-directory drift when launching Codex or Gemini with prompt files.
Best use case
provider-review-prompt-path-guard is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Prevent adversarial review dispatch failures caused by sandbox/tmp path mismatches and provider CLI working-directory drift when launching Codex or Gemini with prompt files.
Teams using provider-review-prompt-path-guard should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/provider-review-prompt-path-guard/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How provider-review-prompt-path-guard Compares
| Feature / Agent | provider-review-prompt-path-guard | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Prevent adversarial review dispatch failures caused by sandbox/tmp path mismatches and provider CLI working-directory drift when launching Codex or Gemini with prompt files.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Provider Review Prompt Path Guard Use this when launching Codex/Gemini adversarial reviews from saved prompt files. ## Problem this solves Review launches can fail even when the prompt file exists because of two separate pathing traps: 1. Files written via `execute_code` to `/tmp` are sandbox-local and invisible to later `terminal()` shell commands. 2. A `terminal(workdir=...)` launch can still produce provider CLI runs whose effective shell context resolves relative prompt paths unexpectedly. Observed failure mode: - `codex exec "$(cat .planning/quick/review-334-prompt.md)"` returned `cat: .planning/quick/review-334-prompt.md: No such file or directory` - Codex then started in the parent workspace instead of the intended repo directory. ## Reliable pattern Always do all of the following: 1. Write prompt files onto the real workspace filesystem, not sandbox `/tmp`. 2. Save prompts under the repo, e.g. `.planning/quick/review-<issue>-prompt.md`. 3. Verify prompt file existence with `wc -c /absolute/path/to/prompt.md` before dispatch. 4. Use an absolute path inside `$(cat ...)`. 5. Prefix the provider launch with explicit `cd /repo && ...` in the same shell command. ## Recommended command pattern ```bash cd /abs/path/to/repo && \ provider exec "$(cat /abs/path/to/repo/.planning/quick/review-<issue>-prompt.md)" \ 2>&1 | tee /abs/path/to/repo/.planning/quick/review-<issue>-<provider>.out ``` Examples: ```bash cd /mnt/local-analysis/workspace-hub/worldenergydata && \ codex exec "$(cat /mnt/local-analysis/workspace-hub/worldenergydata/.planning/quick/review-334-prompt.md)" \ 2>&1 | tee /mnt/local-analysis/workspace-hub/worldenergydata/.planning/quick/review-334-codex.out ``` ```bash cd /mnt/local-analysis/workspace-hub/worldenergydata && \ gemini exec "$(cat /mnt/local-analysis/workspace-hub/worldenergydata/.planning/quick/review-334-prompt.md)" \ 2>&1 | tee /mnt/local-analysis/workspace-hub/worldenergydata/.planning/quick/review-334-gemini.out ``` ## Verification checklist Before launching reviewers: - prompt file exists at an absolute repo path - `wc -c /abs/path/prompt.md` succeeds - output path is absolute - command begins with `cd /repo &&` - prompt text is self-contained (reviewer should not need local file reads) After launching: - inspect raw provider output file, not only process status - if Gemini hits 429 retries, keep reading — it may still return a substantive review later - if a provider truly fails, save a canonical artifact documenting `UNAVAILABLE` or failure details ## When to escalate If Codex/Gemini still cannot read the prompt reliably: - shorten the prompt - keep it self-contained - avoid chained relative paths entirely - preserve raw logs and create a provider-status artifact
Related Skills
plan-review-prompt-refresh-after-plan-edits
Refresh reviewer prompt files from the latest on-disk plan before every adversarial re-review. Prevents Codex/Gemini from critiquing stale plan text after local edits.
provider-session-ecosystem-audit-and-exporters
Build and maintain cross-provider session-log audits for Codex, Codex, Hermes, and Gemini, including exporter design, normalization, and behavioral verification.
tdd-verification-and-adversarial-review
Verify pre-written TDD tests pass, conduct adversarial code review on committed diffs, and route findings to existing issues
python-import-path-mismatch-debugging
Diagnose and fix ModuleNotFoundError when a package is installed but imports still fail due to environment/path mismatches
python-import-path-debugging
Diagnose ModuleNotFoundError when a package is installed but still fails to import
multi-role-agent-contract-review-pipeline
Execute a 4-role agent team (Planner/Architect/Reviewer/Integrator) pipeline for self-reviewing knowledge artifacts before delivery
label-driven-prompt-generation-architecture
Pattern for building automation scripts that classify GitHub issues into prompt templates using label-based routing and extract contextual data for batch processing
gsd-adversarial-review-pattern
Catch hidden test failures by running adversarial review on sparse-data edge cases before final push
agent-team-prompt-generation
Create self-contained execution prompts that define multi-role workflows for Codex sessions without external dependencies
adversarial-code-review-tdd
Systematic adversarial review pattern to identify breaking assumptions in already-passing test suites
adversarial-code-review-for-committed-diffs
Systematic process for reviewing already-committed code changes to catch type inconsistencies, edge cases, and docstring gaps
adversarial-code-review-and-fix
Systematic pattern for catching design flaws in already-passing code through adversarial review, then fixing them with TDD confirmation.