agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when choosing which LLM to use for a task. Covers matching capability to task, cost and latency trade-offs, routing between models, benchmark skepticism, and evaluating on your own data. Trigger on "which model should i use for this", "is the new model worth switching to",
Claude Code
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill model-selection --agent claude-code
Codex
$ npx skills add nimadorostkar/Claude-Skills-collection --skill model-selection -a codex -y
Cursor
$ npx skills add nimadorostkar/Claude-Skills-collection --skill model-selection -a cursor -y
Gemini CLI
$ npx skills add nimadorostkar/Claude-Skills-collection --skill model-selection -a gemini-cli -y
GitHub Copilot
$ npx skills add nimadorostkar/Claude-Skills-collection --skill model-selection -a github-copilot -y
OpenCode
$ npx skills add nimadorostkar/Claude-Skills-collection --skill model-selection -a opencode -y
Windsurf
$ npx skills add nimadorostkar/Claude-Skills-collection --skill model-selection -a windsurf -y
name: model-selection description: Use when choosing which LLM to use for a task. Covers matching capability to task, cost and latency trade-offs, routing between models, benchmark skepticism, and evaluating on your own data. Trigger on "which model should i use for this", "is the new model worth switching to", "route easy requests to a cheaper model". Do not use for building the evaluation set itself — see the llm-evaluation skill; for cutting token spend, see the llm-cost-optimization skill. metadata: category: ai version: 1.0.0 tags: [models, selection, cost, latency, routing]
Choose the model that meets the task's requirements at the lowest cost and latency. Most production LLM features run on a model several times more expensive than the task requires, because nobody measured the cheaper one.
1. **Start with the cheapest plausible model** — Not the best one. Measure it on your evaluation set. Escalate only if it fails, and only as far as necessary. 2. **Measure on your data, not on benchmarks** — A model that leads on MMLU may be worse at your specific extraction task. Public benchmarks measure general capability, and your task is not general. 3. **Model the cost at real volume** — A per-call cost difference that looks trivial becomes the dominant line item at a million calls a month. Do the arithmetic before choosing. 4. **Consider routing** — Send everything to a small model; escalate the cases it flags as low-confidence to a larger one. This frequently captures most of the accuracy at a fraction of the cost. 5. **Re-evaluate on model updates** — Provider models change under the same name. A prompt tuned six months ago on a model that has since been updated may no longer be optimal.
**Measuring rather than assuming:**
Task: extract structured fields from support emails. 800,000/month. Model Accuracy p95 latency Cost/1k calls Monthly cost ----------- -------- ----------- ------------- ------------ Small 91.2% 340ms $0.42 $336 Medium 96.8% 890ms $3.10 $2,480 Large 97.4% 2,100ms $15.00 $12,000 The large model buys 0.6 accuracy points over the medium for 5x the cost and 2.4x the latency. It is not a serious candidate. The real question is whether 91.2% is sufficient. It is not — the failures concentrate on emails with attachments and multi-issue threads. Routing solution: - Small model handles everything, and returns a confidence score. - The 14% of cases below the confidence threshold escalate to medium. Effective accuracy: 96.5% (within 0.3 points of medium-for-everything) Monthly cost: $336 + (0.14 x $2,480) = $683 p95 latency: 410ms (most requests never touch the medium model) Chosen: routing. 96.5% accuracy at $683/month, versus 96.8% at $2,480.
**Routing implemented:**
async def extract(email: str) -> Extraction:
result = await small_model.extract(email)
# Escalate on the model's own uncertainty, or on a structural signal
# that we know correlates with failure.
needs_escalation = (
result.confidence < 0.75
or email_has_attachment(email)
or count_distinct_issues(email) > 1
)
if needs_escalation:
metrics.increment("extraction.escalated")
return await medium_model.extract(email)
return resultA curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory,…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling,…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.