ai-agent

NadirClaw: Optimize AI Costs

Automate AI cost savings with NadirClaw, a self-hosted LLM router for founders. Routes prompts to optimal models.

From the repo · “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.”

661 stars+3★ this week80 forksPythonGuide quality 8/10 · reviewed Jul 6Updated 10/21/2026100% free · open source
What it does

NadirClaw automates AI cost savings by routing prompts to optimal models, saving 40-70% on AI API costs

When to use it
  • •When you're using multiple AI models and want to optimize costs
  • •When you have simple and complex prompts and want to route them efficiently
  • •When you want a self-hosted solution with no middleman
Ready-to-paste prompt
curl -X POST -H 'Content-Type: application/json' -d '{"prompt": "Write a short story about a character who discovers a hidden world"}' http://localhost:8080/completions
Heads up: You need to have a compatible OpenAI model API key and a Python environment with the required dependencies to run NadirClaw
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

🔑 Needs an API key

Works after you add credentials — the setup agent will ask you for them.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/nadirclaw && curl -fsSL https://workflowstacks.com/api/skills/nadirclaw/claude-skill -o ~/.claude/skills/nadirclaw/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How NadirClaw: Optimize AI Costs works
Codeflow
Free to inspect

NadirClaw: Optimize AI Costs is a large Python project (~22k lines across 53 code files, plus 53 test files). Setup is light: runs with Docker — add your API keys to .env. Last commit this month, Other license, has a test suite.

Size
Large codebase
~22k lines · 53 code files · ~3 h to skim
Setup
Light setup
Runs with Docker — add your API keys to .env.
Runs on
Python · Docker
Needs API keys (.env)
Python 99%Shell 1%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    nadirclaw/cli.py
    Where the program starts running
  3. 3
    pyproject.toml
    Dependencies and the commands it exposes
  4. 4
    .env.example
    The API keys and settings you must provide
  5. 5
    nadirclaw/__init__.py
    Inside nadirclaw/ — the main logic begins here
What's in each folder
nadirclaw/Core code — the actual logic61 files
docs/Documentation17 files
demo/Examples you can copy1 files
verifier/Folder2 files
benchmarks/Evaluations & benchmarks1 files
tests/Tests — proof it works53 files
.github/CI / automation (GitHub Actions)2 files
READMEHas testsDocumentedCI checksDocker readyExamples includedOther licenseUpdated this month
Quick Actions
Details
Creator
NadirRouter
Language
Python
Category
ai-agent
Published
2/11/2026

Are you the creator of this tool? and earn 85% of every sale.

Show it off in your README:

Featured on WorkflowStacks
[![Featured on WorkflowStacks](https://workflowstacks.com/api/badge/nadirclaw.svg)](https://workflowstacks.com/skills/nadirclaw?utm_source=github&utm_medium=badge)
🔥 Hot this week, in your inbox
Skills like this, every Monday.

The five fastest-growing open-source AI skills, ranked by GitHub star growth. One email a week, unsubscribe anytime.