Anvia Chat Skill
SkillDev toolsWire an Anvia chat UI end to end, server stream route, client transport, React hook, and UI primitives.
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the Anvia Chat Skill skill
What this skill tells your AI
The instructions your AI receives, as published by anvia-hq/anvia in skills/anvia-chat/SKILL.md and read by ahel’s review.
Use this skill when the user wants a chat or completion UI backed by Anvia:
new chat routes, transports, useChat/useCompletion wiring, message rendering,
resumable streams, agent tool-approval interactions, or anvia add chat work.
Process
- Build the server route first (
references/server-protocol.md). - Pick the transport and state conversions (
references/transports-state.md). - Wire the React controller and render UI primitives (
references/react-ui.md). - Run
scripts/check-chat-boundary.shfrom the app root before claiming done.
Minimal slice
// Server route: core events -> client protocol -> framed response.
import { completionToClientStream, parseClientStreamRequest } from "@anvia/client";
import { streamCompletion } from "@anvia/core";
import { createClientStreamResponse } from "@anvia/server";
const body = parseClientStreamRequest(await request.json());
if (body.type !== "messages") throw new Error("This completion endpoint accepts messages only.");
const events = completionToClientStream({
events: streamCompletion({ model, messages: body.messages }),
});
return createClientStreamResponse({ events }); // JSONL by default
// App: explicit transport, hook owns state, primitives render it.
import { createHttpClientTransport } from "@anvia/client";
import { useChat } from "@anvia/react";
import { ChatProvider, ComposerPrimitive, ThreadPrimitive } from "@anvia/react-ui";
const transport = createHttpClientTransport({ endpoint: "/api/chat" });
const chat = useChat({ transport });
<ChatProvider controller={chat}>
<ThreadPrimitive.Root>
<ThreadPrimitive.Viewport>
<ThreadPrimitive.Messages />
</ThreadPrimitive.Viewport>
<ComposerPrimitive.Root>
<ComposerPrimitive.Input placeholder="Send a message..." />
<ComposerPrimitive.Submit>Send</ComposerPrimitive.Submit>
</ComposerPrimitive.Root>
</ThreadPrimitive.Root>
</ChatProvider>;
Output
Keep the answer to the smallest working vertical slice: one route, one transport, one hook, one render tree. Point to the relevant reference file instead of pasting its contents into chat.
Signals
- GitHub stars
- 50
- Forks
- 6
- Last commit
- Oct 2026
ahel review
K6low
bundled executables the agent is told to run
Automated review, not a security audit. Ruleset v1+k2.
Advanced
- Item type
- skill
- Key
anvia-chat- Source
- github.com/anvia-hq/anvia
Related picks
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptreact-component-performance
Skill · davila7
The pick for Reactreact-doctor
Skill · millionco
The pick for Reactteach
Skill · mattpocock
More in Dev toolsponytail
Skill · dietrichgebert
More in Dev tools