一键导入
llm
Multi-LLM research — deep research, second opinions, and multi-model debate. Use when user says /llm.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Multi-LLM research — deep research, second opinions, and multi-model debate. Use when user says /llm.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
When stuck on a specific problem, stop coding, gather context, and ask /deep or /pro for a fresh perspective.
Reframe recurring or wrong-shaped problems into a design where the bug cannot happen.
Run 5 Whys plus /big reframing to trace a symptom to structural root cause before fixing.
Batch operations across files with confidence-based auto-apply. Use for renaming, search-replace, refactoring code, updating text/markdown, migrating terminology, and API migrations. Run `bun tools/refactor.ts --help` for detailed command reference.
Analyze a decision end-to-end: gather context, compare options, score tradeoffs, and present one clear recommendation.
Save active session context, git state, recent commits, and next steps to one tracking issue before compaction or handoff.
| name | llm |
| description | Multi-LLM research — deep research, second opinions, and multi-model debate. Use when user says /llm. |
| allowed-tools | Bash, Read |
Multi-LLM research with deep research, second opinions, and multi-model debate.
# Standard question (~$0.02)
bun tools/llm.ts "What is the capital of France?"
# Deep research with web search (~$2-5)
bun tools/llm.ts --deep -y "Best practices for TUI testing in 2026"
# Second opinion from a different provider (~$0.02)
bun tools/llm.ts opinion "Is my caching approach reasonable?"
# Multi-model debate with synthesis (~$1-3)
bun tools/llm.ts debate -y "Monorepo vs polyrepo for our use case?"
# Quick/cheap model (~$0.01)
bun tools/llm.ts quick "What port does postgres use?"
# Explicit context
bun tools/llm.ts --deep -y --context "relevant code or info" "topic"
# Context from file
bun tools/llm.ts --deep -y --context-file ./src/module.ts "Review this code"
# Include session history
bun tools/llm.ts --deep -y --with-history "topic"
Response is ALWAYS written to a file. JSON metadata goes to stdout (single line):
{
"query": "What is the capital of France?",
"file": "/tmp/llm-abc12345-1738800000000-x1y2.txt",
"chars": 5432,
"model": "GPT-5.2",
"tokens": 1234,
"cost": "$0.02",
"durationMs": 3200
}
File path also printed on stderr: Output written to: <path>.
Streaming tokens go to stderr ONLY if it's a TTY (interactive terminal).
In background tasks, stderr is quiet -- just the file path line. No truncation risk.
Read the output file with Read tool. Stale files (>7 days) are auto-cleaned on next run.
Fast enough to run synchronously. Stdout contains JSON with file path:
bun tools/llm.ts "question"
# stdout = JSON with "file" key -- Read the file
Deep research takes 2-15 minutes. Never poll output files manually (sleep + read loops waste turns). Use the Task tool with run_in_background=true, then TaskOutput with block=true:
# Step 1: Launch background task
Task(subagent_type="Bash", run_in_background=true,
prompt='bun tools/llm.ts --deep -y "topic"')
-> Returns task_id
# Step 2: Do other work while it runs...
# Step 3: Block-wait for completion (up to 10 min)
TaskOutput(task_id=<id>, block=true, timeout=600000)
# Step 4: Find the output file
# Look for "Output written to: /tmp/llm-*.txt" in the last lines.
# If truncated (deep research streams thousands of tokens to stderr):
# ls -lt /tmp/llm-*.txt | head -1
# Read the OUTPUT FILE -- NOT the task output (which is just streaming tokens).
CRITICAL: Background task output captures stderr (streaming tokens) + stdout (JSON). For deep research this can exceed 30KB, causing Claude Code to truncate it. The actual response is ALWAYS in the output file. Read the file, not the task output.
Anti-pattern -- do NOT do this:
# BAD: Manual polling wastes 5+ turns on sleep/read cycles
Bash("sleep 30 && wc -l /tmp/output")
Read("/tmp/output")
Bash("sleep 30 && wc -l /tmp/output") # still not done...
Similar to deep research timing-wise. Use the same TaskOutput pattern for background execution.
bun tools/llm.ts recover # List incomplete responses
bun tools/llm.ts recover <id> # Retrieve by ID from OpenAI
bun tools/llm.ts partials --clean # Clean up old partial files
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GOOGLE_GENERATIVE_AI_API_KEY="..."
export XAI_API_KEY="..."
export PERPLEXITY_API_KEY="pplx-..."