x-chat-provider

Adapt streaming chat interfaces to Antdv Next X Chat Provider standards.

81|11|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/antdv-next/x --skill x-chat-provider-antdv-next
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: x-chat-provider
Source: https://github.com/antdv-next/x/tree/main/packages/x-skill/skills/x-chat-provider
Command: npx skills add https://github.com/antdv-next/x --skill x-chat-provider-antdv-next

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Converts any streaming chat interface into the Antdv Next X Chat Provider standard, enabling a consistent data flow and plug-and-play UI integration across diverse APIs.

Core Features & Use Cases

  • Custom Provider adaptation: translates varied chat formats into the Antdv Next X contract for predictable rendering.
  • XRequest-centric networking: delegates all network calls and auth to XRequest, while the provider handles data transformation only.
  • Reusability for private/non-standard APIs: enables building a single provider that can support multiple backend formats and teams.

Quick Start

Instantiate a custom provider by extending AbstractChatProvider and implementing transformParams, transformLocalMessage, and transformMessage, while wiring the provider with XRequest for all network calls.

Frequently Asked Questions about x-chat-provider

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

FAQPage Schema
How do I adapt a non-standard chat API to a consistent UI provider?

You adapt a streaming chat API by extending the abstract provider class and implementing three core transform methods to translate varied formats into the standard contract. This enables consistent data flow and plug-and-play UI integration.

How do I handle streaming chat data transformation for private APIs?

Handle streaming chat data transformation by implementing the transformMessage and transformLocalMessage methods within your custom provider. This translates non-standard private API formats into a predictable structure for UI rendering.

Do I need XRequest for all network interactions when building a chat provider?

Yes, you need XRequest for all network interactions and authentication when building a chat provider. The provider itself handles only data transformation, delegating all network calls to XRequest to maintain separation of concerns.

What are the required methods to implement a custom chat provider?

The required methods to implement a custom chat provider are transformParams, transformLocalMessage, and transformMessage. Implementing these three core methods enforces the standard contract and enables plug-and-play UI integration.

Can I use a single chat provider to support multiple backend formats?

Yes, you can build a single custom chat provider to support multiple backend formats and teams. The adapter pattern translates varied private API responses into the standard contract, ensuring reusability across different non-standard implementations.

Why does my streaming chat interface need a provider adaptation layer?

A streaming chat interface needs a provider adaptation layer to convert non-standard API responses into a predictable contract. This ensures consistent rendering and enables plug-and-play UI integration without altering the core data flow.