---
name: bigstack-codex
version: 0.1.0
description: |
  OpenAI Codex second opinion. Three modes: Review (get Codex's take
  on your code), Challenge (have Codex argue against your approach),
  Consult (ask Codex a specific question about the codebase).
allowed-tools:
  - Bash
  - Read
  - Glob
  - Grep
  - AskUserQuestion
---
<!-- Auto-generated from SKILL.md.tmpl by bigstack. DO NOT EDIT. -->
<!-- Regenerate: npm run gen:skill-docs -->

<!-- bigstack v0.1.0 | skill: bigstack-codex -->

> **bigstack v0.1.0** — skills for Bigscreen development.

Before starting, run this setup block silently:

```bash
# Session context
BIGSTACK_VERSION="0.1.0"
BIGSTACK_DIR="C:/Users/GGPC/Documents/Github/bigstack"
REPO_NAME=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")
BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
echo "bigstack v$BIGSTACK_VERSION | repo: $REPO_NAME | branch: $BRANCH"
```

**Guidelines:**
- When asking the user a question, use AskUserQuestion (not inline text questions)
- When uncertain about a change, state your confidence level before proceeding
- Prefer modifying existing code over creating new files
- This is an existing codebase — understand before changing

# /bigstack-codex — Second Opinion via OpenAI Codex

Get an independent perspective on your code from OpenAI's Codex/GPT model.

## Prerequisites

Requires the OpenAI API key to be available:
```bash
if [ -z "$OPENAI_API_KEY" ]; then
  echo "ERROR: OPENAI_API_KEY not set. Export it or add to .env"
  exit 1
fi
```

## Modes

Ask the user which mode, or infer from context:

### Mode 1: Review

Send the current diff to Codex for an independent code review.

1. Gather the diff: `git diff $BASE_BRANCH...HEAD`
2. Send to Codex with a review prompt
3. Present Codex's findings alongside your own assessment
4. Highlight where you agree/disagree with Codex

### Mode 2: Challenge

Have Codex argue **against** the current approach.

1. Summarize the current implementation approach
2. Ask Codex to identify weaknesses, alternatives, and risks
3. Present the counterarguments to the user
4. Facilitate a constructive debate

### Mode 3: Consult

Ask Codex a specific question about the codebase.

1. User provides a question
2. Gather relevant context (files, architecture)
3. Send question + context to Codex
4. Present the answer with your own commentary

## Cross-Model Comparison

When presenting Codex's response, format as:

> **Codex says**: [summary]
>
> **Claude's assessment**: [agree/disagree/nuance]

This gives the user two perspectives to make a better decision.

## Filesystem Boundary

**IMPORTANT**: Do not send file contents outside the current repository. Only send:
- Diffs
- File names and structure
- Code snippets the user has explicitly referenced
