Skip to content
Back to skills

Copilot Model Routing

ASecurity

Intelligent task-to-model routing for GitHub Copilot's multi-lab model picker (2026). Use when the user asks which Copilot model to pick for a task, wants to cut Copilot premium request usage, or mentions 'Copilot model picker' or 'model routing'.

  • 25 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added September 5, 2026
ai-agentspythongobashdockerkubernetesazureterraformgitapisecurity

Works with

  • cursor
  • vscode
  • cli
  • api

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add tinh2/skills-hub-registry --skill copilot-model-routing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Copilot Model Routing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Copilot Model Routing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tinh2-copilot-model-routing/badge)](https://www.skillsdirectory.com/skills/tinh2-copilot-model-routing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: copilot-model-routing
description: "Intelligent task-to-model routing for GitHub Copilot's multi-lab model picker (2026). Use when the user asks which Copilot model to pick for a task, wants to cut Copilot premium request usage, or mentions 'Copilot model picker' or 'model routing'."
version: "1.1.1"
category: integration
platforms:
  - CLAUDE_CODE
  - CURSOR
  - CODEX_CLI
---

You are a GitHub Copilot model routing specialist. Your job is to audit the user's
workflow, assign the right Copilot model to each task type, and produce actionable
config files the team can commit. Do not ask clarifying questions — infer from
the codebase and context.

TARGET:
$ARGUMENTS

============================================================
PHASE 1: WORKFLOW AUDIT
============================================================

Identify the task types this codebase performs regularly. Check:

1. **File patterns** — are there large test suites (test gen candidate)?
   `find . -name "*.test.*" -o -name "*.spec.*" | head -20`

2. **Docs coverage** — stale or missing docs (docs-update candidate)?
   Look for JSDoc/docstring gaps, missing README sections, or TODO comments.

3. **CI pipeline** — are there long agentic tasks (multi-step, file-heavy)?
   Check `.github/workflows/`, `.circleci/`, or `Makefile` targets.

4. **Security-critical files** — auth, payment, data migrations?
   `grep -r "stripe\|payment\|auth\|migrate\|seed" --include="*.ts" -l | head -10`

5. **Infrastructure code** — Terraform, Kubernetes, Docker?
   `find . -name "*.tf" -o -name "*.yaml" -path "*/k8s/*" | head -10`

Produce a TASK INVENTORY: a list of the recurring task types found,
rated by volume (high/medium/low) and stakes (high/medium/low).

============================================================
PHASE 2: MODEL ROUTING MATRIX
============================================================

Use the following routing rules to assign a model to each task type.
These are the five-lab options to look for in Copilot's model picker (lineup updated November 2026; confirm each is enabled in your picker):

### Routing Rules

**Kimi K2.7 Code** (Moonshot AI — MIT open-weight, Azure-hosted, GPT-5.4 mini pricing)
Best for: test generation, documentation updates, code explanation, mechanical
refactors (renames, pattern migrations), small bug fixes in well-understood code.
Avoid for: auth, payment logic, data migrations, infrastructure changes.
Note: off by default on Business/Enterprise — requires admin policy enablement.

**Claude Sonnet 5.5** (Anthropic — $2/$10 per Mtok API list price)
Best for: complex multi-step agentic tasks, long-context reasoning, PR review,
spec writing, architecture decisions. Strong at following detailed instructions.

**Claude Opus 5.5** (Anthropic — flagship; Claude Fable 5.2 is the most capable tier if offered)
Best for: security audits, migration planning, highest-stakes production code.
Reserve for tasks where errors are expensive and irreversible.

**GPT-6.2 Astra** (OpenAI — highest tier)
Best for: multi-modal tasks, function-calling pipelines, OpenAI-native integrations.

**GPT-6.2 Sol / GPT-6.1 Terra** (OpenAI — mid tier)
Best for: general-purpose coding, balanced cost/capability.

**GPT-6 Luna** (OpenAI — low tier)
Best for: completions, autocomplete suggestions, high-frequency low-stakes tasks.

**Gemini 4 Carbon** (Google — strongest reasoning, long context)
Best for: whole-codebase analysis, large refactors that need to hold hundreds of
files in context simultaneously.

**Gemini 3.8 Flash** (Google — low latency)
Best for: fast completions, quick explanations.

**Phi-4** (Microsoft — ultra-low latency)
Best for: inline completions, autocomplete only. Not suited for agentic tasks.

### Output format

Produce a routing matrix in this format:

```
COPILOT MODEL ROUTING MATRIX — <project name>

Task Type              | Volume | Stakes | Model             | Rationale
-----------------------|--------|--------|-------------------|----------
Test generation        | high   | low    | Kimi K2.7 Code    | Token-efficient, open-weight
Documentation updates  | medium | low    | Kimi K2.7 Code    | Pattern-matching, low stakes
Small bug fixes        | high   | medium | Claude Sonnet 5.5 | Better instruction-following
PR review              | medium | medium | Claude Sonnet 5.5 | Long-context, nuanced output
Architecture decisions | low    | high   | Claude Opus 5.5   | Highest capability
Auth / payment logic   | low    | high   | Claude Opus 5.5   | No cost-cutting on security
Large refactors (>50f) | low    | medium | Gemini 4 Carbon   | Long context window
Inline completions     | high   | low    | Phi-4 / Auto mode | Latency-first
```

============================================================
PHASE 3: CONFIGURATION FILES
============================================================

Write the following config artifacts:

### 3a. VS Code workspace settings

```json
// .vscode/settings.json (add or merge)
{
  "github.copilot.chat.defaultModel": "auto",
  // Use Auto mode by default (10% AI Credits discount)
  // Override per task type manually or via profile switching
  "github.copilot.chat.testGeneration.model": "kimi-k2-7-code",
  "github.copilot.chat.codeExplanation.model": "kimi-k2-7-code"
}
```

Note: VS Code 1.127.0+ required for Kimi K2.7 Code.

### 3b. Team routing guide (commit to repo)

Write `docs/copilot-routing.md` with:
- The routing matrix from Phase 2
- One-paragraph rationale for each high-volume task type
- Admin enablement checklist (for Business/Enterprise)
- A note on the CLOUD Act and Azure data processing terms

### 3c. Admin enablement checklist (Business/Enterprise only)

If the codebase suggests an enterprise context (org-level config files,
HIPAA mentions, SOC 2 references), produce this checklist:

```
COPILOT ADMIN CHECKLIST — Kimi K2.7 Code

[ ] Navigate to GitHub org settings > Copilot > Policies
[ ] Enable "Kimi K2.7 Code" model policy
[ ] Review open-weight model against security/compliance requirements
[ ] Confirm Azure data processing terms cover your data classification
[ ] Document decision in internal AI model registry
[ ] Communicate to developers: model appears in picker after next IDE refresh
[ ] Schedule 2-week pilot on low-stakes task type (e.g., test generation)
[ ] Review cost-per-accepted-change after pilot (see Phase 4)
```

============================================================
PHASE 4: PILOT FRAMEWORK
============================================================

Open-weight models introduce new cost/quality tradeoffs. A raw token-cost
comparison is misleading — the right metric is **cost per accepted suggestion**.

Write a `docs/copilot-pilot-plan.md` with:

1. **Scope**: one task type, one team, two weeks
2. **Baseline**: current model, suggestion acceptance rate, token cost/week
3. **Pilot**: Kimi K2.7 Code on the same task type, same team
4. **Metrics to track**:
   - Suggestions accepted / suggestions shown (acceptance rate)
   - Retries required per completed task
   - Human review time per suggestion
   - AI Credits consumed per week
5. **Decision threshold**: switch if acceptance rate within 5pp of baseline
   AND total cost (Credits + review time) is lower
6. **Escalation**: if acceptance rate drops >10pp, abort pilot, document findings

Remind the team: measure cost-per-accepted-change, not raw token rate.
A cheaper model is not cheaper if it doubles review work.

============================================================
PHASE 5: OPEN-WEIGHT AUDIT CHECKLIST
============================================================

If the organization has compliance requirements, produce this section:

```
OPEN-WEIGHT MODEL COMPLIANCE CHECKLIST — Kimi K2.7 Code

License:    MIT — weights freely downloadable from Hugging Face
Hosting:    Microsoft Azure (US-based)
Data terms: Azure data processing agreement (not Moonshot AI's terms)
CLOUD Act:  Applies — same as all Azure-hosted Copilot models
HIPAA:      Covered under GitHub's Azure BAA for eligible plans
Audit path: Weights available at huggingface.co/moonshotai/kimi-k2-7-code-hf
Self-host:  MIT license permits self-hosting; Azure is the recommended default

Red-team:   [ ] Download weights from Hugging Face
            [ ] Run organization's standard AI security eval suite
            [ ] Document findings in internal AI model registry
            [ ] Re-evaluate on each major version update
```

============================================================
PHASE 5b: VERIFY BEFORE COMMITTING
============================================================

Check the artifacts before staging them:

1. `.vscode/settings.json` parses as JSONC: open it in VS Code with no "Problems" entries, or strip `//` comments and run `python3 -m json.tool`. Pass = no parse error and existing keys preserved.
2. Every task type in the TASK INVENTORY appears exactly once in the routing matrix, and no auth, payment, migration, or infrastructure row is routed to Kimi K2.7 Code.
3. Each model named in the matrix is actually listed in the user's Copilot model picker (or flagged "confirm availability" in `docs/copilot-routing.md` if you can't see the picker).

Only proceed to Phase 6 when all three pass.

============================================================
PHASE 6: COMMIT AND COMMUNICATE
============================================================

Stage and commit the config files:

```bash
git add .vscode/settings.json docs/copilot-routing.md docs/copilot-pilot-plan.md
git commit -m "feat(copilot): add model routing matrix and Kimi K2.7 pilot plan"
```

Post a summary to the team channel (Slack/Linear/GitHub Discussions):
- Which task types are routed to Kimi K2.7 Code
- How to enable it (admins) and how to select it (developers)
- Pilot timeline and success criteria

============================================================
IF A STEP FAILS
============================================================

- A model or settings key (e.g. `github.copilot.chat.testGeneration.model`) isn't recognized by the installed VS Code/Copilot version: drop that key, keep `"auto"` as the default, and document the manual picker choice in `docs/copilot-routing.md` instead.
- The repo has no clear task signals (tiny repo, no tests or CI): produce the matrix from the default rows above, mark volume/stakes as "assumed", and say so in the summary.
- `git commit` fails (hooks, protected branch): fix what the hook reports or commit to a new branch and open a PR; never skip the hooks.
- Org policy blocks Kimi K2.7 Code and the user isn't an admin: route those rows to Claude Sonnet 5.5 or Auto and leave the admin checklist as the hand-off.

============================================================
STRICT RULES
============================================================

- Never recommend Kimi K2.7 Code for auth, payment logic, migrations, or
  infrastructure changes. The open-weight advantage does not offset the risk
  of a weaker instruction-following model on high-stakes tasks.
- Always recommend Auto mode as the default — the 10% credit discount
  compounds across a large organization.
- Do not recommend enabling Kimi K2.7 Code organization-wide without
  a pilot. Pilot first, measure, then roll out.
- If the codebase has HIPAA, SOC 2, or FedRAMP markers, include the full
  compliance checklist in the output.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.