一键导入
replicate-svg-generation
Generate SVG images with Replicate via direct Bash HTTP calls. Use when you need vector image generation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate SVG images with Replicate via direct Bash HTTP calls. Use when you need vector image generation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Communication behavior for leader agents who speak directly to users. Language matching, dense precision, fact verification, and clear-as-possible answers.
Shared dependency version catalog for dependency-installing and dependency-bumping agents. Load before adding, updating, or recommending dependencies.
Ultra-compressed English-only communication. Drops everything non-essential. Keeps full technical accuracy. No tiers, no modes.
Use this when you need to build, debug, capture, validate, and refine Godot games end to end with native GDScript, staged planning, scene builders, visual QA, and optional 3D asset workflows.
Convert a local document or image file to a Markdown file using Mistral OCR. Supports PDF, Office, OpenDocument, images, and text/code formats. Use when you need to extract text from a file into a clean Markdown file.
Keeps agents up to date on modern CSS capabilities and replacements for legacy approaches. Use this when editing CSS files.
| name | replicate-svg-generation |
| description | Generate SVG images with Replicate via direct Bash HTTP calls. Use when you need vector image generation. |
.svg image using recraft-ai/recraft-v4-svg on Replicatecurl call to Replicate HTTP API~/Documents/.secrets/replicate-keyUse this skill when you need to generate an SVG vector image.
Required:
prompt (string) - The text description of the image to generate. Always required.Optional:
aspect_ratio enum: Not set, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 1:2, 2:1, 14:10, 10:14, 4:5, 5:4, 6:10size enum: 1024x1024, 1536x768, 768x1536, 1280x832, 832x1280, 1216x896, 896x1216, 1152x896, 896x1152, 832x1344, 1280x896, 896x1280, 1344x768, 768x1344Rules:
prompt is always required.aspect_ratio is different from Not set, do not send size.aspect_ratio is Not set, you may send size.stringuri.svg.set -euo pipefail
REPLICATE_API_TOKEN="$(tr -d '\n' < "$HOME/Documents/.secrets/replicate-key")"
PROMPT="Retro 1970s style poster with the text 'Recraft V4' in bold groovy typography with rainbow gradient colors"
ASPECT_RATIO="1:1"
SIZE="1024x1024"
OUTPUT_FILE="output.svg"
if [ -z "$REPLICATE_API_TOKEN" ]; then
echo "Missing Replicate token in ~/Documents/.secrets/replicate-key" >&2
exit 1
fi
if [ "$ASPECT_RATIO" = "Not set" ]; then
REQUEST_BODY="$(python3 - <<'PY' "$PROMPT" "$SIZE"
import json, sys
prompt, size = sys.argv[1], sys.argv[2]
print(json.dumps({"input": {"prompt": prompt, "size": size}}))
PY
)"
else
REQUEST_BODY="$(python3 - <<'PY' "$PROMPT" "$ASPECT_RATIO"
import json, sys
prompt, aspect_ratio = sys.argv[1], sys.argv[2]
print(json.dumps({"input": {"prompt": prompt, "aspect_ratio": aspect_ratio}}))
PY
)"
fi
RESPONSE="$(curl --silent --show-error https://api.replicate.com/v1/models/recraft-ai/recraft-v4-svg/predictions \
--request POST \
--header "Authorization: Bearer $REPLICATE_API_TOKEN" \
--header "Content-Type: application/json" \
--header "Prefer: wait" \
--data "$REQUEST_BODY")"
OUTPUT_URL="$(python3 - <<'PY' "$RESPONSE"
import json, sys
payload = json.loads(sys.argv[1])
output = payload.get("output")
if isinstance(output, str):
print(output)
elif isinstance(output, list) and output:
print(output[0])
else:
raise SystemExit("No output URL found in Replicate response")
PY
)"
curl --silent --show-error --location "$OUTPUT_URL" --output "$OUTPUT_FILE"
echo "SVG saved to $OUTPUT_FILE"
echo "Output URL: $OUTPUT_URL"
401 Unauthorized: token missing or invalid. Check ~/Documents/.secrets/replicate-key.402 Payment Required: billing or quota issue on Replicate account.422 Unprocessable Entity: invalid aspect_ratio, size, or payload structure.