To Jev or not !
Claude Code skill that audits your codebase's LLM calls and finds which can move to TypeSafe's Jev decision model, with cost/latency ROI and ready-to-use code changes.
Documentation
Jev Migration Analyzer
A Claude Code skill that audits a codebase's LLM calls and identifies which ones can move to TypeSafe AI's Jev decision model, with cost and latency estimates and ready-to-use code changes.
Disclaimer
- This project is not affiliated with or endorsed by TypeSafe AI. Jev, Claude, OpenAI, Gemini and other product names belong to their respective owners.
- Jev is in early access and its API may change. Facts in this skill were checked against public sources as of November 2026; claims that could not be verified are listed under Known limitations.
- Every recommendation needs human review before it reaches production. See the LICENSE: the software is provided as is, without warranty.
What it does
When you ask Claude Code to audit a repository, the skill walks through six steps:
- Inventory: finds LLM calls (Anthropic, OpenAI, Google, AWS Bedrock, Azure, OpenRouter, LiteLLM, LangChain, Vercel AI SDK and more).
- Disqualify: screens out calls Jev should not handle, such as prose generation, multi-step reasoning, exact arithmetic, security boundaries and irreversible actions.
- Classify: sorts the remaining calls into tiers (direct replacement, confidence-gated cascade, or keep as is) and flags waste such as unused chain-of-thought fields or several calls on the same input.
- Trade-offs: lists the advantages and drawbacks for each call.
- ROI: looks up current token prices on the web and estimates monthly cost and latency savings.
- Code changes: produces before/after diffs plus a shadow-mode wrapper to compare Jev with your current model in production before switching.
The result is a report like this:
| Priority | File & Line | Current Model | Tier & Pattern | Jev Primitives |
|---|---|---|---|---|
| P1 | src/tickets.ts:42 | Claude Sonnet | Tier 1: direct replace + CoT removal | choice + noul |
| P2 | app/router.py:88 | GPT-4o via OpenRouter | Tier 2: confidence cascade | choice |
| Keep | src/writer.ts:15 | Claude Sonnet | Tier 3: generates prose | none |
What it doesn't do
- It never edits your code. It only suggests changes.
- It never calls Jev or any LLM API itself.
- It doesn't prove accuracy. Validate every migration on your own labelled data or with the included shadow-mode wrapper.
Install
Requirements: Claude Code and Python 3.10+. Web search in Claude Code is optional and is used for live token prices.
For all your projects:
git clone <repo-url> ~/.claude/skills/jev-migration-analyzer
For one project only: place the folder at <your-repo>/.claude/skills/jev-migration-analyzer/.
On Windows, ~ is C:\Users\<you>. Start a new Claude Code session after installing; skills load when a session starts.
Usage
In Claude Code, type /jev-migration-analyzer, or ask something like:
Audit this repo's LLM calls for Jev migration.
Running the scripts directly
Both scripts work on their own and print JSON. On Windows, use python or py -3 instead of python3.
Scanner: lists LLM call sites and anti-patterns:
python3 scripts/scan_llm_calls.py <path-to-repo>
ROI calculator: compares current cost and latency with Jev:
python3 scripts/roi_calculator.py --calls 100000 --in-tokens 1200 --out-tokens 150 \
--model claude-sonnet-4 --price-in 3.00 --price-out 15.00 --jev-price-in 0.042 --mode direct
| Option | Meaning | Default |
|---|---|---|
--calls | Monthly request volume | 100000 |
--in-tokens / --out-tokens | Average tokens per call | 1000 / 120 |
--model | Baseline model from the built-in table | claude-sonnet-4 |
--price-in / --price-out | Current baseline price, USD per 1M tokens | built-in table |
--jev-price-in | Current Jev input price, USD per 1M tokens | 0.042 |
--latency-ms | Measured baseline latency | built-in estimate |
--mode | direct (full replacement) or cascade (Jev first, fall back when unsure) | direct |
--offload-rate | Share of requests Jev resolves in cascade mode | 0.80 |
--compaction | Number of separate LLM calls merged into one Jev request | 1 |
The built-in price table is a fallback and may be out of date. The output always shows whether each price was supplied or came from the table.
Privacy and safety
- Scanner: reads local files only and makes no network calls.
- ROI calculator: makes no network calls.
- Price lookups: Claude searches the web using public model names only, never your code, repository names or data.
- Shadow-mode wrappers: log a hash of each input by default. Logging raw input for disagreements is opt-in; redact personal data before turning it on.
Known limitations
- Scanner: line-based pattern matching rather than full parsing. Calls routed through your own wrapper function are reported once at the wrapper. Covers Python and JavaScript/TypeScript only, and doesn't detect raw HTTP calls.
- Routing: code changes target TypeSafe's native SDK. Routing Jev through OpenRouter or the Vercel AI SDK isn't covered yet.
- Alternatives: the skill doesn't suggest cheaper options outside Jev, such as smaller models, prompt caching or batch APIs.
- Prices: list prices exclude caching, batch and negotiated discounts. Your own billing data is more accurate.
- Unverified Jev claims: these couldn't be confirmed in public sources and should be checked against TypeSafe's documentation:
- the term "RLCD-calibrated"
- the
TypeSafe-Danger-Zone-Imagesheader - the
jev-1.14.0version string boxas a direct-replacement primitive (documented as experimental)- the 40x–200x latency figure
- how
scorevalues are numbered
Folder layout
jev-migration-analyzer/
├── SKILL.md # Instructions Claude follows
├── scripts/
│ ├── scan_llm_calls.py # Finds LLM call sites
│ └── roi_calculator.py # Cost and latency estimates
├── references/
│ ├── jev_primitives_guide.md # Jev API and question types
│ ├── refactoring_patterns.md # Before/after code examples
│ └── shadow_mode_wrappers.md # Production comparison wrappers
├── assets/
│ └── audit_report_template.md # Report format
└── LICENSE
Contributing
Pull requests are welcome. The most useful ones correct Jev facts as the API changes: please include a link to the source.
License
MIT, see LICENSE.