Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/exiao/skills --skill gemini-svg명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | gemini-svg |
| description | Use when generate interactive SVG animations via Gemini. |
Generate beautiful, interactive SVG animations by sending prompts to Gemini 3.1 Pro Preview and extracting the SVG output.
Gemini 3.1 Pro Preview is exceptionally good at generating self-contained SVGs with embedded CSS animations, JavaScript interactivity, and clean visual design. It handles complex animation logic (hover states, transitions, particle effects, morphing) that other models struggle with.
Use the Gemini API key from nano-banana-pro skill config: get it from skills.entries.nano-banana-pro.apiKey in the gateway config, or set GEMINI_API_KEY in env.
Use GEMINI_API_KEY from environment. Model: gemini-3.1-pro-preview.
curl -s "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-pro-preview:generateContent?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"parts": [{"text": "PROMPT_HERE"}]}],
"generationConfig": {
"temperature": 1.0,
"maxOutputTokens": 65536
}
}'
Response path: .candidates[0].content.parts[0].text
Extract the SVG block from between <svg and </svg> (inclusive). If the response wraps it in markdown code fences, strip those.
Always prepend the user's request with this system context:
Generate a single, self-contained SVG file. Requirements:
- All styles must be embedded in a <style> tag inside the SVG
- All interactivity must use inline <script> tags inside the SVG
- Use CSS animations and transitions for smooth motion
- Use clean, modern visual design with attention to detail
- Include hover states and micro-interactions where appropriate
- The SVG must work standalone when opened in a browser
- Use viewBox for responsive sizing
- Prefer clean flat UI style unless the user specifies otherwise
User request: [USER'S DESCRIPTION]
Add these modifiers to the prompt based on what the user wants:
| Want | Add to prompt |
|---|---|
| Smooth animations | "Use CSS keyframe animations with ease-in-out timing" |
| Hover effects | "Add hover state transitions with transform and opacity changes" |
| Dark theme | "Use a dark background (#1a1a2e or similar) with light elements" |
| Glowing effects | "Add CSS filter: drop-shadow with colored glow on key elements" |
| Particles | "Include floating particle effects using CSS animations with staggered delays" |
| Morphing shapes | "Use CSS or SMIL animations to morph between shapes" |
| Interactive | "Add JavaScript click/hover handlers that trigger state changes" |
| Looping | "Make all animations loop infinitely with animation-iteration-count: infinite" |
| Staggered | "Stagger animation delays across elements for a wave/cascade effect" |
python3 or jq/tmp/gemini-svg-output.svg, or user-specified path)open /tmp/gemini-svg-output.svg (macOS)Use Python for the full flow (reliable JSON handling, proper timeout):
import json, re, urllib.request, os, sys
prompt = sys.argv[1] # User's prompt with system prefix
payload = json.dumps({
"contents": [{"parts": [{"text": prompt}]}],
"generationConfig": {"temperature": 1.0, "maxOutputTokens": 65536}
})
url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-pro-preview:generateContent?key={os.environ['GEMINI_API_KEY']}"
req = urllib.request.Request(url, data=payload.encode(), headers={"Content-Type": "application/json"})
# Gemini 3.1 Pro can take 30-90s for complex SVG generation
resp = urllib.request.urlopen(req, timeout=120)
data = json.loads(resp.read())
text = data['candidates'][0]['content']['parts'][0]['text']
# Strip markdown code fences
text = re.sub(r'^```(?:svg|xml|html)?\n', '', text.strip())
text = re.sub(r'\n```\s*$', '', text.strip())
# Extract SVG
match = re.search(r'(<svg[\s\S]*?</svg>)', text)
svg = match.group(1) if match else text
output_path = sys.argv[2] if len(sys.argv) > 2 else '/tmp/gemini-svg-output.svg'
with open(output_path, ) f:
f.write(svg)
()
Important: Gemini 3.1 Pro takes 60-120 seconds for complex SVG generation. Use timeout=180 on exec calls. The sandbox may kill long-running processes; if that happens, run the Python script on the host directly or use exec with host: "gateway" if available. Always set the env var: GEMINI_API_KEY=<key from TOOLS.md>
These produce excellent results with Gemini 3.1 Pro Preview:
UI Components:
Decorative/Art:
Data Viz:
Icons/Logos:
If the first result isn't right:
/tmp/gemini-svg-[short-description].svgrsvg-convert or browser screenshot if needed