ai-chat-application — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited ai-chat-application (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Complete guide to building production AI chat applications with the Vercel AI SDK.
npx clawhub@latest install ai-chat-application┌─────────────────────────────────────────────────────────────┐
│ Client (React) │
├─────────────────────────────────────────────────────────────┤
│ useChat Hook │ Data Stream Handler │
│ - messages, input, submit │ - Custom data events │
│ - isLoading, error │ - Message annotations │
│ See: vercel-ai-chat-integration │ See: vercel-ai-data-streaming
├─────────────────────────────────────────────────────────────┤
│ API Route (Next.js) │
│ - createDataStreamResponse, streamText, message persistence│
│ See: ai-streaming-routes │
├─────────────────────────────────────────────────────────────┤
│ Tool System │
│ - Toolkit composition, singleton factories, error handling │
│ See: ai-tool-composition, vercel-ai-tool-architecture │
├─────────────────────────────────────────────────────────────┤
│ Message Handling │
│ - DB ↔ UI conversion, sanitization, annotations │
│ See: ai-message-handling │
└─────────────────────────────────────────────────────────────┘Create the streaming chat endpoint.
Read: ai/skills/ai-chat/ai-streaming-routes
// app/api/chat/route.ts
export async function POST(request: Request) {
const { id, messages, modelId } = await request.json();
// Auth, validation, save user message...
return createDataStreamResponse({
execute: (dataStream) => {
const result = streamText({
model: customModel(model),
system: systemPrompt,
messages: convertToCoreMessages(messages),
tools: makeToolkitByName(model.toolkit, params),
onFinish: async ({ response }) => {
// Save assistant messages
},
});
result.mergeIntoDataStream(dataStream);
},
});
}Build the client-side chat interface.
Read: ai/skills/ai-chat/vercel-ai-chat-integration
// components/chat.tsx
export function Chat({ id, initialMessages }: ChatProps) {
const { messages, input, handleSubmit, isLoading } = useChat({
id,
initialMessages,
experimental_throttle: 100,
onError: (error) => toast.error(parseError(error)),
});
return (
<div>
<Messages messages={messages} isLoading={isLoading} />
<ChatInput value={input} onSubmit={handleSubmit} />
</div>
);
}Add auto-scroll and loading states.
const [containerRef, endRef] = useScrollToBottom();
{isLoading && lastMessage?.role === 'user' && <ThinkingMessage />}Add function calling capabilities.
Read: ai/skills/ai-chat/ai-tool-composition
// lib/tools/allTools.ts
export function allToolsToolkit(params: ToolkitParams) {
return {
...makeWeb3Tools(params),
...makeSearchTools(params),
getTime: tool({ /* inline tool */ }),
};
}Handle message format conversion and persistence.
Read: ai/skills/ai-chat/ai-message-handling
// Convert DB → UI on page load
const uiMessages = convertToUIMessages(dbMessages);
// Sanitize before save
const cleanMessages = sanitizeResponseMessages(response.messages);| Skill | Purpose |
|---|---|
vercel-ai-chat-integration | useChat hook patterns |
vercel-ai-data-streaming | Custom data events |
vercel-ai-tool-architecture | Tool system design |
ai-streaming-routes | API route patterns |
ai-message-handling | Format conversion |
ai-tool-composition | Tool factories |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.