Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/voidsteed/copilot-proxy-api/claude-mdgit clone --depth 1 https://github.com/voidsteed/copilot-proxy-apiWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.03899 | $0.03899 |
| Opus 5 | $0.01950 | $0.01950 |
| Sonnet 5 | $0.00780 | $0.00780 |
| Haiku 4.5 | $0.00390 | $0.00390 |
Grade A, and why
copilot-proxy-api CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 341 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
A reverse-engineered proxy for GitHub Copilot API that exposes it as an OpenAI and Anthropic compatible service. Allows using GitHub Copilot with tools that support OpenAI Chat Completions API (/v1/chat/completions), OpenAI Responses API (/v1/responses), or Anthropic Messages API (/v1/messages), including Claude Code and Codex CLI.
Common Commands
bun run dev # Development with hot reload
bun run start # Production
bun run build # Build for distribution (uses tsdown)
bun run typecheck # Type checking
bun run lint # Lint staged files
bun run lint:all # Lint all files
bun test # Run all tests
bun test tests/anthropic-request.test.ts # Run a specific test
Architecture
Entry Points & CLI Structure
src/main.ts- CLI entry point usingcittyfor subcommand structure- Subcommands:
start(server),auth(authentication),check-usage,debug src/start.ts- Main server startup logicsrc/server.ts- Hono HTTP server with route mounting
Request Flow
- OpenAI endpoints (
/v1/chat/completions,/v1/responses,/v1/models,/v1/embeddings) - pass through to Copilot API directly - Anthropic endpoints (
/v1/messages) - translate Anthropic format to OpenAI, call Copilot, translate response back
Route Structure
src/routes/
├── chat-completions/ # OpenAI compatible - direct passthrough
├── responses/ # OpenAI Responses API - passthrough to Copilot /responses
│ ├── handler.ts # Main request handler with streaming
│ ├── translation.ts # Responses <-> Chat Completions conversion (unused by the live path)
│ └── types.ts # Type definitions
├── messages/ # Anthropic compatible - requires translation
│ ├── handler.ts # Main request handler
│ ├── non-stream-translation.ts # Anthropic <-> OpenAI payload/response conversion
│ ├── stream-translation.ts # Streaming chunk translation
│ └── anthropic-types.ts # Type definitions
├── models/ # Model listing
├── embeddings/ # Embedding generation
├── usage/ # Copilot usage statistics
└── token/ # Token endpoint
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 341 lines · 3,899 tokens per session scan A 832922ac6fcc
copilot-proxy-api CLAUDE.md is an instructions file published in the GitHub repository voidsteed/copilot-proxy-api (45 stars, last pushed 23d ago), licensed MIT. It adds 3,899 tokens to every session, about $0.0195 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
apm tests.instructions.md
Test conventions: URL assertions must use urllib.parse, never substring.
apm cli.instructions.md
CLI Design Guidelines for visual output, styling, and user experience standards.
apm integrators.instructions.md
Architecture rules for file-level integrators (BaseIntegrator pattern).
apm copilot-instructions.md
Instructions for microsoft/apm, covering linting (canonical contract), ci-mirror commands, local workflow, common surprises and lifecycle binding.
apm architecture.instructions.md
Single canonical owner discipline: one authority per durable decision, guarded by a regression test + a static boundary check.
apm cicd.instructions.md
CI/CD Pipeline configuration for PyInstaller binary packaging and release workflow.