gemini-ai

jhlee0409's avatarfrom jhlee0409

Integrates Gemini AI for content generation. Use when adding AI features, generating project descriptions, implementing rate limiting, or working with geminiService.ts. Includes prompting guidelines and error handling.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 3, 2026

When & Why to Use This Skill

This Claude skill facilitates the seamless integration of Gemini AI into web applications, focusing on structured content generation and robust service management. It provides developers with ready-to-use patterns for server-side AI functions, including sophisticated rate limiting, schema-based JSON responses, and persona-driven prompt engineering to ensure high-quality, brand-consistent output.

Use Cases

  • Automated Project Metadata: Automatically generate short descriptions and tags for project drafts using the Gemini API to enhance discoverability and reduce manual entry.
  • AI Rate Limit Management: Implement granular usage controls, such as daily generation caps and cooldown periods, to optimize API costs and prevent system abuse.
  • Consistent Brand Voice: Utilize specialized prompting guidelines and personas (e.g., a 'Senior Editor') to maintain a professional and unique tone across all generated content while filtering out banned terminology.
  • Structured Data Extraction: Refine raw markdown descriptions into structured JSON formats, making it easier to process and display information within modern UI frameworks like React.
namegemini-ai
descriptionIntegrates Gemini AI for content generation. Use when adding AI features, generating project descriptions, implementing rate limiting, or working with geminiService.ts. Includes prompting guidelines and error handling.

Gemini AI Integration Skill

Instructions

  1. Server functions in src/services/geminiService.ts
  2. Use 'use server' directive
  3. Return structured JSON via schema
  4. Apply rate limiting (3/draft, 10/day)
  5. Korean language with "Chef" persona

Existing Functions

  • generateProjectContent(draft) → { shortDescription, description, tags }
  • refineDescription(rawDescription) → refined markdown

AI Rate Limits

  • 3 generations per draft
  • 10 generations per day per user
  • 5-second cooldown between requests

Prompting Style

  • Role: "SideDish 플랫폼의 수석 에디터"
  • Language: Korean (자연스러운 해요체)
  • Culinary metaphors: subtle, not forced
  • Banned: "최고의", "혁신적인", "획기적인"

Usage in Components

import { generateProjectContent } from '@/services/geminiService'
import { canGenerate, recordGeneration } from '@/lib/aiLimitService'

if (!canGenerate(draftId)) {
  toast.error('AI 생성 횟수를 초과했습니다.')
  return
}

const result = await generateProjectContent(draft)
recordGeneration(draftId)

For complete templates, error handling, and UI components, see reference.md.