Phase03/.claude/skills/nextjs-chatkit/SKILL.md
Integrate OpenAI ChatKit in Next.js 15 App Router with domain allowlist, authentication, and API connections. Use when building chat interfaces or ChatKit integration.
npx skillsauth add jawad-chaudhary/hackathone-2-todo-spec-driven-development nextjs-chatkitInstall 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.
NEXT_PUBLIC_OPENAI_DOMAIN_KEY=your_domain_key
NEXT_PUBLIC_API_URL=http://localhost:8000
'use client';
import { ChatKit } from '@openai/chatkit';
import { useAuth } from '@/lib/auth';
export default function ChatPage() {
const { user, token } = useAuth();
const handleMessage = async (message: string, conversationId?: number) => {
const response = await fetch(
`${process.env.NEXT_PUBLIC_API_URL}/api/${user.id}/chat`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`,
},
body: JSON.stringify({ conversation_id: conversationId, message }),
}
);
const data = await response.json();
return data.response;
};
return (
<ChatKit
domainKey={process.env.NEXT_PUBLIC_OPENAI_DOMAIN_KEY!}
onMessage={handleMessage}
placeholder="Ask me to manage your tasks..."
/>
);
}
development
Async testing with pytest, pytest-asyncio, httpx, fixtures, coverage reports, and test-first development. Use when writing tests, test fixtures, or measuring coverage.
tools
Build AI agents with OpenAI Agents SDK, tool registration, conversation history, and stateless execution. Use when creating AI agents, registering tools, or handling conversations.
tools
Create MCP server tools with Official Python MCP SDK for AI agents. Use when building MCP tools, registering tool schemas, or creating AI-accessible functions.
data-ai
SQLModel async database operations with Neon PostgreSQL, migrations, user isolation, and proper indexing. Use when defining models, queries, or database operations.