agentsclimarketplace

Copilot model routing

Skill tinh2/skills-hub-registry/integration/copilot-model-routing

Intelligent task-to-model routing for GitHub Copilot's multi-lab model picker (2026). Audits your workflow, assigns the right model (OpenAI / Anthropic / Google / Microsoft / Moonshot) to each task type, configures VS Code settings, and writes a routing matrix your team can commit. Covers Kimi K2.7 Code, Claude Sonnet 5, GPT-5.6 tiers, Gemini 2.5, and Phi-4. Includes cost-per-accepted-change pilot framework and admin policy checklist for Business/Enterprise plans.From its SKILL.md

Install
npx -y skills add tinh2/skills-hub-registry --skill copilot-model-routing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

9.6 KB, ~2.1k tokens by cl100k_base, as published. Nobody here has run it

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 available in Copilot's model picker as of July 2026:

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 (Anthropic — $2/$10 per Mtok intro pricing through Aug 31) Best for: complex multi-step agentic tasks, long-context reasoning, PR review, spec writing, architecture decisions. Strong at following detailed instructions.

Claude Opus 4.8 (Anthropic — highest-tier) Best for: security audits, migration planning, highest-stakes production code. Reserve for tasks where errors are expensive and irreversible.

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

GPT-5.6 Terra / GPT-5.5 (OpenAI — mid tier) Best for: general-purpose coding, balanced cost/capability.

GPT-5.4 mini / GPT-5.6 Luna (OpenAI — low tier) Best for: completions, autocomplete suggestions, high-frequency low-stakes tasks.

Gemini 2.5 Pro (Google — 2M context) Best for: whole-codebase analysis, large refactors that need to hold hundreds of files in context simultaneously.

Gemini 2.5 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   | Better instruction-following
PR review              | medium | medium | Claude Sonnet 5   | Long-context, nuanced output
Architecture decisions | low    | high   | Claude Opus 4.8   | Highest capability
Auth / payment logic   | low    | high   | Claude Opus 4.8   | No cost-cutting on security
Large refactors (>50f) | low    | medium | Gemini 2.5 Pro    | 2M 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

// .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 6: COMMIT AND COMMUNICATE

Stage and commit the config files:

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

============================================================ 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.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most context ai engineering skills give in ~2.1k tokens

Counted across 1,193 of the 1,976 authors here whose files we hold, read 2026-08-07

  • Dispatch a fresh implementer subagent per taskin 48 of 1193, across 19 files
  • Dispatch a final code reviewer after all tasksin 33 of 1193, across 8 files
  • Provide full task text to the subagentin 30 of 1193, across 9 files
  • Review spec compliance before code qualityin 27 of 1193, across 10 files
  • Make the hook script executablein 26 of 1193, across 8 files
  • Re-snapshot after navigation or DOM changesin 25 of 1193, across 19 files
  • Read files before editing themin 22 of 1193, across 11 files
  • Answer subagent questions before proceedingin 22 of 1193, across 7 files
  • Mark task complete in TodoWrite after approvalin 22 of 1193, across 6 files
  • Merge hook into existing settingsin 21 of 1193, across 3 files
  • Ask if installation is global or projectin 20 of 1193, across 2 files
  • Copy the hook script to target locationin 20 of 1193, across 2 files

Said here and by no other author read

  • identify recurring task types in the codebase
  • rate tasks by volume and stakes
  • assign appropriate models based on routing rules
  • produce a routing matrix table
  • write workspace settings configuring default models
  • write a team routing guide document

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,452. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.