Token导航 LogoToken导航

Agent Skill · AI 工具

llm-router(LLM router 搜索)

llm-router 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

llm-router 是AI 工具类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描有提醒项,按安装量在AI 工具类的 2,536 个 Skill 里排第 776。

总安装 2,117周安装 90GitHub Stars 125下载 742核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:llm-router(LLM router 搜索)
来源仓库:https://github.com/jamesrochabrun/skills
仓库路径:skills/llm-router
安装命令:
npx skills add https://github.com/jamesrochabrun/skills --skill llm-router
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/jamesrochabrun/skills --skill llm-router

这个 Skill 是做什么的

AI 工具类 Skill 用来扩展助手本身的能力,例如接模型、接检索、接外部服务。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合围绕仓库状态、代码变更或协作事项进行整理与分析。通过 npx skills add 命令从指定 GitHub 仓库安装使用。安装前需确认权限范围、维护状态及是否触发联网或文件操作。

llm-router 属于AI 工具类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/llm-router

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/jamesrochabrun/skills --skill llm-router;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

llm-router 怎么安装?

在终端执行 npx skills add https://github.com/jamesrochabrun/skills --skill llm-router。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

llm-router 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

llm-router 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

llm-router 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

llm-router 用的人多吗?

公开数据是累计安装 2,117 次,近一周安装 90 次,下载 742 次,GitHub 125 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

llm-router 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理AI 工具类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

AI 工具类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
executing-plans

执行计划 · Codex、Claude

1,515,336173,110只读MIT通过
verification-before-completion

完成前的验证 · Codex、Claude

1,319,472173,121权限未标注MIT通过
subagent-driven-development

子 Agent 驱动开发 · Codex、Claude

1,312,416173,138只读MIT通过
copy-editing

复制编辑 · Codex、Claude

1,209,57625,632只读MIT通过
paywall-upgrade-cro

付费专区升级 cro · Codex、Claude

1,030,17625,617只读MIT通过
llm-router

LLM router 搜索 · 本页

2,117125接触敏感数据MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

LLM Router

Overview

Route AI requests to different LLM providers using SwiftOpenAI-CLI's agent mode. This skill automatically configures the CLI to use the requested provider (OpenAI, Grok, Groq, DeepSeek, or OpenRouter), ensures the tool is installed and up-to-date, and executes one-shot agentic tasks.

Core Workflow

When a user requests to use a specific LLM provider (e.g., "use grok to explain quantum computing"), follow this workflow:

Step 1: Ensure SwiftOpenAI-CLI is Ready

Check if SwiftOpenAI-CLI is installed and up-to-date:

scripts/check_install_cli.sh

This script will:

  • Check if swiftopenai is installed
  • Verify the version (minimum 1.4.4)
  • Install or update if necessary
  • Report the current installation status

Step 2: Configure the Provider

Based on the user's request, identify the target provider and configure SwiftOpenAI-CLI:

scripts/configure_provider.sh <provider> [model]

Supported providers:

  • openai - OpenAI (GPT-4, GPT-5, etc.)
  • grok - xAI Grok models
  • groq - Groq (Llama, Mixtral, etc.)
  • deepseek - DeepSeek models
  • openrouter - OpenRouter (300+ models)

Examples:

# Configure for Grok
scripts/configure_provider.sh grok grok-4-0709

# Configure for Groq with Llama
scripts/configure_provider.sh groq llama-3.3-70b-versatile

# Configure for DeepSeek Reasoner
scripts/configure_provider.sh deepseek deepseek-reasoner

# Configure for OpenAI GPT-5
scripts/configure_provider.sh openai gpt-5

The script automatically:

  • Sets the provider configuration
  • Sets the appropriate base URL
  • Sets the default model
  • Provides guidance on API key configuration

Step 3: Verify API Key

The configuration script automatically checks if an API key is set and will stop with clear instructions if no API key is found.

If API key is missing:

The script exits with error code 1 and displays:

  • ⚠️ Warning that API key is not set
  • Instructions for setting via environment variable
  • Instructions for setting via config (persistent)

Do not proceed to Step 4 if the configuration script fails due to missing API key.

Instead, inform the user they need to set their API key first:

Option 1 - Environment variable (session only):

export XAI_API_KEY=xai-...           # for Grok
export GROQ_API_KEY=gsk_...          # for Groq
export DEEPSEEK_API_KEY=sk-...       # for DeepSeek
export OPENROUTER_API_KEY=sk-or-...  # for OpenRouter
export OPENAI_API_KEY=sk-...         # for OpenAI

Option 2 - Config file (persistent):

swiftopenai config set api-key <api-key-value>

After the user sets their API key, re-run the configuration script to verify.

Step 4: Execute the Agentic Task

Run the user's request using agent mode:

swiftopenai agent "<user's question or task>"

Agent mode features:

  • One-shot task execution
  • Built-in tool calling
  • MCP (Model Context Protocol) integration support
  • Conversation memory with session IDs
  • Multiple output formats

Examples:

# Simple question
swiftopenai agent "What is quantum entanglement?"

# With specific model override
swiftopenai agent "Write a Python function" --model grok-3

# With session for conversation continuity
swiftopenai agent "Remember my name is Alice" --session-id chat-123
swiftopenai agent "What's my name?" --session-id chat-123

# With MCP tools (filesystem example)
swiftopenai agent "Read the README.md file" \
  --mcp-servers filesystem \
  --allowed-tools "mcp__filesystem__*"

Usage Patterns

Pattern 1: Simple Provider Routing

User Request: "Use grok to explain quantum computing"

Execution:

# 1. Check CLI installation
scripts/check_install_cli.sh

# 2. Configure for Grok
scripts/configure_provider.sh grok grok-4-0709

# 3. Execute the task
swiftopenai agent "Explain quantum computing"

Pattern 2: Specific Model Selection

User Request: "Ask DeepSeek Reasoner to solve this math problem step by step"

Execution:

# 1. Check CLI installation
scripts/check_install_cli.sh

# 2. Configure for DeepSeek with Reasoner model
scripts/configure_provider.sh deepseek deepseek-reasoner

# 3. Execute with explicit model
swiftopenai agent "Solve x^2 + 5x + 6 = 0 step by step" --model deepseek-reasoner

Pattern 3: Fast Inference with Groq

User Request: "Use groq to generate code quickly"

Execution:

# 1. Check CLI installation
scripts/check_install_cli.sh

# 2. Configure for Groq (known for fast inference)
scripts/configure_provider.sh groq llama-3.3-70b-versatile

# 3. Execute the task
swiftopenai agent "Write a function to calculate fibonacci numbers"

Pattern 4: Access Multiple Models via OpenRouter

User Request: "Use OpenRouter to access Claude"

Execution:

# 1. Check CLI installation
scripts/check_install_cli.sh

# 2. Configure for OpenRouter
scripts/configure_provider.sh openrouter anthropic/claude-3.5-sonnet

# 3. Execute with Claude via OpenRouter
swiftopenai agent "Explain the benefits of functional programming"

Provider-Specific Considerations

OpenAI (GPT-5 Models)

GPT-5 models support advanced parameters:

# Minimal reasoning for fast coding tasks
swiftopenai agent "Write a sort function" \
  --model gpt-5 \
  --reasoning minimal \
  --verbose low

# High reasoning for complex problems
swiftopenai agent "Explain quantum mechanics" \
  --model gpt-5 \
  --reasoning high \
  --verbose high

Verbosity levels: low, medium, high Reasoning effort: minimal, low, medium, high

Grok (xAI)

Grok models are optimized for real-time information and coding:

  • grok-4-0709 - Latest with enhanced reasoning
  • grok-3 - General purpose
  • grok-code-fast-1 - Optimized for code generation

Groq

Known for ultra-fast inference with open-source models:

  • llama-3.3-70b-versatile - Best general purpose
  • mixtral-8x7b-32768 - Mixture of experts

DeepSeek

Specialized in reasoning and coding:

  • deepseek-reasoner - Advanced step-by-step reasoning
  • deepseek-coder - Coding specialist
  • deepseek-chat - General chat

OpenRouter

Provides access to 300+ models:

  • Anthropic Claude models
  • OpenAI models
  • Google Gemini models
  • Meta Llama models
  • And many more

API Key Management

Recommended: Use Environment Variables for Multiple Providers

The best practice for using multiple providers is to set all API keys as environment variables. This allows seamless switching between providers without reconfiguring keys.

Add to your shell profile (~/.zshrc or ~/.bashrc):

# API Keys for LLM Providers
export OPENAI_API_KEY=sk-...
export XAI_API_KEY=xai-...
export GROQ_API_KEY=gsk_...
export DEEPSEEK_API_KEY=sk-...
export OPENROUTER_API_KEY=sk-or-v1-...

After adding these, reload your shell:

source ~/.zshrc  # or source ~/.bashrc

How it works:

  • SwiftOpenAI-CLI automatically uses the correct provider-specific key based on the configured provider
  • When you switch to Grok, it uses XAI_API_KEY
  • When you switch to OpenAI, it uses OPENAI_API_KEY
  • No need to reconfigure keys each time

Alternative: Single API Key via Config (Not Recommended for Multiple Providers)

If you only use one provider, you can store the key in the config file:

swiftopenai config set api-key <your-key>

Limitation: The config file only stores ONE api-key. If you switch providers, you'd need to reconfigure the key each time.

Checking Current API Key

# View current configuration (API key is masked)
swiftopenai config list

# Get specific API key setting
swiftopenai config get api-key

Priority: Provider-specific environment variables take precedence over config file settings.

Advanced Features

Interactive Configuration

For complex setups, use the interactive wizard:

swiftopenai config setup

This launches a guided setup that walks through:

  • Provider selection
  • API key entry
  • Model selection
  • Debug mode configuration
  • Base URL setup (if needed)

Session Management

Maintain conversation context across multiple requests:

# Start a session
swiftopenai agent "My project is a React app" --session-id project-123

# Continue the session
swiftopenai agent "What framework did I mention?" --session-id project-123

MCP Tool Integration

Connect to external services via Model Context Protocol:

# With GitHub MCP
swiftopenai agent "List my repos" \
  --mcp-servers github \
  --allowed-tools "mcp__github__*"

# With filesystem MCP
swiftopenai agent "Read package.json and explain dependencies" \
  --mcp-servers filesystem \
  --allowed-tools "mcp__filesystem__*"

# Multiple MCP servers
swiftopenai agent "Complex task" \
  --mcp-servers github,filesystem,postgres \
  --allowed-tools "mcp__*"

Output Formats

Control how results are presented:

# Plain text (default)
swiftopenai agent "Calculate 5 + 3" --output-format plain

# Structured JSON
swiftopenai agent "List 3 colors" --output-format json

# Streaming JSON events (Claude SDK style)
swiftopenai agent "Analyze data" --output-format stream-json

Troubleshooting

Common Issues

Issue: "swiftopenai: command not found"

Solution: Run the check_install_cli.sh script, which will install the CLI automatically.

Issue: Authentication errors

Solution: Verify the correct API key is set for the provider:

# Check current config
swiftopenai config list

# Set the appropriate API key
swiftopenai config set api-key <your-key>

# Or use environment variable
export XAI_API_KEY=xai-...  # for Grok

Issue: Model not available

Solution: Verify the model name matches the provider's available models. Check references/providers.md for correct model names or run:

swiftopenai models

Issue: Rate limiting or quota errors

Solution: These are provider-specific limits. Consider:

  • Using a different model tier
  • Switching to a different provider temporarily
  • Checking your API usage dashboard

Debug Mode

Enable debug mode to see detailed HTTP information:

swiftopenai config set debug true

This shows:

  • HTTP status codes and headers
  • API request details
  • Response metadata

Resources

This skill includes bundled resources to support LLM routing:

scripts/

  • check_install_cli.sh - Ensures SwiftOpenAI-CLI is installed and up-to-date
  • configure_provider.sh - Configures the CLI for a specific provider

references/

  • providers.md - Comprehensive reference on all supported providers, models, configurations, and capabilities

Best Practices

  1. Always check installation first - Run check_install_cli.sh before routing requests
  2. Configure provider explicitly - Use configure_provider.sh to ensure correct setup
  3. Verify API keys - Check that the appropriate API key is set for the target provider
  4. Choose the right model - Match the model to the task (coding, reasoning, general chat)
  5. Use sessions for continuity - Leverage --session-id for multi-turn conversations
  6. Enable debug mode for troubleshooting - When issues arise, debug mode provides valuable insights
  7. Reference provider documentation - Consult references/providers.md for detailed provider information

Examples

Example 1: Routing to Grok for Real-Time Information

# User: "Use grok to tell me about recent AI developments"

scripts/check_install_cli.sh
scripts/configure_provider.sh grok grok-4-0709
swiftopenai agent "Tell me about recent AI developments"

Example 2: Using DeepSeek for Step-by-Step Reasoning

# User: "Ask deepseek to explain how to solve this algorithm problem"

scripts/check_install_cli.sh
scripts/configure_provider.sh deepseek deepseek-reasoner
swiftopenai agent "Explain step by step how to implement quicksort"

Example 3: Fast Code Generation with Groq

# User: "Use groq to quickly generate a REST API"

scripts/check_install_cli.sh
scripts/configure_provider.sh groq llama-3.3-70b-versatile
swiftopenai agent "Generate a REST API with authentication in Python"

Example 4: Accessing Claude via OpenRouter

# User: "Use openrouter to access claude and write documentation"

scripts/check_install_cli.sh
scripts/configure_provider.sh openrouter anthropic/claude-3.5-sonnet
swiftopenai agent "Write comprehensive documentation for a todo app API"

Example 5: GPT-5 with Custom Parameters

# User: "Use gpt-5 with high reasoning to solve this complex problem"

scripts/check_install_cli.sh
scripts/configure_provider.sh openai gpt-5
swiftopenai agent "Design a distributed caching system" \
  --model gpt-5 \
  --reasoning high \
  --verbose high

适合场景

01

调用多模型

02

代码和文本生成

03

Agent 推理流程

04

OpenRouter 模型接入

能力概览

能力 1

统一调用多种 LLM

能力 2

支持 Claude、Gemini、Kimi 等模型

能力 3

适合聊天、代码和推理任务

能力 4

可作为 Agent 模型调用入口

平台分布

Claude Code

29.29%
按下载量换算217

OpenCode

23.74%
按下载量换算176

windsurf

15.33%
按下载量换算114

Antigravity

10.45%
按下载量换算78

Cursor

6.85%
按下载量换算51

Gemini CLI

3.11%
按下载量换算23

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills