chat-api-orchestration
Implement single-endpoint chat API with deterministic request orchestration. This skill should be used when users need to create /api/{user_id}/chat endpoint, implement request validation, resolve conversation IDs, call agent runners, or design chat API contracts with structured responses.
npx skills add majiayu000/claude-skill-registry --skill chat-api-orchestration --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Chat API Orchestration Guide for implementing a single-endpoint chat API with deterministic request flow. ## What This Skill Does - Design `/api/{user_id}/chat` endpoint contract - Implement deterministic 5-step request flow - Validate incoming chat requests - Resolve or create conversation_id - Orchestrate agent runner calls - Return structured responses ## What This Skill Does NOT Do - Implement the agent/LLM logic itself - Handle conversation persistence (see conversation-state-management skill) - Manage authentication tokens (assumes auth exists) - Deploy or scale the API --- ## Before Implementation Gather context to ensure successful implementation: | Source | Gather | |--------|--------| | **Codebase** | Existing routers, auth dependencies, error handling patterns | | **Conversation** | User's agent runner interface, specific response fields needed | | **Skill References** | API contract, request flow, error handling patterns | | **User Guidelines** | Project conventions, existing schema patterns | --- ## Core Architecture ### Single Endpoint Design ``` POST /api/{user_id}/chat │ ▼ ┌─────────────────────────────────────────┐ │ DETERMINISTIC FLOW │ │ │ │ 1. Validate Request
- What This Skill Does
- What This Skill Does NOT Do
- Before Implementation
- Core Architecture
- Single Endpoint Design
- Why Single Endpoint?
- The 5-Step Deterministic Flow
- Implementation Workflow
- Step 1: Define Request/Response Schemas
- Step 2: Create the Router
- Step 3: Implement Conversation Resolution
- Step 4: Implement Agent Execution
- Error Handling
- Idempotency Considerations
What does the chat-api-orchestration skill do?
Implement single-endpoint chat API with deterministic request orchestration. This skill should be used when users need to create /api/{user_id}/chat endpoint, implement request validation, resolve conversation IDs, call agent runners, or design chat API contracts with structured responses.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill chat-api-orchestration --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
