Skip to content
ai-app logo

AI App Generator

ai-app

Full-stack AI application generator with Next.js, AI SDK, and ai-elements. Use when creating chatbots, agent dashboards, or custom AI applications. Triggers: chatbot, chat app, agent dashboard, AI application, Next.js AI, useChat, streamText, ai-elements, build AI app, create chatbot

SKILL.md

Full skill instructions

AI App Generator

Build full-stack AI applications with Next.js, AI SDK, and ai-elements.

Quick Start

1. Scaffold Project

bunx --bun shadcn@latest create --preset "https://ui.shadcn.com/​init?base=radix&style=vega&baseColor=zinc&iconLibrary=lucide&font=inter" --template next my-ai-app
cd my-ai-app

2. Install Dependencies

bun add ai @ai-sdk/​react @ai-sdk/​anthropic zod
bunx --bun ai-elements@latest

3. Configure Environment

# .env.local - Choose your provider
ANTHROPIC_API_KEY=sk-ant-...
# OPENAI_API_KEY=sk-...
# GOOGLE_GENERATIVE_AI_API_KEY=...

4. Generate Application

Based on user requirements, generate:

Application Types

Chatbot

Simple conversational AI with streaming responses.

FeatureImplementation
Chat UIConversation + Message + PromptInput
APIstreamText + toUIMessageStreamResponse
ExtrasReasoning, Sources, File attachments

Agent Dashboard

Multi-agent interface with tool visualization.

FeatureImplementation
AgentsToolLoopAgent with tools
UIDashboard layout + Tool components
APIcreateAgentUIStreamResponse
ExtrasStatus monitoring, tool approval

Custom AI App

Mix and match based on user needs:

  • Web search chatbot
  • Code generation assistant
  • Document analyzer
  • Multi-modal chat

Project Structure

my-ai-app/
├── app/
│   ├── page.tsx                 # Main UI
│   ├── layout.tsx               # Root layout
│   ├── globals.css              # Theme
│   └── api/
│       └── chat/
│           └── route.ts         # AI endpoint
├── components/
│   ├── ai-elements/             # AI Elements components
│   ├── ui/                      # shadcn/​ui components
│   └── chat.tsx                 # Chat component (if extracted)
├── lib/
│   ├── utils.ts                 # Utilities
│   └── ai.ts                    # AI configuration (optional)
├── ai/                          # Agent definitions (if needed)
│   └── assistant.ts
└── .env.local                   # API keys

See references/​project-structure.md for details.

Core Patterns

API Route

// app/​api/​chat/​route.ts
import { streamText, UIMessage, convertToModelMessages } from 'ai';
import { anthropic } from '@ai-sdk/​anthropic';

export const maxDuration = 30;

export async function POST(req: Request) {
  const { messages }: { messages: UIMessage[] } = await req.json();

  const result = streamText({
    model: anthropic('claude-sonnet-4-5'),
    messages: convertToModelMessages(messages),
    system: 'You are a helpful assistant.',
  });

  return result.toUIMessageStreamResponse({
    sendSources: true,
    sendReasoning: true,
  });
}

Chat Page

// app/​page.tsx
'use client';
import { useChat } from '@ai-sdk/​react';
import {
  Conversation,
  ConversationContent,
  ConversationScrollButton,
} from '@/​components/​ai-elements/​conversation';
import {
  Message,
  MessageContent,
  MessageResponse,
} from '@/​components/​ai-elements/​message';
import {
  PromptInput,
  PromptInputBody,
  PromptInputTextarea,
  PromptInputFooter,
  PromptInputSubmit,
  type PromptInputMessage,
} from '@/​components/​ai-elements/​prompt-input';
import { Loader } from '@/​components/​ai-elements/​loader';
import { useState } from 'react';

export default function ChatPage() {
  const [input, setInput] = useState('');
  const { messages, sendMessage, status } = useChat();

  const handleSubmit = (message: PromptInputMessage) => {
    if (!message.text.trim()) return;
    sendMessage({ text: message.text, files: message.files });
    setInput('');
  };

  return (
    <div className="flex h-screen flex-col p-4">
      <Conversation className="flex-1">
        <ConversationContent>
          {messages.map((message) => (
            <div key={message.id}>
              {message.parts.map((part, i) => {
                if (part.type === 'text') {
                  return (
                    <Message key={i} from={message.role}>
                      <MessageContent>
                        <MessageResponse>{part.text}</​MessageResponse>
                      </​MessageContent>
                    </​Message>
                  );
                }
                return null;
              })}
            </​div>
          ))}
          {status === 'submitted' && <Loader />}
        </​ConversationContent>
        <ConversationScrollButton />
      </​Conversation>

      <PromptInput onSubmit={handleSubmit} className="mt-4">
        <PromptInputBody>
          <PromptInputTextarea
            value={input}
            onChange={(e) => setInput(e.target.value)}
          />
        </​PromptInputBody>
        <PromptInputFooter>
          <div />
          <PromptInputSubmit status={status} />
        </​PromptInputFooter>
      </​PromptInput>
    </​div>
  );
}

Skill References

For detailed patterns, see:

NeedSkillReference
Chat UI components/​ai-elementschatbot.md
Next.js patterns/​nextjs-shadcnarchitecture.md
AI SDK functions/​ai-sdk-6core-functions.md
Agents & tools/​ai-sdk-6agents.md
Caching/​cache-componentsREFERENCE.md
Code review & cleanup/​code-simplifierDRY/​KISS/​YAGNI validation

Workflow

Phase 1: Understand Requirements

Ask user:

  • What type of AI app? (chatbot, agent, custom)
  • What features? (reasoning, sources, tools, file upload)
  • What theme/​colors? (zinc, neutral, blue, violet, green, orange)
  • What border radius style? (sharp 0.25rem, default 0.5rem, rounded 0.75rem, pill 1.3rem)

Phase 2: Scaffold Project

Run scaffolding commands based on requirements.

Phase 3: Generate Files

Create files based on application type:

  • API route (app/​api/​chat/​route.ts)
  • Main page (app/​page.tsx)
  • Components (if needed)
  • Agents (if needed)

Phase 4: Configure

  • Set up .env.local
  • Configure next.config.ts if needed
  • Add any additional dependencies

Phase 5: Verify

bun dev

Test the application works correctly.

References

Package Manager

Always use bun, never npm:

  • bun add (not npm install)
  • bunx --bun (not npx)
  • bun dev (not npm run dev)

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View