External llm consulting

From majesticlabs-dev/majestic-marketplace · View interactive version

External llm consulting is an AI agent skill from the GitHub repository majesticlabs-dev/majestic-marketplace. Get architecture and design second opinions from external LLMs (OpenAI Codex, Google Gemini) via their CLIs. Use when you need alternative perspectives on design decisions, model selection, or structured comparison of approaches.

How to use this skill

Skill file

External LLM Consulting

Audience: Developers seeking alternative AI perspectives on architecture and design decisions.

Goal: Invoke external LLM CLIs in read-only/sandbox mode to get structured second opinions, then present results for comparison with Claude's perspective.

When to Use

General Workflow

  1. Gather relevant context (CLAUDE.md, AGENTS.md, existing code patterns, constraints)
  2. Formulate a focused prompt with context, specific questions, and structured output request
  3. Execute the external CLI in sandbox/read-only mode
  4. Parse and structure the response for comparison

Codex Consulting

Prerequisites

Available Models

| Model | Use Case | Cost |

|-------|----------|------|

| gpt-5.1-codex-mini | Fast, cost-effective (~4x more usage) | Low |

| gpt-5.1-codex | Balanced, optimized for agentic tasks (default) | Medium |

| gpt-5.1-codex-max | Maximum intelligence for critical decisions | High |

Parse model from prompt if specified (e.g., "using codex-mini, analyze..." or "model: gpt-5.1-codex-max").

CLI Execution

Run Codex in read-only sandbox mode:

codex exec --sandbox read-only --model <model> "<prompt>"

Important flags:

For complex prompts, use heredoc:

codex exec --sandbox read-only --model gpt-5.1-codex "$(cat <<'EOF'
Context: [codebase context]

Question: [specific architectural question]

Please provide:
1. 2-3 alternative approaches
2. Trade-offs for each approach
3. Your recommendation with reasoning
EOF
)"

Codex Error Handling

| Error | Resolution |

|-------|------------|

| CLI not found | Install: npm install -g @openai/codex then codex login |

| Auth failed | Run: codex login |

| Timeout (>2 min) | Report partial results or simplify the query |

Gemini Consulting

Prerequisites

Available Models

| Model | Use Case | Cost |

|-------|----------|------|

| gemini-2.5-flash | Fast, cost-effective consulting | Low |

| gemini-2.5-pro | Balanced reasoning | Medium |

| gemini-3.0-pro-preview | Latest Gemini 3 Pro (default) | Medium |

Parse model from prompt if specified (e.g., "using flash, analyze..." or "model: gemini-3.0-pro-preview").

CLI Execution

Run Gemini in sandbox mode:

gemini --sandbox --output-format text --model <model> "<prompt>"

Important flags:

For complex prompts, use heredoc:

gemini --sandbox --output-format text --model gemini-3.0-pro-preview "$(cat <<'EOF'
Context: [codebase context]

Question: [specific architectural question]

Please provide:
1. 2-3 alternative approaches
2. Trade-offs for each approach
3. Your recommendation with reasoning
EOF
)"

Gemini Error Handling

| Error | Resolution |

|-------|------------|

| CLI not found | Install: npm install -g @anthropic-ai/gemini-cli / See https://github.com/google-gemini/gemini-cli |

| Auth failed | Run gemini and follow authentication prompts |

| Timeout (>2 min) | Report partial results or simplify the query |

Prompt Formulation

Create a focused prompt that:

Include relevant sections from CLAUDE.md/AGENTS.md and any project constraints mentioned in the user's request.

Output Format

## [Codex/Gemini] Consulting Results

**Query:** [Original question/topic]

**Model:** [model used] (via [Codex/Gemini] CLI)

### Alternative Perspectives

#### Option 1: [Name]
- **Approach:** [Description]
- **Pros:** [Benefits]
- **Cons:** [Drawbacks]

#### Option 2: [Name]
- **Approach:** [Description]
- **Pros:** [Benefits]
- **Cons:** [Drawbacks]

#### Option 3: [Name]
- **Approach:** [Description]
- **Pros:** [Benefits]
- **Cons:** [Drawbacks]

### Recommendation
[LLM's preferred approach and reasoning]

### Key Insights
- [Insight 1 - something Claude might not have considered]
- [Insight 2]
- [Insight 3]

### Raw Output
<details>
<summary>Full Response</summary>

[Complete unedited response]

</details>

Safety Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.