Running Claude Code Via Litellm Copilot
技能 已验证 活跃当通过本地 LiteLLM 代理将 Claude Code 路由到 GitHub Copilot 时使用,以减少直接的 Anthropic 支出,配置 ANTHROPIC_BASE_URL 或 ANTHROPIC_MODEL 覆盖,或对 Copilot 代理设置失败进行故障排除,例如 model-not-found、无 localhost 流量或 GitHub 401/403 身份验证错误。
通过将 Claude Code 流量通过本地 LiteLLM 代理路由到 GitHub Copilot 来减少直接的 Anthropic API 支出,同时提供清晰的设置和故障排除指南。
功能
- 通过 LiteLLM 将 Claude Code 流量路由到 GitHub Copilot
- 减少直接的 Anthropic API 成本
- 配置 LiteLLM `config.yaml` 以用于 GitHub Copilot
- 设置 `ANTHROPIC_BASE_URL` 和 `ANTHROPIC_MODEL` 覆盖
- 对 model-not-found 和 GitHub 身份验证错误进行故障排除
使用场景
- 当目标是降低使用 Claude Code 时的直接 Anthropic API 支出时。
- 当设置本地代理以将 Claude Code 请求路由到 GitHub Copilot 时。
- 当对 model-not-found、无 localhost 流量或 GitHub 401/403 错误进行故障排除时。
- 当需要为此特定工作流程配置 LiteLLM 提供程序路由和环境变量时。
非目标
- 决定此解决方案是否符合 GitHub 服务条款。
- 与 Claude Code 和 GitHub Copilot 集成无关的一般 LiteLLM 架构。
- 在没有 LiteLLM 或 GitHub Copilot 组件的情况下直接设置 Anthropic API。
安装
npx skills add xixu-me/skills通过 npx 运行 Vercel skills CLI(skills.sh)— 需要本地安装 Node.js,以及至少一个兼容 skills 的智能体(Claude Code、Cursor、Codex 等)。前提是仓库遵循 agentskills.io 格式。
质量评分
已验证类似扩展
Rule Effectiveness Analysis
100Analyze which rules are actively used vs inert. Detect coverage gaps. Recommend pruning to reduce token consumption.
Bootstrap Project
100Initializes the Claude Code configuration in a new or existing project using the dotforge template.
Validate Plugin
100Validate a Claude Code plugin structure, frontmatter, and MCP tool references
Guard
100保护 Claude Code 会话免受上下文溢出影响,通过运行一个后台守护进程来监控会话大小并在压缩命中之前自动进行修剪。当用户说“guard”、“protect session”、“context getting long”、“prevent compaction”、“session management”或正在运行需要持续上下文保护的代理团队时使用。
Create Command
100Interactive assistant for creating new Claude commands with proper structure, patterns, and MCP tool integration
Plugin Authoring
100用于在创建、修改或调试 Claude Code 插件时使用。当遇到 .claude-plugin/、plugin.json、marketplace.json、commands/、agents/、skills/ 或 hooks/ 目录时触发。提供模式、模板、验证工作流和故障排除。