configure-chatkit

Integrate OpenAI ChatKit into a Next.js frontend with Better Auth.

Updated Feb 1, 2026
One-click install
npx skills add https://github.com/sarimofficial/HackathonlPhase-IV-AI-Powered-Kubernetes-Deployment-Minikube-Helm-kubectl-ai-Kagent-Gordon --skill configure-chatkit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: configure-chatkit
Source: https://github.com/sarimofficial/HackathonlPhase-IV-AI-Powered-Kubernetes-Deployment-Minikube-Helm-kubectl-ai-Kagent-Gordon/tree/main/.claude/skills/configure-chatkit
Command: npx skills add https://github.com/sarimofficial/HackathonlPhase-IV-AI-Powered-Kubernetes-Deployment-Minikube-Helm-kubectl-ai-Kagent-Gordon --skill configure-chatkit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps frontend teams integrate OpenAI ChatKit into a Next.js application, delivering a polished chat experience with secure session management and domain allowlisting.

Core Features & Use Cases

  • Environment configuration: Add allowed domains and essential ChatKit credentials to the project.
  • UI integration: Build and embed a chat UI component that communicates with the /api/chat endpoint.
  • Conversation history & tool calls: Visually display message history and tool execution results within the chat.
  • Authentication integration: Seamlessly connect with Better Auth to protect chat access.

Quick Start

Set up a Next.js project, install the ChatKit package, configure environment keys (NEXT_PUBLIC_CHAT_KIT_PUBLIC_KEY, CHAT_KIT_SECRET, CHAT_KIT_INSTANCE_ID, NEXT_PUBLIC_ALLOWED_DOMAINS), implement the chat component, and wire it to the /api/chat endpoint with session authentication.

Frequently Asked Questions about configure-chatkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate OpenAI ChatKit into a Next.js frontend?

Integrating OpenAI ChatKit into a Next.js frontend involves installing the ChatKit package, configuring essential environment keys, building the chat UI component, and wiring it to the /api/chat endpoint with secure session authentication.

What environment variables do I need for OpenAI ChatKit configuration?

OpenAI ChatKit configuration requires setting NEXT_PUBLIC_CHAT_KIT_PUBLIC_KEY, CHAT_KIT_SECRET, CHAT_KIT_INSTANCE_ID, and NEXT_PUBLIC_ALLOWED_DOMAINS environment variables to ensure secure access and domain allowlisting.

Can I use Better Auth to secure my Next.js chat application?

Yes, you can use Better Auth to secure your Next.js chat application by connecting it to protect chat access and manage user sessions across typical chat workflows with OpenAI ChatKit.

How do I display conversation history and tool call results in a Next.js chat UI?

To display conversation history and tool call results in a Next.js chat UI, build and embed the ChatKit component which visually renders message history and tool execution results within the chat interface.

Does OpenAI ChatKit support domain allowlisting for frontend deployments?

Yes, OpenAI ChatKit supports domain allowlisting for frontend deployments by enforcing explicit environment keys like NEXT_PUBLIC_ALLOWED_DOMAINS to restrict access and ensure reliable user experiences.