一键导入
replicate-png-generation
Generate PNG images with Replicate via direct Bash HTTP calls. Use when you need PNG image generation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate PNG images with Replicate via direct Bash HTTP calls. Use when you need PNG 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-png-generation |
| description | Generate PNG images with Replicate via direct Bash HTTP calls. Use when you need PNG image generation. |
.png image using google/nano-banana-2 on Replicatecurl call to Replicate HTTP API~/Documents/.secrets/replicate-keyUse this skill when you need to generate a PNG image.
Required:
prompt (string) - The text description of the image to generate. Always required.aspect_ratio enum: 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9Optional:
google_search boolean (default: false)image_search boolean (default: false)output_format enum: jpg, png (default: jpg)Rules:
prompt is always required.aspect_ratio is always required.output_format use png to obtain a PNG image.stringuri.png file (when output_format=png).set -euo pipefail
REPLICATE_API_TOKEN="$(tr -d '\n' < "$HOME/Documents/.secrets/replicate-key")"
PROMPT="A photorealistic golden retriever playing in a sunny park"
ASPECT_RATIO="1:1"
GOOGLE_SEARCH="false"
IMAGE_SEARCH="false"
OUTPUT_FORMAT="png"
OUTPUT_FILE="output.png"
if [ -z "$REPLICATE_API_TOKEN" ]; then
echo "Missing Replicate token in ~/Documents/.secrets/replicate-key" >&2
exit 1
fi
REQUEST_BODY="$(python3 - <<'PY' "$PROMPT" "$ASPECT_RATIO" "$GOOGLE_SEARCH" "$IMAGE_SEARCH" "$OUTPUT_FORMAT"
import json, sys
prompt, aspect_ratio, google_search, image_search, output_format = sys.argv[1:7]
print(json.dumps({
"version": "71516450bdbeafc41df33ad538bc8cc6a90f80038a563b1260531c02d694f4fd",
"input": {
"prompt": prompt,
"aspect_ratio": aspect_ratio,
"google_search": google_search.lower() == "true",
"image_search": image_search.lower() == "true",
"output_format": output_format
}
}))
PY
)"
RESPONSE="$(curl --silent --show-error https://api.replicate.com/v1/models/google/nano-banana-2/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 "PNG 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 or payload structure.