Use your Claude Code Max and GitHub Copilot Pro subscriptions together — never run out of tokens.
This installs three things:
copilot-ask— call any GitHub Copilot model (Claude Opus 4.6, GPT-5.4, Grok, …) from the shell. Claude Code can invoke it mid-task as a delegation tool: second opinions, cheap fan-out, fallback reasoning.claude-cop— a shell function that launches a full Claude Code session routed to Copilot's Claude API instead of Anthropic's. Use it when you hit an Anthropic rate limit; it burns Copilot quota instead.- Autonomy patches to
~/.claude/settings.json— auto-mode by default, copilot-* helpers allowlisted, proactive mode on.
You pay for both Claude Code Max and GitHub Copilot Pro. Claude Code talks to Anthropic by default and ignores Copilot's model pool entirely. This bridge lets one session reach across both.
- Main session: Claude Code with your Anthropic quota
- Mid-task consults:
copilot-ask -m gpt-5.4 "second opinion on X"— free-to-you, distinct reasoning - Rate-limited:
claude-cop— same Claude Code UX, Copilot quota
- Linux or macOS
bashorzshghauthenticated (gh auth login)jq,curl- Claude Code (install) — optional for
copilot-ask, required forclaude-cop - An active GitHub Copilot subscription (Pro, Pro+, or Business)
One-liner:
curl -fsSL https://raw.githubusercontent.com/koompi/claude-code-copilot/main/install.sh | bashOr clone and install:
git clone https://github.com/koompi/claude-code-copilot.git
cd claude-code-copilot
./scripts/install.shRe-running either is safe — the installer is idempotent and uses marker blocks in shell rc files for clean updates.
copilot-ask -m claude-sonnet-4.6 "say ok"
copilot-models
exec $SHELL && type claude-copInside a Claude Code session, the model will now autonomously reach for copilot-ask when it wants a second opinion — no permission prompt, the allowlist covers it.
copilot-ask -m claude-opus-4.6 "plan the migration from X to Y given: ..."
copilot-ask -m gpt-5.4 -f src/foo.rs "review this file for races"
git diff | copilot-ask -m gpt-5.3-codex "spot bugs in this diff"
cat error.log | copilot-ask -m claude-sonnet-4.6 "what's failing and why"Flags: -m MODEL · -f FILE · -s SYSTEM_PROMPT · -r (no default system) · -t N (max output tokens).
copilot-models # curated "best" set
copilot-models --all # every chat model exposed by the API
copilot-models --json # machine-readablecopilot-stats # summary + per-model counts
copilot-stats --tail 20 # last 20 calls
copilot-stats --raw # raw logclaude-cop # interactive Claude Sonnet 4.6 via Copilot
claude-cop -p "one-shot" # headless
claude-cop-opus # same thing, Claude Opus 4.6Verified working via copilot-ask:
| Model | Strength |
|---|---|
claude-opus-4.6 |
Deep reasoning, planning, architecture |
claude-sonnet-4.6 |
Balanced coding — default second-opinion |
gpt-5.4 |
OpenAI flagship — contrarian perspective |
gpt-5.4-mini |
Fast/cheap OpenAI — quick scans |
gpt-5.3-codex |
Coding specialist — refactor review |
gpt-5.2-codex |
Coding specialist backup |
grok-code-fast-1 |
xAI fast reviewer — distinct training corpus |
goldeneye-free-auto |
Free pool — use for throwaway delegation |
Gemini in Copilot isn't available on Pro plans as of this writing — it flickers into the model list but API calls return model_not_supported. If your org enables it, copilot-ask -m gemini-2.5-pro "..." will just start working, no script changes.
copilot-askhitsapi.githubcopilot.comdirectly with yourgh auth token, auto-routing between/chat/completionsand/responsesdepending on the model. Streams SSE. Logs every call to~/.claude/copilot-asks.log.claude-copexportsANTHROPIC_BASE_URL=https://api.githubcopilot.comand passes theghtoken asANTHROPIC_AUTH_TOKEN. Claude Code speaks to Copilot's Anthropic-compatible endpoint transparently.- Settings patches set
permissions.defaultMode: "auto", addBash(copilot-*)to the allowlist, and enableproactive.autoEnableso background work keeps moving without permission prompts. rules/copilot.mdis@included from~/.claude/CLAUDE.md, teaching Claude Code when to reach forcopilot-askvs direct tools.
~/.local/share/claude-code-copilot/scripts/uninstall.sh
# or if you cloned elsewhere:
./scripts/uninstall.shRemoves the binaries, rules file, shell functions (marker-block aware), and settings patches. Use --purge-log to also delete ~/.claude/copilot-asks.log.
- No secrets are baked into this repo. Tokens come from
gh auth tokenat runtime — each user authenticates with their own GitHub account. copilot-askprompts are sent to GitHub Copilot, which has its own data handling policy. Don't paste production credentials into prompts.- The installer only modifies files in your home directory. It does not touch
/etc, systemd, or any shared resource.
MIT — see LICENSE.
Issues and PRs welcome. If a new Copilot model shows up and copilot-ask doesn't route it correctly, the fix is usually one line in the endpoint case block in bin/copilot-ask.