select-model
Skill0 starsChanged 13 days agoISCView on GitHub
Intelligently and deterministically select the optimal LLM model, provider, and reasoning/thinking level for an engineering task based on prompt text and optional code references. Use when dynamically sizing models for tasks, dispatching subagents, or configuring execution runners. Do NOT use for running model inferences, managing credentials, or benchmarking code.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- mathLab/PINAtheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- mathLab/PINA★ 8same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apex-performance-auditorSkill
- checkSkill
- context7-mcpSkill
- design-craftSkill
- framework-engine-stacksSkill
- guardrailsSkill
- hypermedia-engine-stacksSkill
- learning-curatorSkill
- okf-docsSkill
- pi-lens-ast-grepSkill
- pi-lens-lsp-navigationSkill
- pi-lens-write-ast-grep-ruleSkill
- pi-lens-write-tree-sitter-ruleSkill
- rust-systemsSkill
- scalabilitySkill
- skill-authoring-visionSkill
- systems-auditorSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 67
Target Specific Context: Do not pass the entire workspace root.
- Very specific: line 79
If TYPESAFE_API_KEY is present in the environment: invoke default jev strategy for high semantic accuracy.
- Very specific: line 80
If running offline, in CI, or without API keys: explicitly pass --strategy heuristic.
- Very specific: line 87
When using default jev without TYPESAFE_API_KEY, the tool fails fast with exit status 1.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
select-model — Dynamic Model & Reasoning Selector
A standalone, decoupled skill and CLI utility that inspects task prompts and contextual code references to select the most appropriate and cost-effective LLM model, provider, and thinking level.
Core Mental Model
select-model acts as a pure decision engine. It does not execute inferences or modify application code. Instead, it inspects task complexity against an authoritative model catalog and emits an unconditional structured JSON parameter envelope to standard output.
Task Prompt + Code References
│
▼
[ select-model CLI ]
├── Strategy: TypeSafe Jev SDK (default) | Heuristic Matrix
└── Catalog: references/models.json
│
▼
{ model, provider, thinking_level, confidence, reasoning }CLI Invocation & Options
The tool is authored in TypeScript and executed via bun:
bun scripts/select-model.ts \
--prompt "<prompt>" \
[--references <path...>] \
[--strategy <jev|heuristic>] \
[--catalog <path>]Options
-p, --prompt <string>(required): Task intent, description, or instructions to analyze.-r, --references <path...>(optional): One or more file or directory paths to include in evaluation context.-s, --strategy <strategy>(optional, default:jev):jev: Semantic classification via TypeSafe Jev SDK (@typesafe-ai/sdk). RequiresTYPESAFE_API_KEY.heuristic: Deterministic offline classifier scoring keyword taxonomy, prompt length, and AST/LOC metrics.
-c, --catalog <path>(optional): Path to custommodels.jsoncatalog (defaults to bundledreferences/models.json).-h, --help: Display usage and exit.
Downstream Piping Recipes
Standard output is exclusively formatted JSON, making it directly consumable by shell pipelines or downstream runner scripts:
# Capture selection
PARAMS=$(bun scripts/select-model.ts \
--strategy heuristic \
--prompt "Refactor user authentication service" \
--references ./src/auth.ts ./src/storage.ts)
MODEL=$(echo "$PARAMS" | jq -r .model)
PROVIDER=$(echo "$PARAMS" | jq -r .provider)
THINKING=$(echo "$PARAMS" | jq -r .thinking_level)
echo "Selected $MODEL ($PROVIDER) with thinking level: $THINKING"Reference Curation Guidelines
- Target Specific Context: Do not pass the entire workspace root. Pass specific files or cohesive component directories relevant to the task.
- Automatic Default-Deny Exclusions: The scanner automatically skips:
- Build & dependency artifacts:
.git,node_modules,dist,target,vendor,.turbo. - Lockfiles:
bun.lock,bun.lockb,package-lock.json,pnpm-lock.yaml,Cargo.lock. - Binaries, archives, and fonts (
.wasm,.png,.zip, etc.). - Secret files:
.env*,*.pem,*.key,id_rsa*,credentials.*.
- Build & dependency artifacts:
- Context Budgeting: Ingestion is capped at 50 files and 500KB total text (max 2,000 lines per file). Excess files trigger a non-fatal warning on stderr.
Sequential Workflow
- Intake: Gather task description and identify relevant source reference paths.
- Strategy Selection:
- If
TYPESAFE_API_KEYis present in the environment: invoke defaultjevstrategy for high semantic accuracy. - If running offline, in CI, or without API keys: explicitly pass
--strategy heuristic.
- If
- Execution: Run
bun scripts/select-model.ts .... - Validation: Emitted
thinking_levelis guaranteed to be clamped and supported by the selected model'slevelslist inmodels.json.
Gotchas & Failure Recovery
- Missing
TYPESAFE_API_KEY(Exit Code 1):- When using default
jevwithoutTYPESAFE_API_KEY, the tool fails fast with exit status 1. - Fix: Set
export TYPESAFE_API_KEY=...or invoke with--strategy heuristic.
- When using default
- Explicit Sensitive File Path:
- Passing
.envdirectly will not leak credentials; the scanner will log a security warning to stderr and completely omit the file content.
- Passing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

