claude-native-adapter
v0.1.0
Published
A protocol adapter designed to make non-official/proxy APIs fully compatible with Claude Code's native tool-use.
Maintainers
Readme
🚀 Claude Native Adapter
Stop your Claude Code CLI from hanging. Forever.
Are you using Claude Code with a third-party API proxy (like OneAPI, NewAPI, OpenRouter, or DeepSeek) and finding that it constantly freezes, hangs, or deadlocks during file edits or planning?
The reason is simple: Claude Code's internal state machine is hypersensitive. Third-party proxies often inject just enough "polite filler" or mismatched Markdown to break the parser.
claude-native-adapter is the surgical fix. It's a lightweight protocol layer that strips away the noise and forces your LLM to behave exactly like native Claude.
⚡ Key Features (Why you need this)
- 🚫 Zero-Preamble Execution: Eradicates "Sure, I can help" filler that causes 90% of CLI hangs.
- 🧱 Raw Protocol Injection: Forces native JSON chunks for tool calls—no more broken Markdown fences.
- 🛡️ Plan Mode Stabilization: Prevents the "infinite loop" when Claude enters planning mode.
- 🔄 Anti-Deadlock Heartbeat: Automatically flushes stalled API buffers.
- 📉 Token Saver: Reduces latency and cost by stripping conversational overhead.
📦 Instant Setup (Quick Start)
Don't let the folder structure intimidate you. It's as simple as Copy & Paste.
1. Find your Skills directory
- Windows:
%USERPROFILE%\.claude\skills - macOS/Linux:
~/.claude/skills
2. Copy the Goods
- Create a folder named
claude-native-adapterinside thatskillsdirectory. - Drop the
SKILL.mdfrom this repo into it.
3. Unleash the Stability
Launch Claude Code and run:
/claude-native-adapterTotal time: < 30 seconds.
🔥 Pro-Tip: Make it Permanent
To have this protection active in every project, add this to your CLAUDE.md:
Follow the protocol in: ~/.claude/skills/claude-native-adapter/SKILL.md🧩 Supported Providers
Works with any proxy that supports Claude 3.5/3.7 models, including:
- OpenRouter
- OneAPI / NewAPI
- DeepSeek
- Custom Reverse Proxies
🌟 Why Star This?
By starring this repo, you:
- Help other developers find the fix for their "frozen terminal" frustration.
- Support the development of more compatibility patches.
- Join a community making the best CLI tool even better for everyone.
If this fixed your problem, give us a Star! It's the best way to say thanks. 🌟
📁 Repository Structure
.
├── skills/
│ └── claude-native-adapter/
│ └── SKILL.md <-- THE CORE FILE
├── README.md <-- You are here
└── LICENSE <-- MIT中文总结 (Summary for Chinese Users)
痛点:使用非官方 API(OneAPI, OpenRouter 等)时,Claude Code 经常在修改文件或进入 Plan 模式时卡死。 原理:第三方 API 往往会带一句“好的”或多余的 Markdown 格式,触发了 Claude Code 的解析漏洞。 方案:本项目通过一个简单的 Skill 协议,强制 LLM 进行“极简、原声”输出,瞬间恢复丝滑。 行动:觉得好用请点击右上角 Star!🌟
Disclaimer: This is a community-led project and is not officially affiliated with Anthropic.
