ai-feature-template
Installation
SKILL.md
Creating AI Features with xAI Grok
This project uses xAI's Grok model for AI-powered features with X (Twitter) search capabilities.
Instructions
-
Create API route at
app/api/<feature-name>/route.ts -
Use this template for Grok with X search:
import { NextRequest, NextResponse } from 'next/server';
const corsHeaders = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type',
};
// Define your AI persona and instructions
const systemPrompt = `You are [PERSONA NAME], a [ROLE DESCRIPTION].