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.

5 stars

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

$curl -o ~/.claude/skills/provider-review-prompt-path-guard/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/software-development/provider-review-prompt-path-guard/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/provider-review-prompt-path-guard/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How provider-review-prompt-path-guard Compares

Feature / Agentprovider-review-prompt-path-guardStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/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

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

5
from vamseeachanta/workspace-hub

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

5
from vamseeachanta/workspace-hub

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

5
from vamseeachanta/workspace-hub

Verify pre-written TDD tests pass, conduct adversarial code review on committed diffs, and route findings to existing issues

python-import-path-mismatch-debugging

5
from vamseeachanta/workspace-hub

Diagnose and fix ModuleNotFoundError when a package is installed but imports still fail due to environment/path mismatches

python-import-path-debugging

5
from vamseeachanta/workspace-hub

Diagnose ModuleNotFoundError when a package is installed but still fails to import

multi-role-agent-contract-review-pipeline

5
from vamseeachanta/workspace-hub

Execute a 4-role agent team (Planner/Architect/Reviewer/Integrator) pipeline for self-reviewing knowledge artifacts before delivery

label-driven-prompt-generation-architecture

5
from vamseeachanta/workspace-hub

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

5
from vamseeachanta/workspace-hub

Catch hidden test failures by running adversarial review on sparse-data edge cases before final push

agent-team-prompt-generation

5
from vamseeachanta/workspace-hub

Create self-contained execution prompts that define multi-role workflows for Codex sessions without external dependencies

adversarial-code-review-tdd

5
from vamseeachanta/workspace-hub

Systematic adversarial review pattern to identify breaking assumptions in already-passing test suites

adversarial-code-review-for-committed-diffs

5
from vamseeachanta/workspace-hub

Systematic process for reviewing already-committed code changes to catch type inconsistencies, edge cases, and docstring gaps

adversarial-code-review-and-fix

5
from vamseeachanta/workspace-hub

Systematic pattern for catching design flaws in already-passing code through adversarial review, then fixing them with TDD confirmation.