Brains Trust
Consult other leading AI models for a second opinion. Not limited to code — works for architecture, strategy, prompting, debugging, writing, or any question where a fresh perspective helps.
Defaults (When User Just Says "Brains Trust")
If the user triggers this skill without specifying what to consult about, apply these defaults:
- Pattern: Consensus (2 models from different providers) — it's called "brains trust", not "single opinion"
- Scope: Whatever Claude has been working on in the current session. Look at recent context: files edited, decisions made, architecture discussed, problems being solved.
- Mode: Infer from context:
- Recently wrote/edited code → Code Review
- In a planning or design discussion → Architecture
- Debugging something → Debug
- Building prompts or skills → Prompting
- No clear signal → General (ask: "what are we missing? what are our blind spots?")
- Models: Pick the newest pro-tier model from 2 different providers (check
models.flared.au). Prefer diversity: e.g. one Google + one OpenAI, or one Qwen + one Google. Never two from the same provider.
- Prompt focus: "Review what we've been working on. What are we missing? What could be improved? What blind spots might we have? Are there simpler approaches we haven't considered?"
Trigger → Default Mapping
| Trigger |
Default pattern |
Default scope |
| "brains trust" |
Consensus (2 models) |
Current session work |
| "second opinion" |
Single (1 model) |
Current session work |
| "ask gemini" / "ask gpt" |
Single (specified provider) |
Current session work |
| "peer review" |
Consensus (2 models) |
Recently changed files |
| "challenge this" / "devil's advocate" |
Devil's advocate (1 model) |
Claude's current position |
The user can always override by being specific: "brains trust this config file", "ask gemini about the auth approach", etc.
Setup
Set at least one API key as an environment variable:
# Recommended — one key covers all providers
export OPENROUTER_API_KEY="your-key"
# Optional — direct access (often faster/cheaper)
export GEMINI_API_KEY="your-key"
export OPENAI_API_KEY="your-key"
OpenRouter is the universal path — one key gives access to Gemini, GPT, Qwen, DeepSeek, Llama, Mistral, and more.
Current Models
Do not use hardcoded model IDs. Before every consultation, fetch the current leading models:
https://models.flared.au/llms.txt
This is a live-updated, curated list of ~40 leading models from 11 providers, filtered from OpenRouter's full catalogue. Use it to pick the right model for the task.
For programmatic use in the generated Python script: https://models.flared.au/json
Consultation Patterns
| Pattern |
Default for |
What happens |
| Consensus |
"brains trust", "peer review" |
Ask 2 models from different providers in parallel, compare where they agree/disagree |
| Single |
"second opinion", "ask gemini", "ask gpt" |
Ask one model, synthesise with your own view |
| Devil's advocate |
"challenge this", "devil's advocate" |
Ask a model to explicitly argue against your current position |
For consensus, always pick models from different providers (e.g. one Google + one Qwen) for maximum diversity of perspective.
Modes
| Mode |
When |
Model tier |
| Code Review |
Review files for bugs, patterns, security |
Flash |
| Architecture |
Design decisions, trade-offs |
Pro |
| Debug |
Stuck after 2+ failed attempts |
Flash |
| Security |
Vulnerability scan |
Pro |
| Strategy |
Business, product, approach decisions |
Pro |
| Prompting |
Improve prompts, system prompts, KB files |
Flash |
| General |
Any question, brainstorm, challenge |
Flash |
Pro tier: The most capable model from the chosen provider (e.g. google/gemini-3.1-pro-preview, openai/gpt-5.4).
Flash tier: Fast, cheaper models for straightforward analysis (e.g. google/gemini-3-flash-preview, qwen/qwen3.5-flash-02-23).
Workflow
Detect available keys — check OPENROUTER_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY in environment. If none found, show setup instructions and stop.
Fetch current models — WebFetch https://models.flared.au/llms.txt and pick appropriate models based on mode (pro vs flash) and consultation pattern (single vs consensus). If user requested a specific provider ("ask gemini"), use that.
Read target files into context (if code-related). For non-code questions (strategy, prompting, general), skip file reading.
Build prompt using the AI-to-AI template from references/prompt-templates.md. Include file contents inline with --- filename --- separators. Do not set output token limits — let models reason fully.
Create consultation directory at .jez/artifacts/brains-trust/{timestamp}-{topic}/ (e.g. 2026-03-10-1423-auth-architecture/). Write the prompt to prompt.txt inside it — never pass code inline via bash arguments (shell escaping breaks it).
Generate and run Python script at .jez/scripts/brains-trust.py using patterns from references/provider-api-patterns.md:
- Reads prompt from the consultation directory's
prompt.txt
- Calls the selected API(s)
- For consensus mode: calls multiple APIs in parallel using
concurrent.futures
- Saves each response to
{model}.md in the consultation directory
- Prints results to stdout
Synthesise — read the responses, present findings to the user. Note where models agree and disagree. Add your own perspective (agree/disagree with reasoning). Let the user decide what to act on.
When to Use
Good use cases:
- Before committing major architectural changes
- When stuck debugging after multiple attempts
- Architecture decisions with multiple valid options
- Reviewing security-sensitive code
- Challenging your own assumptions on strategy or approach
- Improving system prompts or KB files
- Any time you want a fresh perspective
Avoid using for:
- Simple syntax checks (Claude handles these)
- Every single edit (too slow, costs money)
- Questions with obvious, well-known answers
Critical Rules
- Never hardcode model IDs — always fetch from
models.flared.au first
- Never cap output tokens — don't set
max_tokens or maxOutputTokens
- Always write prompts to file — never pass via bash arguments
- Include file contents inline — attach code context directly in the prompt
- Use AI-to-AI framing — the model is advising Claude, not talking to the human
- Print progress to stderr — the Python script must print status updates (
Calling gemini-2.5-pro..., Received response from qwen3.5-plus.) so the user knows it's working during the 30-90 second wait
Reference Files
| When |
Read |
| Building prompts for any mode |
references/prompt-templates.md |
| Generating the Python API call script |
references/provider-api-patterns.md |
1---2name: brains-trust3description: "\"Get a second opinion from leading AI models on code, architecture, strategy, prompting, or anything. Queries models via OpenRouter, Gemini, or OpenAI APIs. Supports single opinion, multi-model consensus, and devil's advocate patterns. Use whenever the user says 'brains trust', 'second opinion', 'ask gemini', 'ask gpt', 'peer review', 'consult another model', 'challenge this', or 'devil's advocate'.\" - devil's advocate - what does gemini think - what does gpt think"4user-invocable: true5argument-hint: "[question or topic]"6compatibility: claude-code-only7metadata:8 source: https://skillmd.com/skills/artubss/brains-trust9---1011# Brains Trust1213Consult other leading AI models for a second opinion. Not limited to code — works for architecture, strategy, prompting, debugging, writing, or any question where a fresh perspective helps.1415## Defaults (When User Just Says "Brains Trust")1617If the user triggers this skill without specifying what to consult about, apply these defaults:18191. **Pattern**: Consensus (2 models from different providers) — it's called "brains trust", not "single opinion"202. **Scope**: Whatever Claude has been working on in the current session. Look at recent context: files edited, decisions made, architecture discussed, problems being solved.213. **Mode**: Infer from context:22 - Recently wrote/edited code → **Code Review**23 - In a planning or design discussion → **Architecture**24 - Debugging something → **Debug**25 - Building prompts or skills → **Prompting**26 - No clear signal → **General** (ask: "what are we missing? what are our blind spots?")274. **Models**: Pick the newest pro-tier model from 2 different providers (check `models.flared.au`). Prefer diversity: e.g. one Google + one OpenAI, or one Qwen + one Google. Never two from the same provider.285. **Prompt focus**: "Review what we've been working on. What are we missing? What could be improved? What blind spots might we have? Are there simpler approaches we haven't considered?"2930### Trigger → Default Mapping3132| Trigger | Default pattern | Default scope |33|---------|----------------|---------------|34| "brains trust" | Consensus (2 models) | Current session work |35| "second opinion" | Single (1 model) | Current session work |36| "ask gemini" / "ask gpt" | Single (specified provider) | Current session work |37| "peer review" | Consensus (2 models) | Recently changed files |38| "challenge this" / "devil's advocate" | Devil's advocate (1 model) | Claude's current position |3940The user can always override by being specific: "brains trust this config file", "ask gemini about the auth approach", etc.4142## Setup4344Set at least one API key as an environment variable:4546```bash47# Recommended — one key covers all providers48export OPENROUTER_API_KEY="your-key"4950# Optional — direct access (often faster/cheaper)51export GEMINI_API_KEY="your-key"52export OPENAI_API_KEY="your-key"53```5455OpenRouter is the universal path — one key gives access to Gemini, GPT, Qwen, DeepSeek, Llama, Mistral, and more.5657## Current Models5859**Do not use hardcoded model IDs.** Before every consultation, fetch the current leading models:6061```62https://models.flared.au/llms.txt63```6465This is a live-updated, curated list of ~40 leading models from 11 providers, filtered from OpenRouter's full catalogue. Use it to pick the right model for the task.6667For programmatic use in the generated Python script: `https://models.flared.au/json`6869## Consultation Patterns7071| Pattern | Default for | What happens |72|---------|------------|-------------|73| **Consensus** | "brains trust", "peer review" | Ask 2 models from different providers in parallel, compare where they agree/disagree |74| **Single** | "second opinion", "ask gemini", "ask gpt" | Ask one model, synthesise with your own view |75| **Devil's advocate** | "challenge this", "devil's advocate" | Ask a model to explicitly argue against your current position |7677For consensus, always pick models from different providers (e.g. one Google + one Qwen) for maximum diversity of perspective.7879## Modes8081| Mode | When | Model tier |82|------|------|-----------|83| Code Review | Review files for bugs, patterns, security | Flash |84| Architecture | Design decisions, trade-offs | Pro |85| Debug | Stuck after 2+ failed attempts | Flash |86| Security | Vulnerability scan | Pro |87| Strategy | Business, product, approach decisions | Pro |88| Prompting | Improve prompts, system prompts, KB files | Flash |89| General | Any question, brainstorm, challenge | Flash |9091**Pro tier**: The most capable model from the chosen provider (e.g. `google/gemini-3.1-pro-preview`, `openai/gpt-5.4`).92**Flash tier**: Fast, cheaper models for straightforward analysis (e.g. `google/gemini-3-flash-preview`, `qwen/qwen3.5-flash-02-23`).9394## Workflow95961. **Detect available keys** — check `OPENROUTER_API_KEY`, `GEMINI_API_KEY`, `OPENAI_API_KEY` in environment. If none found, show setup instructions and stop.97982. **Fetch current models** — `WebFetch https://models.flared.au/llms.txt` and pick appropriate models based on mode (pro vs flash) and consultation pattern (single vs consensus). If user requested a specific provider ("ask gemini"), use that.991003. **Read target files** into context (if code-related). For non-code questions (strategy, prompting, general), skip file reading.1011024. **Build prompt** using the AI-to-AI template from [references/prompt-templates.md](references/prompt-templates.md). Include file contents inline with `--- filename ---` separators. **Do not set output token limits** — let models reason fully.1031045. **Create consultation directory** at `.jez/artifacts/brains-trust/{timestamp}-{topic}/` (e.g. `2026-03-10-1423-auth-architecture/`). Write the prompt to `prompt.txt` inside it — never pass code inline via bash arguments (shell escaping breaks it).1051066. **Generate and run Python script** at `.jez/scripts/brains-trust.py` using patterns from [references/provider-api-patterns.md](references/provider-api-patterns.md):107 - Reads prompt from the consultation directory's `prompt.txt`108 - Calls the selected API(s)109 - For consensus mode: calls multiple APIs in parallel using `concurrent.futures`110 - Saves each response to `{model}.md` in the consultation directory111 - Prints results to stdout1121137. **Synthesise** — read the responses, present findings to the user. Note where models agree and disagree. Add your own perspective (agree/disagree with reasoning). Let the user decide what to act on.114115## When to Use116117**Good use cases**:118- Before committing major architectural changes119- When stuck debugging after multiple attempts120- Architecture decisions with multiple valid options121- Reviewing security-sensitive code122- Challenging your own assumptions on strategy or approach123- Improving system prompts or KB files124- Any time you want a fresh perspective125126**Avoid using for**:127- Simple syntax checks (Claude handles these)128- Every single edit (too slow, costs money)129- Questions with obvious, well-known answers130131## Critical Rules1321331. **Never hardcode model IDs** — always fetch from `models.flared.au` first1342. **Never cap output tokens** — don't set `max_tokens` or `maxOutputTokens`1353. **Always write prompts to file** — never pass via bash arguments1364. **Include file contents inline** — attach code context directly in the prompt1375. **Use AI-to-AI framing** — the model is advising Claude, not talking to the human1386. **Print progress to stderr** — the Python script must print status updates (`Calling gemini-2.5-pro...`, `Received response from qwen3.5-plus.`) so the user knows it's working during the 30-90 second wait139140## Reference Files141142| When | Read |143|------|------|144| Building prompts for any mode | [references/prompt-templates.md](references/prompt-templates.md) |145| Generating the Python API call script | [references/provider-api-patterns.md](references/provider-api-patterns.md) |