Note
This is an unofficial, community skill. It is not made, reviewed, or endorsed by TypeSafe AI, Cloudflare, Perplexity, OpenAI, Microsoft, Databricks, AWS, Ollama, or any other provider it covers. See How this relates to the official TypeSafe skill.
Coding agents treat decision models like one more chat model. This skill teaches them to design for them: typed questions, calibrated confidence, the differences between providers, and links to 450+ community projects, sorted by how they work, with a code sketch for each pattern. It installs in Claude Code, Claude Desktop and claude.ai, Codex, Antigravity CLI, Cursor, Devin CLI, Factory Droid, Gemini CLI, GitHub Copilot CLI, Grok Build CLI, Hermes Agent, Kimi Code, OpenCode, Pi, Qwen Code, Muse, and Muse Code.
A decision model, also called a System One model, does not write text. You send it content and a set of typed questions, and it answers each one with a value and a probability, usually in a few hundred milliseconds or less:
- Choice picks one option from a list. Example: route a ticket to billing, shipping, or support.
- Score places the content on a scale you describe. Example: grade a pull request from "ignores the spec" to "meets the spec".
- Noul gives the probability that a yes/no statement is true. Example: "this shell command deletes files outside the project."
TypeSafe's Jev started the category on 2026-09-15. Within three weeks, others shipped models that use the same three question types:
| Kind | Models | How you call it |
|---|---|---|
| Hosted | TypeSafe Jev, Cloudflare Clef and Clef-flash, Perplexity pplx-decider, OpenAI Decisions API (gpt-6-luna), Microsoft-Decision-1 on Microsoft Foundry, System1 Models, Strom | HTTP API, each with its own key |
| In your data warehouse | Databricks ai_decide() | SQL function or REST |
| On your machine | Nimble and Tev1 through Ollama, Kev, Laya, Strands Decider, CLM-8B | Local server, no key |
| Through one gateway | OpenRouter, Vercel AI Gateway, LLM Gateway, Pydantic AI | One key or one client for several models |
They share ideas, not always a wire format, and not their accuracy. The skill gives the agent the shared rules, a reference file per provider, and the field evidence on which model did well at what.
Install
Claude Code
claude plugin marketplace add aaddrick/building-with-decision-models
claude plugin install building-with-decision-models@building-with-decision-models
The skill loads on its own when you work on decision-model code. To load it by hand, type:
/building-with-decision-models:building-with-decision-models
Claude Desktop, Cowork, and claude.ai
Step 1. Open Customize > Plugins, select Add, then Add marketplace.
Step 2. Choose Add from a repository.
Step 3. Enter aaddrick/building-with-decision-models or the full GitHub URL, then select Sync. If the dialog shows Sync automatically, leave it on so the plugin updates when this repository does.
Step 4. Select Add next to Building with decision models.
Step 5. The button changes to Added, and the listing shows the version. The plugin also appears in the desktop app and Cowork on the same account.
Codex CLI and Codex app
Add the marketplace and install the plugin:
codex plugin marketplace add aaddrick/building-with-decision-models
codex plugin add building-with-decision-models@building-with-decision-models
Check that it installed:
codex plugin list
The Codex app reads the same Codex config, so the plugin shows up there too. Open Plugins in the sidebar to see it.
Start a new thread. Codex loads the skill when the task matches. To load it by hand, type:
$building-with-decision-models:building-with-decision-models
Antigravity CLI
agy plugin install https://github.com/aaddrick/building-with-decision-models
Check that it installed:
agy plugin list
Start a new session. Antigravity CLI loads the skill when the task matches. To load it by hand, type:
/building-with-decision-models:building-with-decision-models
Coming from Gemini CLI? If agy plugin import gemini brought this extension over, run the install command above anyway so the current copy replaces the imported one.
Cursor
In Cursor Agent chat, type:
/add-plugin https://github.com/aaddrick/building-with-decision-models
Or open Customize, import a plugin From GitHub Repository, and enter https://github.com/aaddrick/building-with-decision-models. Then select Install next to Building with Decision Models and choose project or user scope.
A plugin added from a GitHub URL can get stuck on an old commit. For dependable updates, clone the repository into Cursor's local plugin folder instead:
git clone https://github.com/aaddrick/building-with-decision-models.git ~/.cursor/plugins/local/building-with-decision-models
Then run Developer: Reload Window. Clone into that folder, don't symlink to it: Cursor skips symlinks that point outside it. To update, run git pull there and reload again.
Check that it installed: open Customize, then Skills. building-with-decision-models appears under Agent Decides.
Cursor loads the skill when the task matches. To load it by hand, type:
/building-with-decision-models
Devin CLI
Devin needs a signed-in account to manage plugins. If you are not signed in yet, run devin auth login first.
devin plugins install aaddrick/building-with-decision-models
Check that it installed:
devin plugins info building-with-decision-models
Start a new session. Devin loads the skill when the task matches. To load it by hand, type:
/building-with-decision-models:building-with-decision-models
To update it later:
devin plugins update building-with-decision-models
Factory Droid
droid plugin marketplace add https://github.com/aaddrick/building-with-decision-models
droid plugin install building-with-decision-models@building-with-decision-models
Check that it installed:
droid plugin list
In a Droid session, run /skills and open the Plugins tab to see the skill. Droid loads it when the task matches. To load it by hand, type /building-with-decision-models at the start of a prompt.
To update it later:
droid plugin marketplace update building-with-decision-models
droid plugin update building-with-decision-models@building-with-decision-models
Gemini CLI
gemini extensions install https://github.com/aaddrick/building-with-decision-models
Check that it installed:
gemini extensions list
The output lists building-with-decision-models under Agent skills. Start a new session. Gemini CLI loads the skill when the task matches and asks you to approve it first. To load it by hand, ask Gemini to use the building-with-decision-models skill.
To update it later:
gemini extensions update building-with-decision-models
GitHub Copilot CLI
copilot plugin marketplace add aaddrick/building-with-decision-models
copilot plugin install building-with-decision-models@building-with-decision-models
Check that it installed:
copilot skill list
building-with-decision-models shows under "Plugin skills". Copilot loads it when the task matches. To load it by hand, ask Copilot to use the building-with-decision-models skill.
Grok Build CLI
grok plugin install aaddrick/building-with-decision-models --trust
Check that it installed:
grok inspect
building-with-decision-models appears under Skills. Start a new session. Grok loads the skill when the task matches. To load it by hand, type:
/building-with-decision-models
Hermes Agent
hermes skills install aaddrick/building-with-decision-models/skills/building-with-decision-models
Check that it installed:
hermes skills list
Start a new session. Hermes loads the skill when the task matches. To load it by hand, type:
/building-with-decision-models
You can install it as a plugin instead, with hermes plugins install aaddrick/building-with-decision-models --enable. A plugin skill does not load on its own, though: you have to ask Hermes to load the building-with-decision-models skill each time. The skills install route above does not have that limit.
Kimi Code
Inside Kimi Code, type:
/plugins install https://github.com/aaddrick/building-with-decision-models
Start a new session so the skill loads:
/new
Check that it installed. The plugin shows as enabled with no errors:
/plugins info building-with-decision-models
Kimi loads the skill when the task matches. To load it by hand, type:
/skill:building-with-decision-models
OpenCode
OpenCode loads skills from ~/.config/opencode/skills/ on its own. Clone this repository and link the skill folder there:
git clone https://github.com/aaddrick/building-with-decision-models.git ~/.local/share/building-with-decision-models
mkdir -p ~/.config/opencode/skills
ln -s ~/.local/share/building-with-decision-models/skills/building-with-decision-models ~/.config/opencode/skills/building-with-decision-models
On Windows, copy the folder instead of linking it.
Check that it installed:
opencode debug skill | grep '"name": "building-with-decision-models"'
Restart OpenCode. It loads the skill when the task matches. To load it by hand, ask it to use the skill tool to load building-with-decision-models.
To update, run git -C ~/.local/share/building-with-decision-models pull.
Pi
pi install https://github.com/aaddrick/building-with-decision-models
Check that it installed:
pi list
Start a new session. Pi loads the skill when the task matches. To load it by hand, type:
/skill:building-with-decision-models
Qwen Code
qwen extensions install https://github.com/aaddrick/building-with-decision-models:building-with-decision-models
The :building-with-decision-models suffix picks the plugin. Leave it off and Qwen asks you to pick one.
Check that it installed:
qwen extensions list
building-with-decision-models appears under Skills:. Restart Qwen Code. It loads the skill when the task matches. To load it by hand, type:
/building-with-decision-models:building-with-decision-models
To update it later:
qwen extensions update building-with-decision-models
Muse (muse.ai)
Muse loads skills from ~/workspace/skills/ on its own computer. Paste this command into a Muse chat and ask Muse to run it:
curl -fsSL https://raw.githubusercontent.com/aaddrick/building-with-decision-models/main/scripts/install_muse.sh | bash
The script copies the skill folder there and rewrites the SKILL.md header into the shape Muse reads. Start a new chat. Muse loads the skill when the task matches. To update, run the command again.
Muse Code
Clone the repository:
git clone https://github.com/aaddrick/building-with-decision-models.git
Install the skill for every project:
muse skills install building-with-decision-models/skills/building-with-decision-models --scope user
Check that it installed:
muse skills list
Start a new session. Muse Code loads the skill when the task matches. To load it by hand, type:
/building-with-decision-models
To install it as a plugin instead, turn on Muse Code's experimental plugins first. Plugins are off by default in Muse Code 1.4.2.
export MUSE_EXPERIMENTAL_PLUGINS=1
muse plugins marketplace add building-with-decision-models aaddrick/building-with-decision-models
muse plugins install building-with-decision-models@building-with-decision-models
Any other agent that reads SKILL.md
Copy the skills/building-with-decision-models/ folder into your agent's skills folder. Keep the whole folder. SKILL.md links to the files beside it.
Connect a model (optional, recommended)
The skill works without any model connected. With one, the agent can check its design against a real endpoint before the code reaches your project. That catches wrong field names, and questions the model reads differently than you meant.
Local, free, no key (Ollama)
Install Ollama 0.35 or newer, then pull a decision model:
ollama pull nimble
Check that the agent can reach it:
curl -s http://localhost:11434/api/version
A local model checks the request shape for free. Its accuracy and calibration are not those of a hosted model, so the skill tells the agent not to copy thresholds between them.
Hosted: which key goes in which variable
| Provider | Variable | Get a key |
|---|---|---|
| TypeSafe Jev | TYPESAFE_API_KEY | console.typesafe.ai (steps below) |
| Cloudflare Clef | CLOUDFLARE_AUTH_TOKEN and CLOUDFLARE_ACCOUNT_ID | Cloudflare dashboard, Workers AI |
| Perplexity pplx-decider | PERPLEXITY_API_KEY | Perplexity API settings |
| OpenAI Decisions API | OPENAI_API_KEY | OpenAI platform |
| Microsoft-Decision-1 (Microsoft Foundry) | AZURE_API_KEY or an Entra token, plus AZURE_ENDPOINT and DEPLOYMENT_NAME | ai.azure.com, deployment details page |
| System1 Models | SYSTEM1_API_KEY | system1models.ai |
| Strom (Uprelic) | UPRELIC_API_KEY | platform.uprelic.com |
| OpenRouter | OPENROUTER_API_KEY | openrouter.ai |
| Vercel AI Gateway | AI_GATEWAY_API_KEY | Vercel dashboard |
| LLM Gateway | LLM_GATEWAY_API_KEY | llmgateway.io |
Databricks ai_decide | Your workspace credentials | Databricks workspace (a SQL warehouse needs no key in the agent's shell) |
Each provider file in skills/building-with-decision-models/providers/ names its variable and how to call it. Store the keys the way the next section shows.
Create, store, and troubleshoot a key
Example: create a TypeSafe key (four steps in the TypeSafe console)
Step 1. Sign in at console.typesafe.ai and open API Keys in the sidebar.
Step 2. Click Create key at the top right.
Step 3. Name the key after where it will live, such as the machine or the agent. Then click Create key.
Step 4. Copy the key now. The console shows it once. If you lose it, create a new one and revoke the old one.
Store the key (macOS, Linux, Windows)
Keep your keys in one file, readable only by you, with one export line per provider. The commands below use TYPESAFE_API_KEY as the example. For another provider, use its variable from the table above, and add a line to the same file instead of creating a new one. Agents often start shells without a terminal, so each section puts the keys where those shells can see them. Pick your system.
macOS (zsh, the default shell)
Save the key to a private file:
mkdir -p ~/.config/decision-models && umask 077 && printf 'export TYPESAFE_API_KEY=%s\n' 'YOUR_KEY' >> ~/.config/decision-models/env
Load it from ~/.zshenv. Every zsh reads that file, including shells that agents start without a terminal. ~/.zshrc is read only by interactive shells.
echo '[ -f ~/.config/decision-models/env ] && . ~/.config/decision-models/env' >> ~/.zshenv
Open a new terminal and check it. The command prints the length of the key, not the key:
echo ${#TYPESAFE_API_KEY}
Linux with bash (Ubuntu, Debian, Mint, Fedora, Arch)
Save the key to a private file:
mkdir -p ~/.config/decision-models && umask 077 && printf 'export TYPESAFE_API_KEY=%s\n' 'YOUR_KEY' >> ~/.config/decision-models/env
Load it from the top of ~/.bashrc. Ubuntu, Debian, Mint, and Arch start ~/.bashrc with a line that stops early when no terminal is attached. A line below that guard never runs for agent shells. The top of the file is safe on every distribution:
sed -i '1i [ -f ~/.config/decision-models/env ] \&\& . ~/.config/decision-models/env' ~/.bashrc
Open a new terminal and check it:
echo ${#TYPESAFE_API_KEY}
Linux with zsh
Follow the macOS steps. zsh reads ~/.zshenv the same way on Linux.
Linux with fish
fish reads every file in ~/.config/fish/conf.d/, with or without a terminal:
mkdir -p ~/.config/fish/conf.d; and echo 'set -gx TYPESAFE_API_KEY YOUR_KEY' >> ~/.config/fish/conf.d/decision-models.fish; and chmod 600 ~/.config/fish/conf.d/decision-models.fish
string length -- $TYPESAFE_API_KEY
Windows (PowerShell)
Store the key as a user environment variable. New terminals and apps see it. Terminals that are already open do not:
[Environment]::SetEnvironmentVariable('TYPESAFE_API_KEY', 'YOUR_KEY', 'User')
Open a new terminal and check it:
$env:TYPESAFE_API_KEY.Length
WSL: Windows variables do not reach WSL by default. Inside WSL, follow the Linux with bash steps.
Desktop apps and IDE extensions
An app you start from the dock, the start menu, or a desktop launcher does not read your shell files.
- Windows: the user environment variable above already covers these apps.
- Linux (systemd): add the line
TYPESAFE_API_KEY=YOUR_KEYto~/.config/environment.d/decision-models.conf, then log out and back in. - macOS: start the app from a terminal, or set the variable in the app's own settings. macOS has no simple per-user file that desktop apps read.
If the agent cannot see the key
Ask the agent to run echo ${#TYPESAFE_API_KEY} (or $env:TYPESAFE_API_KEY.Length on Windows), with your provider's variable in place of TYPESAFE_API_KEY. If it prints 0 or nothing, check these in order:
- You started the agent before you stored the key. Agent shells copy the environment of the program that started them. Quit the agent and start it from a new terminal.
- You started the agent from the dock, the start menu, or an IDE. Those apps do not read your shell files. See "Desktop apps and IDE extensions" above.
- Codex filters the environment. If
~/.codex/config.tomlsetsinclude_onlyunder[shell_environment_policy], add your variable to it. If it setsignore_default_excludes = false, Codex drops every variable withKEYorTOKENin its name. Remove that line. - WSL. Windows variables do not reach WSL. Store the key inside WSL with the Linux steps.
What is inside
The skill loads in layers, so the agent reads only what the task needs.
| File | What it holds | When the agent reads it |
|---|---|---|
SKILL.md | Which provider and primitive to pick, 11 design rules, how to use probabilities and confidence, how to change models safely, common mistakes | Every decision-model task |
providers/jev.md | The reference /v1/systemone contract: HTTP API, Python and JavaScript SDKs, limits, errors, environment variables | When it writes the code |
providers/*.md | 11 provider files (Clef, Perplexity, OpenAI, Microsoft Foundry, Databricks, Ollama and Kev, EU hosts, gateways, Pydantic AI, open-weight models): how each differs from Jev, with sources | When it targets that provider |
models/*.md | 9 model files (Clef, Nimble, Laya, Kev, CLM-8B, pplx-decider, GPT-6 Luna, Strands Decider, and the rest) plus an index: the limits people hit, calibration, where each model does well and fails, and notes per shape | When it runs on a model other than Jev |
patterns.md | The 4 official patterns and techniques from 18 cookbooks, with their thresholds | When it designs a workflow |
choosing-and-switching-models.md | How to compare models, re-fit thresholds, shadow, and switch, with the lessons from people who switched and the benchmarks that exist | When it picks, compares, or changes a model |
prior-art/INDEX.md | A map from "what I want to build" to a shape, plus one-line headlines of ideas that failed on any model | Before it designs something new |
prior-art/bad-fits.md | Every idea that failed on any model, with the evidence and links. Failures on one model are in its models/ file | When a design looks like a known bad fit |
prior-art/*.md | 12 shape files: a code sketch, field lessons that hold for any model, and two or three flagship projects, each tagged with its model | One or two per design |
prior-art/projects/*.md | The full linked project list for each shape, grouped by sub-type, each tagged with its model | When it needs more examples |
prior-art/more-indexes.md | Bigger outside catalogs of decision-model projects and benchmarks | When the library has no match |
The prior-art library
Most catalogs sort projects by industry. This library sorts them by implementation shape. A game bot, a drone, and a trading bot share one shape: a control loop. Sorted that way, the three share one code sketch and one set of field lessons. Every entry names the model it ran on, so a lesson learned on Laya is not mistaken for one learned on Jev. The 12 shapes:
- Control loops: games, drones, robots, markets.
- Select from candidates: browser and phone agents, tool calling without an LLM, extraction, routers.
- Gates: tool-call approval, "done" checks, CI, money, content.
- Stream filters: slop filters, moderation, email, logs, bulk labels.
- Ranking and matching: rerankers, entity matching, graph and taxonomy walks.
- Judges and evals: rubric judges, trace grading, code review as triage, benchmarks of the models themselves.
- Incremental and real-time: dubbing, voice, webcam, keystroke-driven interfaces.
- Agent context and memory: compaction, memory gates, stop and ask decisions, effort control.
- Pairing with an LLM: planner and actor, verify-then-escalate, model-tier routing, distillation.
- Answers as data: features for classical models, research instruments, analytics columns, benchmarks.
- Embedding in infrastructure: SQL functions, gateways, MCP servers, CI hooks, Home Assistant.
- Images and other non-text input: screenshot gates, image moderation, webcam loops, documents.
Two guides sit beside the library: patterns for the official patterns and cookbook thresholds, and choosing and switching models for benchmarks, compatibility, head-to-head results, and moving to a new provider without breaking thresholds.
The index also lists, one line each, the ideas that failed in the field on decision models in general: chess, final judgment on math or code, many labels when you already have training data, and calibration taken on trust. Failures on one model, such as zero-shot Laya or hosted Clef-flash in tight loops, are in that model's file in models/. A failed attempt saves the next builder from repeating it.
How this relates to the official TypeSafe skill
TypeSafe publishes its own skill at typesafe-ai/skills. It is one file of design guidance for Jev. For API details, it sends the agent to the live docs on every task. The two skills have different names and do not conflict, so you can install both.
This skill covers every decision model, not only Jev. It holds more inside the skill itself: exact API shapes and the differences between providers, cookbook thresholds, community failure modes, and the prior-art library. The agent can design without a network round trip and see what others built first.
Decision models change fast, and new ones arrive every week. The skill is a snapshot of the providers' docs and the community on 2026-10-06, and it tells the agent a provider's live docs win on any conflict. If a fact is wrong, please open an issue with a link to the source.
Credits
The facts about each API come from that provider's public documentation: TypeSafe AI's docs and cookbooks, Cloudflare, Perplexity, OpenAI, Databricks, Ollama, System1 Models, Uprelic, OpenRouter, Vercel, LLM Gateway, Pydantic, and the open-model READMEs. The prior art comes from the builders who published their projects, from the Hacker News community, and from these indexes: awesome-jev, awesome-jev-typesafe, JevDirectory, awesome-jev-use-cases, awesome-typesafe-jev, amplifying.ai, and BenchLM. Each shape file links to the original projects.
TypeSafe, Jev, and System One are names of TypeSafe AI. Clef and Workers AI belong to Cloudflare, pplx-decider to Perplexity, and every other model name to its maker. This project uses them only to say what the skill is for.
License
MIT. See LICENSE.