.claude/skills/ts-ag-ui/SKILL.md
You are an expert in AG-UI (Agent-User Interaction Protocol), the open standard by CopilotKit for connecting AI agents to frontend UIs. You help developers stream agent actions, tool calls, state updates, and text generation to React components in real-time — enabling rich agent UIs where users see what the agent is thinking, doing, and can intervene at any step.
npx skillsauth add eliferjunior/Claude ag-uiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert in AG-UI (Agent-User Interaction Protocol), the open standard by CopilotKit for connecting AI agents to frontend UIs. You help developers stream agent actions, tool calls, state updates, and text generation to React components in real-time — enabling rich agent UIs where users see what the agent is thinking, doing, and can intervene at any step.
// server/agent.ts — Stream agent events to UI
import { AgentServer, EventStream } from "@ag-ui/server";
const server = new AgentServer();
server.onRequest(async (request, stream: EventStream) => {
const { messages, context } = request;
// Emit thinking state
stream.emitStateUpdate({ status: "thinking", progress: 0 });
// Stream text generation
stream.emitTextStart();
for (const word of "I'll analyze your data now.".split(" ")) {
stream.emitTextDelta(word + " ");
await sleep(50);
}
stream.emitTextEnd();
// Emit tool call
stream.emitToolCallStart("search_database", { query: context.userQuery });
const results = await searchDatabase(context.userQuery);
stream.emitToolCallEnd("search_database", results);
stream.emitStateUpdate({ status: "analyzing", progress: 50 });
// Stream analysis
stream.emitTextStart();
const analysis = await generateAnalysis(results);
for await (const chunk of analysis) {
stream.emitTextDelta(chunk);
}
stream.emitTextEnd();
// Custom state for UI rendering
stream.emitStateUpdate({
status: "complete",
progress: 100,
charts: [{ type: "bar", data: results.chartData }],
suggestions: ["Run deeper analysis", "Export to CSV", "Schedule report"],
});
stream.end();
});
import { useAgent, AgentProvider } from "@ag-ui/react";
function App() {
return (
<AgentProvider url="https://api.example.com/agent">
<AgentChat />
</AgentProvider>
);
}
function AgentChat() {
const { messages, state, sendMessage, isStreaming, toolCalls } = useAgent();
return (
<div className="flex flex-col h-screen">
{/* Agent state visualization */}
{state.status === "thinking" && (
<div className="bg-blue-50 p-3 rounded-lg animate-pulse">
🤔 Agent is thinking... ({state.progress}%)
<progress value={state.progress} max={100} />
</div>
)}
{/* Tool calls (show what agent is doing) */}
{toolCalls.map((tc) => (
<div key={tc.id} className="bg-gray-50 p-2 rounded text-sm">
🔧 <strong>{tc.name}</strong>: {tc.status === "running" ? "Working..." : "Done"}
{tc.result && <pre className="mt-1">{JSON.stringify(tc.result, null, 2)}</pre>}
</div>
))}
{/* Messages */}
{messages.map((msg) => (
<div key={msg.id} className={msg.role === "user" ? "text-right" : "text-left"}>
<p>{msg.content}</p>
</div>
))}
{/* Dynamic UI from agent state */}
{state.charts?.map((chart, i) => (
<Chart key={i} type={chart.type} data={chart.data} />
))}
{state.suggestions && (
<div className="flex gap-2">
{state.suggestions.map((s) => (
<button key={s} onClick={() => sendMessage(s)} className="px-3 py-1 bg-blue-100 rounded">
{s}
</button>
))}
</div>
)}
{/* Input */}
<form onSubmit={(e) => { e.preventDefault(); sendMessage(input); }}>
<input placeholder="Ask anything..." disabled={isStreaming} />
</form>
</div>
);
}
npm install @ag-ui/react @ag-ui/server
development
Expert guidance for Fireworks AI, the platform for running open-source LLMs (Llama, Mixtral, Qwen, etc.) with enterprise-grade speed and reliability. Helps developers integrate Fireworks' inference API, fine-tune models, and deploy custom model endpoints with function calling and structured output support.
development
Convert any website into clean, structured data with Firecrawl — API-first web scraping service. Use when someone asks to "turn a website into markdown", "scrape website for LLM", "Firecrawl", "extract website content as clean text", "crawl and convert to structured data", or "scrape website for RAG". Covers single-page scraping, full-site crawling, structured extraction, and LLM-ready output.
tools
Expert guidance for Firebase, Google's platform for building and scaling web and mobile applications. Helps developers set up authentication, Firestore/Realtime Database, Cloud Functions, hosting, storage, and analytics using Firebase's SDK and CLI.
development
When the user needs to build file upload functionality for a web application. Use when the user mentions "file upload," "image upload," "upload endpoint," "multipart upload," "presigned URL," "S3 upload," "file validation," "upload to cloud storage," or "accept user files." Handles upload endpoints, file validation (type, size, magic bytes), cloud storage integration, and upload status tracking. For image/video processing after upload, see media-transcoder.