by NadirRouter
Open-source LLM router & AI cost optimizer. Routes simple prompts to cheap/local models, complex ones to premium — automatically. Drop-in OpenAI-compatible proxy for Claude Code, Codex, Cursor, OpenClaw. Saves 40-70% on AI API costs. Self-hosted, no middleman.
# Add to your Claude Code skills
git clone https://github.com/NadirRouter/NadirClawGuides for using api integration skills like NadirClaw.
Last scanned: 5/16/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-16T06:22:07.680Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}NadirClaw is an open-source api integration skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by NadirRouter. Open-source LLM router & AI cost optimizer. Routes simple prompts to cheap/local models, complex ones to premium — automatically. Drop-in OpenAI-compatible proxy for Claude Code, Codex, Cursor, OpenClaw. Saves 40-70% on AI API costs. Self-hosted, no middleman. It has 546 GitHub stars.
Yes. NadirClaw passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/NadirRouter/NadirClaw" and add it to your Claude Code skills directory (see the Installation section above).
NadirClaw is primarily written in Python. It is open-source under NadirRouter on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other API Integration skills you can browse and compare side by side. Open the API Integration category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh NadirClaw against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Most LLM requests don't need a premium model. In typical coding sessions, 60-70% of prompts are simple — reading files, short questions, formatting. They can be handled by models that cost 10-20x less.
$ nadirclaw serve
✓ Classifier ready — Listening on localhost:8856
SIMPLE "What is 2+2?" → gemini-flash $0.0002
SIMPLE "Format this JSON" → haiku-4.5 $0.0004
COMPLEX "Refactor auth module..." → claude-sonnet $0.098
COMPLEX "Debug race condition..." → gpt-5.2 $0.450
SIMPLE "Write a docstring" → gemini-flash $0.0002
3 of 5 routed cheaper · $0.549 vs $1.37 all-premium · 60% saved
Your keys. Your models. No middleman. NadirClaw runs locally and routes directly to providers. No third-party proxy, no subsidized tokens, no platform that can pull the plug on you. Why this matters.
NadirClaw and Nadir Pro share the same routing architecture. The numbers
below are from the trained classifier + DeBERTa verifier in Nadir Pro;
the NadirClaw OSS classifier uses a simpler binary centroid that trades
some accuracy for zero training cost. Both run the same cascade rule
engine (nadirclaw/cascade_rules/).
The composed system (pre-generation classifier + post-generation cascade verifier, τ=0.80):
| Metric | Value |
|---|---|
| AUROC | 0.961 |
| Expected Calibration Error (ECE) | 0.016 |
| Quality preserved vs always-Opus | 98.3% |
| Catastrophic-downgrade rate | 1.7% |
| Composed cost vs always-Opus | -60% |
Full τ-sweep and per-domain breakdown is in MODEL_CARD.md.
| Metric | Value |
|---|---|
| Composite score | 0.7118 |
| Projected leaderboard rank | #5 |
| Routers below (selected) | NotDiamond-0001, Auto Router, Martian |
RouterArena submission PR (live): RouteWorks/RouterArena#112.
Zero overlap between Nadir's training corpus and either held-out set:
| Held-out set | Audit run | Overlap |
|---|---|---|
RouterBench 0shot |
2026-05-24 | 0 of 36,481 |
RouterArena sub_10 |
2026-05-27 | 0 of 809 |
RouterArena full |
2026-05-27 | 0 of 8,399 |
The audit is reproducible from this repo:
verifier/contamination_audit.py.
Hash recipe: sha256(NFC(prompt).strip().casefold().utf8).
pip install nadirclaw
Or install from source:
curl -fsSL https://raw.githubusercontent.com/doramirdor/NadirClaw/main/install.sh | sh
Then run the interactive setup wizard:
nadirclaw setup
This guides you through selecting providers, entering API keys, and choosing models for each routing tier. Then start the router:
nadirclaw serve --verbose
That's it. NadirClaw starts on http://localhost:8856 with sensible defaults (Gemini 3 Flash for simple, OpenAI Codex for complex). If you skip nadirclaw setup, the serve command will offer to run it on first launch.
NadirClaw is the free, open-source core. If you are routing production traffic or running a team, Nadir Pro is the hosted version with more accurate routing, team features, and analytics. Same routing philosophy, zero vendor lock-in (Pro lets you BYOK and you can always fall back to NadirClaw self-hosted).
| NadirClaw (Free, OSS) | Nadir Pro (Hosted) | |
|---|---|---|
| License | MIT | Proprietary |
| Deploy | Self-hosted, localhost | api.getnadir.com or self-host via Docker |
| Pre-generation classifier | Binary centroid (~10ms), opt-in DistilBERT, or bundled wide_deep_asym_v3 trained checkpoint (~40ms CPU; see MODEL_CARD.md) |
Same trained classifier + closed-loop retraining, provider-health-aware ranking |
| Post-generation verifier | Rule-based heuristic (refusal / length / JSON checks, ~1ms) | Trained DeBERTa-v3-small cross-encoder, AUROC 0.96 on RouterBench held-out |
| Verifier-gated cascade | Yes (heuristic verifier) | Yes (trained verifier) |
| Storage | Local JSONL + SQLite | Postgres (Supabase), multi-tenant |
| Dashboard | Terminal + local web | Hosted web dashboard, per-team analytics |
| Cost tracking | nadirclaw savings CLI |
Live dashboard, monthly invoices, projected savings |
| Extras | Context optimize, fallback chains | Everything in Free, plus semantic cache, response healing, prompt caching passthrough |
| Team | None | SSO, audit logs, API key management, priority support |
| Billing | N/A | Pay only on savings: 25% of first $2K, 10% above, plus $9/mo base |
| Best for | Solo devs, self-hosters, anyone who wants the router running locally | Teams routing real traffic who want a hosted dashboard and want someone else to maintain the classifier |
Start free at getnadir.com (15 requests/day on our keys, unlimited with BYOK). If Nadir is not saving you money, you do not pay us.
off (default), safe (lossless), aggressive (+ columnar JSON-array packing & semantic dedup), progressive (staged ladder that only escalates until a token budget is met). Pluggable backend (native default, or opt-in headroom). See savings analysisbinary (default, ~10ms centroid classifier) or distilbert (3-class fine-tuned DistilBERT that natively predicts simple/mid/complex). Select with NADIRCLAW_COMPLEXITY_ANALYZERNADIRCLAW_TIER_THRESHOLDS); set NADIRCLAW_MID_MODEL for a cost-effective middle tiern2_default.yaml) ships a cheap-and-strong two-tier cascade tuned on RouterArena (arena_F 0.7358, beats the legacy three-tier baseline). Switch profiles with NADIRCLAW_TIERS_PROFILE=<name>. Custom YAML profiles hot-reload from disk in <30s. See nadirclaw/tier_config/ and the N-tier docs below.nadirclaw/cascade.py (Cascade for 2-tier, NTierCascade for N≥2).force_escalate on patterns where the verifier is unreliable (code, summarisation), set_threshold to raise the verifier bar on borderline domains, force_cheap for trivially-easy patterns, set_max_tokens for length budgeting. Hot-reload from disk; profiles live in nadirclaw/cascade_rules/profiles/.