To Jev or not !

Skill Claude Code kiểm tra các lệnh gọi LLM trong codebase của bạn và xác định những lệnh có thể chuyển sang mô hình quyết định Jev của TypeSafe, kèm theo ROI về chi phí/độ trễ và các thay đổi mã sẵn sàng sử dụng.

GitHubDùng thử MCP nàyĐược tài trợ

Tài liệu

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:

  1. Inventory: finds LLM calls (Anthropic, OpenAI, Google, AWS Bedrock, Azure, OpenRouter, LiteLLM, LangChain, Vercel AI SDK and more).
  2. Disqualify: screens out calls Jev should not handle, such as prose generation, multi-step reasoning, exact arithmetic, security boundaries and irreversible actions.
  3. 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.
  4. Trade-offs: lists the advantages and drawbacks for each call.
  5. ROI: looks up current token prices on the web and estimates monthly cost and latency savings.
  6. 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:

PriorityFile & LineCurrent ModelTier & PatternJev Primitives
P1src/tickets.ts:42Claude SonnetTier 1: direct replace + CoT removalchoice + noul
P2app/router.py:88GPT-4o via OpenRouterTier 2: confidence cascadechoice
Keepsrc/writer.ts:15Claude SonnetTier 3: generates prosenone

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
OptionMeaningDefault
--callsMonthly request volume100000
--in-tokens / --out-tokensAverage tokens per call1000 / 120
--modelBaseline model from the built-in tableclaude-sonnet-4
--price-in / --price-outCurrent baseline price, USD per 1M tokensbuilt-in table
--jev-price-inCurrent Jev input price, USD per 1M tokens0.042
--latency-msMeasured baseline latencybuilt-in estimate
--modedirect (full replacement) or cascade (Jev first, fall back when unsure)direct
--offload-rateShare of requests Jev resolves in cascade mode0.80
--compactionNumber of separate LLM calls merged into one Jev request1

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-Images header
    • the jev-1.14.0 version string
    • box as a direct-replacement primitive (documented as experimental)
    • the 40x–200x latency figure
    • how score values 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.