codex-protocol-adapter-reuse

Translate non-Anthropic LLM API protocols using a five-layer adapter architecture.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/liuyu520/cc_source --skill codex-protocol-adapter-reuse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-protocol-adapter-reuse
Source: https://github.com/liuyu520/cc_source/tree/main/.claude/skills/codex-protocol-adapter-reuse
Command: npx skills add https://github.com/liuyu520/cc_source --skill codex-protocol-adapter-reuse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reuses the Codex/OpenAI Responses adapter architecture to add support for new non-Anthropic LLM API protocols by translating between formats, faking the provider SDK, and preserving Claude Code's core workflow.

Core Features & Use Cases

  • Protocol translator framework enabling translation across API formats.
  • Fake SDK adapter layer that wires to any target backend without touching claude.ts.
  • End-to-end compatibility for multiple backends (Gemini, Ollama, Cohere, etc.) while preserving existing pipelines.
  • Extensibility for new backends via modular translator components and provider wiring.

Quick Start

Wire a new protocol by adding request/response translators, implementing a fake provider client, and validating the end-to-end flow against a test API endpoint.

Frequently Asked Questions about codex-protocol-adapter-reuse

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add support for a new LLM API protocol in Claude Code?

You can add new LLM API protocol support by reusing the Codex adapter architecture, which provides a five-layer translation model including request/response translators, SSE streaming, and error contracts to map between formats while preserving the core workflow.

Can I integrate non-Anthropic LLM backends like Gemini or Ollama without modifying claude.ts?

Yes, you can integrate backends like Gemini or Ollama using a fake SDK adapter layer that wires to any target backend without touching claude.ts, ensuring the existing Claude Code pipeline remains untouched.

What is a protocol translator framework for LLM APIs?

A protocol translator framework enables translation across different API formats by implementing modular translator components for requests, responses, and SSE streaming, allowing new backends to be added through provider wiring.

How do I wire a new protocol adapter for an OpenAI-compatible API?

Wire a new protocol by adding request and response translators, implementing a fake provider client, and validating the end-to-end flow against a test API endpoint to ensure compatibility with the OpenAI Responses adapter architecture.

Does this adapter approach support SSE streaming and error contracts for custom LLM providers?

Yes, the five-layer translation model includes SSE streaming, error contracts, default values, and meta-protocol capabilities to ensure end-to-end compatibility for multiple custom LLM backends.

What are the limitations of reusing the Codex protocol adapter for new API integrations?

The adapter relies on a five-layer translation model and fake SDK adapter, so limitations depend on how well the target API conforms to the required request/response translators and SSE streaming contracts.