gemini-ai
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.
When & Why to Use This Skill
This Claude skill facilitates the seamless integration of Gemini AI into web applications, specifically optimized for automated content generation and project metadata management. It provides a robust framework for server-side implementation via geminiService.ts, featuring structured JSON schema outputs, strict rate-limiting logic to manage API costs, and specialized prompt engineering guidelines to maintain a consistent brand persona.
Use Cases
- Automated Metadata Generation: Use the skill to automatically generate short descriptions, tags, and project summaries from raw drafts using the Gemini API.
- AI Usage Governance: Implement built-in rate limiting (e.g., 3 generations per draft, 10 per day) and cooldown periods to prevent API abuse and control operational costs.
- Brand Voice Standardization: Apply specific personas (like the 'Chef' persona) and linguistic constraints to ensure AI-generated content remains professional and aligned with brand identity.
- Content Refinement: Transform unpolished user input into high-quality markdown descriptions through specialized AI refinement functions.
| name | gemini-ai |
|---|---|
| description | 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. |
Gemini AI Integration Skill
Instructions
- Server functions in
src/services/geminiService.ts - Use
'use server'directive - Return structured JSON via schema
- Apply rate limiting (3/draft, 10/day)
- 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.