vertex-image-artifact
Skill1 starsChanged 5 months agoMITView on GitHub
Generate one image with ShortAPI Nano Banana 2 and save it as a generated artifact. Triggers include: 生成图片, 生成以下图片, 帮我生成图片, 画一张, 生图, generate image, create image, render image.
- Reads credentials
In this repository7 other files it gives its agents.
- documentsSkill
- docxSkill
- Code ExplainerSkill
- fireworks-tech-graphSkill
- pdfSkill
- PresentationsSkill
- SpreadsheetsSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 105
Use the Artifact tool exactly once with the artifact_file_path printed above.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Image Artifact Generation
Generate one image with ShortAPI Nano Banana 2, then save the generated image as an artifact.
The shell step below calls ShortAPI POST /job/create, polls GET /job/query?id=..., downloads the generated image, and writes it into the current user's workspace. It expects SHORTAPI_KEY; by default it uses SHORTAPI_API_BASE=https://api.shortapi.ai/api/v1 and SHORTAPI_IMAGE_MODEL=google/nano-banana-2/text-to-image.
ShortAPI generation uses args.prompt, args.aspect_ratio, args.resolution, and args.num_images. It defaults to SHORTAPI_IMAGE_ASPECT_RATIO=1:1, SHORTAPI_IMAGE_RESOLUTION=2k, and SHORTAPI_IMAGE_NUM_IMAGES=1 when the user does not specify a ratio.
The script parses image options from the user prompt before calling ShortAPI:
--ar 1:1,--ar=1:1,--aspect-ratio 1:1, or--aspect-ratio=1:1- Supported aspect ratios are
1:1,3:4,4:3,16:9, and9:16 - Unsupported numeric ratios are normalized to the nearest supported image-provider ratio and reported as
aspect_ratio_note - Parsed flags are removed from the prompt sent to ShortAPI
python3 "${CLAUDE_SKILL_DIR}/generate_vertex_image.py" <<'VERTEX_IMAGE_PROMPT'
$ARGUMENTS
VERTEX_IMAGE_PROMPTUse the Artifact tool exactly once with the artifact_file_path printed above. The value is intentionally relative to the current workspace; do not rewrite it as an absolute path.
filename: use the printedfilenamecontent_type: use the printedcontent_typefile_path: use the printedartifact_file_path
If the shell output contains skill_error:, do not call the Artifact tool. Reply in the user's language with the friendly error from skill_error: and, when useful, a concise next step. Do not expose raw provider JSON, stack traces, shell commands, auth tokens, artifact IDs, object paths, or download paths to the user.
The shell output may contain skill_log: {...} diagnostic lines. These are for backend execution history only. Do not summarize, quote, or expose them to the user.
After the Artifact tool succeeds, do not expose raw JSON, artifact IDs, object paths, or download paths to the user. Use the tool result only as internal context, then reply in natural language that the image is ready and can be viewed in the Artifacts panel. Mention the generated filename only if it helps the user identify the asset, and offer a concise next step such as revising the prompt or generating another variant.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

