TA

task-external-models

Reference for running external AI models via Bash and claudish CLI.

Install

mkdir -p .claude/skills/task-external-models && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9460" && unzip -o skill.zip -d .claude/skills/task-external-models && rm skill.zip

Installs to .claude/skills/task-external-models

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Quick-reference for using external AI models in orchestration workflows. External models are invoked via Bash+claudish CLI (deterministic, 100% reliable). Use when confused about how to run external models, "claudish with Bash", "external model in /team", or "how to specify external model". Trigger keywords - "external model", "claudish", "Bash claudish", "external LLM", "model parameter".
392 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Invoke external AI models via claudish CLI
  • Execute multiple external models in parallel
  • Manage model preferences per context
  • Verify model execution via exit codes and output size
  • Route requests using model-specific prefixes

How it works

External models are invoked by executing the claudish CLI through Bash commands, which allows for deterministic model interaction outside of the internal agent model.

Inputs & outputs

You give it
prompt.md file
You get back
result.md file and exit status

When to use task-external-models

  • Execute external LLMs
  • Configure claudish model parameters
  • Manage model preferences
  • Integrate external models into tasks

About this skill

External Models: Quick Reference

⚠️ Learn and Reuse Model Preferences

Models are learned per context and reused automatically:

cat .claude/multimodel-team.json 2>/dev/null

Flow:

  1. Detect context from task keywords (debug/research/coding/review)
  2. If contextPreferences[context] has models → USE THEM (no asking)
  3. If empty (first time for context) → ASK user → SAVE to that context
  4. User says "use different models" → ASK and UPDATE

Override triggers: "use different models", "change models", "update preferences"


The Simple Truth

External AI models are invoked via Bash+claudish CLI. This is deterministic and 100% reliable.

claudish --model {MODEL_ID} --stdin --quiet < prompt.md > result.md

In /team orchestration:

  • Internal model (Claude) → Task(subagent_type: "dev:researcher")
  • External models (Grok, Gemini, etc.) → Bash(claudish --model {MODEL_ID} --stdin)

Bash + claudish Pattern

Works with ANY agent — deterministic, no LLM compliance needed.

# Pattern
claudish --model {MODEL_ID} --stdin --quiet < prompt.md > result.md 2>stderr.log; echo $? > result.exit

# Examples
claudish --model x-ai/grok-code-fast-1 --stdin --quiet < task.md > grok.md 2>grok-err.log; echo $? > grok.exit
claudish --model google/gemini-3-pro-preview --stdin --quiet < task.md > gemini.md 2>gemini-err.log; echo $? > gemini.exit
claudish --model openai/gpt-5.2-codex --stdin --quiet < task.md > gpt5.md 2>gpt5-err.log; echo $? > gpt5.exit

CLI Reference:

claudish [options]

--model <id>         AI model to use (e.g., x-ai/grok-code-fast-1)
--stdin              Read prompt from stdin
--quiet              Minimal output

Parallel Execution in /team:

All Bash calls are launched in a SINGLE message with run_in_background: true:

// Internal model via Task
Task({
  subagent_type: "dev:researcher",
  description: "Internal Claude vote",
  run_in_background: true,
  prompt: "{VOTE_PROMPT}\n\nWrite to: {SESSION_DIR}/internal-result.md"
})

// External models via Bash+claudish (all in same message)
Bash({
  command: "claudish --model x-ai/grok-code-fast-1 --stdin --quiet < {SESSION_DIR}/vote-prompt.md > {SESSION_DIR}/grok-result.md 2>{SESSION_DIR}/grok-stderr.log; echo $? > {SESSION_DIR}/grok.exit",
  run_in_background: true
})

Bash({
  command: "claudish --model google/gemini-3-pro-preview --stdin --quiet < {SESSION_DIR}/vote-prompt.md > {SESSION_DIR}/gemini-result.md 2>{SESSION_DIR}/gemini-stderr.log; echo $? > {SESSION_DIR}/gemini.exit",
  run_in_background: true
})

Common Mistakes

MistakeWhy It FailsFix
Missing --stdin flagclaudish expects prompt as argument, truncated for large promptsUse --stdin with < prompt-file.md
Not capturing exit codeNo way to detect failuresAdd ; echo $? > result.exit
Not capturing stderrError details lostAdd 2>stderr.log
$(cat file.md) in Task promptShell expansion doesn't work in JSON string parametersRead file content first, then include in prompt

Model IDs

Note: Model IDs change frequently. Use claudish --top-models for current list.

# Get current available models
claudish --top-models    # Best value paid models
claudish --free          # Free models

# Example model IDs (verify with commands above)
x-ai/grok-code-fast-1       # Grok (fast coding)
minimax/minimax-m2.5        # MiniMax M2.5
google/gemini-3-pro-preview # Gemini Pro
openai/gpt-5.2-codex        # GPT-5.2 Codex
z-ai/glm-4.7                # GLM 4.7
deepseek/deepseek-v3.2      # DeepSeek v3.2

Prefix routing: Use direct API prefixes for cost savings: oai/ (OpenAI), g/ (Gemini), mmax/ (MiniMax), kimi/ (Kimi), glm/ (GLM).


Verifying Models Actually Ran

After collecting results from external models, always verify:

  1. Check exit code: cat {model-slug}.exit → should be 0
  2. Check output size: wc -c < {model-slug}-result.md → should be >50 bytes
  3. Check stderr: cat {model-slug}-stderr.log → should be empty or just info
  4. Record in verification table for /team results display

Verification checklist:

For each external model result:
  ☐ Exit code is 0
  ☐ Result file exists and has >50 bytes
  ☐ Response contains substantive analysis (not just acknowledgment)
  ☐ No error messages in stderr log

Related Skills

  • multimodel:proxy-mode-reference - Complete claudish CLI documentation with routing prefixes
  • multimodel:multi-model-validation - Full parallel validation patterns
  • multimodel:model-tracking-protocol - Progress tracking during reviews
  • multimodel:error-recovery - Handle failures and timeouts

When not to use it

  • When attempting to set PROXY_MODE as a Task parameter
  • When relying on shell expansion inside Task JSON strings

Prerequisites

claudish CLI

Limitations

  • Model IDs change frequently
  • Shell expansion does not function within Task JSON string parameters

How it compares

Unlike standard agent tasks that use a single internal model, this approach enables explicit, parallel execution of multiple external LLMs with individual error tracking.

Compared to similar skills

task-external-models side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
task-external-models (this skill)06moReviewIntermediate
prompt-optimize139moNo flagsAdvanced
ai-cost-optimizer95moCautionIntermediate
self-improving-agent121moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by MadAppGang

View all by MadAppGang

claudish-usage

MadAppGang

CRITICAL - Guide for using Claudish CLI ONLY through sub-agents to run Claude Code with any AI model (OpenRouter, Gemini, OpenAI, local models). NEVER run Claudish directly in main context unless user explicitly requests it. Use when user mentions external AI models, Claudish, OpenRouter, Gemini, OpenAI, Ollama, or alternative models. Includes mandatory sub-agent delegation patterns, agent selection guide, file-based instructions, and strict rules to prevent context window pollution.

442

golang-performance

MadAppGang

Use when profiling Go applications (pprof), running benchmarks, optimizing memory/CPU usage, or debugging performance bottlenecks in production Go code.

47

golang

MadAppGang

Use when building Go backend services, implementing goroutines/channels, handling errors idiomatically, writing tests with testify, or following Go best practices for APIs/CLI tools.

313

schemas

MadAppGang

YAML frontmatter schemas for Claude Code agents and commands. Use when creating or validating agent/command files.

34

external-model-selection

MadAppGang

Choose optimal external AI models for code analysis, bug investigation, and architectural decisions. Use when consulting multiple LLMs via claudish, comparing model perspectives, or investigating complex Go/LSP/transpiler issues. Provides empirically validated model rankings (91/100 for MiniMax M2, 83/100 for Grok Code Fast) and proven consultation strategies based on real-world testing.

218

adr-documentation

MadAppGang

Architecture Decision Records (ADR) documentation practice. Use when documenting architectural decisions, recording technical trade-offs, creating decision logs, or establishing architectural patterns. Trigger keywords - "ADR", "architecture decision", "decision record", "trade-offs", "architectural decision", "decision log".

12

You might also like

prompt-optimize

YYH211

Expert prompt engineering skill that transforms Claude into "Alpha-Prompt" - a master prompt engineer who collaboratively crafts high-quality prompts through flexible dialogue. Activates when user asks to "optimize prompt", "improve system instruction", "enhance AI instruction", or mentions prompt engineering tasks.

13113

ai-cost-optimizer

ScientiaCapital

Save 40-70% on AI costs with intelligent multi-LLM routing. Automatically selects the optimal model based on task complexity across 40+ models from 8 providers.

990

self-improving-agent

alirezarezvani

Curate Claude Code's auto-memory into durable project knowledge. Analyze MEMORY.md for patterns, promote proven learnings to CLAUDE.md and .claude/rules/, extract recurring solutions into reusable skills. Use when: (1) reviewing what Claude has learned about your project, (2) graduating a pattern from notes to enforced rules, (3) turning a debugging solution into a skill, (4) checking memory health and capacity.

128

ccs-delegation

kaitranntt

Auto-activate CCS CLI delegation for deterministic tasks. Parses user input, auto-selects optimal profile (glm/kimi/custom) from ~/.ccs/config.json, enhances prompts with context, executes via `ccs {profile} -p "task"` or `ccs {profile}:continue`, and reports results. Triggers on "use ccs [task]" patterns, typo/test/refactor keywords. Excludes complex architecture, security-critical code, performance optimization, breaking changes.

210

skill-from-notebook

GBSOSS

Extract methodologies from documents or examples to create executable skills

28

prompt-factory

alirezarezvani

World-class prompt powerhouse that generates production-ready mega-prompts for any role, industry, and task through intelligent 7-question flow, 69 comprehensive presets across 15 professional domains (technical, business, creative, legal, finance, HR, design, customer, executive, manufacturing, R&D, regulatory, specialized-technical, research, creative-media), multiple output formats (XML/Claude/ChatGPT/Gemini), quality validation gates, and contextual best practices from OpenAI/Anthropic/Google. Supports both core and advanced modes with testing scenarios and prompt variations.

45

Search skills

Search the agent skills registry