antdv-next/x/use-x-chat
Claude Code and agent skill by antdv-next/x
- community
Checking that the SKILL.md file is still in the repository.
Focus on explaining how to use the useXChat Hook, including custom Provider integration, message management, error handling, etc.
Install
npx vskill@latest install antdv-next/x/use-x-chatSKILL.md
π― Skill Positioning
Core Positioning: Use theuseXChatHook to build professional AI conversation applications Prerequisites: Already have a custom Chat Provider (refer to x-chat-provider skill)
Table of Contents
- π Quick Start
- Dependency Management
- Three-step Integration
- π§© Core Concepts
- Technology Stack Architecture
- Data Model
- π§ Core Function Details
- Message Management
- Request Control
- Error Handling
- Complete Example Project
- π Prerequisites and Dependencies
- π¨ Development Rules
- π Reference Resources
- π Core Reference Documentation
- π SDK Official Documentation
- π» Example Code
π Quick Start
1. Dependency Management
π― Automatic Dependency Handling
π System Requirements
- @antdv-next/x-sdk: latest version (automatically installed)
- @antdv-next/x: latest version (UI components, automatically installed)
β οΈ Version Issue Auto-fix
If version mismatch is detected, the skill will automatically:
- β Prompt current version status
- β Provide fix suggestions
- β Use relative paths to ensure compatibility
π― Built-in Version Check
The use-x-chat skill has built-in version checking functionality, automatically checking version compatibility on startup:
π Auto-check Function The skill will automatically check if the @antdv-next/x-sdk version meets requirements on startup:
π Check Contents:
- β Currently installed version
- β Whether it meets minimum requirements
- β Automatically provide fix suggestions
- β Friendly error prompts
π οΈ Version Issue Fix If version mismatch is detected, the skill will provide specific fix commands:
2. Three-step Integration
Step 1: Prepare Provider
This part is handled by the x-chat-provider skill
Step 2: Basic Usage
Step 3: UI Integration
π§© Core Concepts
Technology Stack Architecture
Data Model
β οΈ Important Reminder:messagestype isRef<MessageInfo<MessageType>[]>, not directMessageType. Access viamessages.value.
π§ Core Function Details
π‘ Tip: API may update with versions, it is recommended to check official documentation for the latest information
Core functionality reference content CORE.md
π Prerequisites and Dependencies
β οΈ Important Dependencies
use-x-chat must depend on one of the following skills:
| Dependency Type | Skill | Description | Required | |
|---|---|---|---|---|
| Core Dependency | x-chat-provider | Provides custom Provider instance, default uses XRequest, must be used with use-x-chat | Required | |
| Or | Built-in Provider | OpenAI/DeepSeek and other built-in Providers, default uses XRequest | Required | |
| Recommended Dependency | x-request | Configure request parameters and authentication, as the default request method | Recommended |
π― Usage Scenario Comparison Table
| Usage Scenario | Required Skill Combination | Usage Order | |
|---|---|---|---|
| Private API Adaptation | x-chat-provider β use-x-chat | Create Provider first, then use | |
| Standard API Usage | use-x-chat (built-in Provider) | Direct use | |
| Authentication Configuration Needed | x-request β use-x-chat | Configure request first, then use | |
| Complete Customization | x-chat-provider β x-request β use-x-chat | Complete workflow |
π¨ Development Rules
Before using use-x-chat, must confirm:
- [ ] Has Provider source (choose one of the following):
- [ ] Has created custom Provider with x-chat-provider
- [ ] Decided to use built-in Provider (OpenAI/DeepSeek)
- [ ] @antdv-next/x-sdk is installed
- [ ] Understand MessageInfo data structure
- [ ] UI components are ready
Test Case Rules
- If the user does not explicitly need test cases, do not add test files
- Only create test cases when the user explicitly requests them
Code Quality Rules
- After completion, must check types: Run
tsc --noEmitto ensure no type errors - Keep code clean: Remove all unused variables and imports
π Reference Resources
π Core Reference Documentation
- API.md - Complete API reference documentation
- EXAMPLES.md - All practical example code
π SDK Official Documentation
π» Example Code
- useXChat demos - Complete example demos
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/x-skill/skills/use-x-chat/SKILL.md
Popularity
- Repository stars
- 83
- Repository forks
- 11
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/antdv-next/x/use-x-chat)