agentleFS
HaumerHaumer/claude-skills/skills/gemini/SKILL.md

gemini

Skill0 starsChanged 2 months agoMITView on GitHub

Call the Gemini API from the shell — image generation (nano-banana bakes: pack shots, reveal scene layers, card art) and text. Handles key lookup, reference-image composition, base64 output decoding.

  • Reads credentials

63 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use voice-call, BlueBubbles and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • seedprodSkill

    voice-call

    Start voice calls via the OpenClaw voice-call plugin.

    Also in 14 projects that use this

  • jiulingyunSkill

    BlueBubbles

    为Clawdbot构建或更新BlueBubbles外部通道插件(扩展包,REST发送/探测,webhook入站)。

    Also in 14 projects that use this

  • AlekseiULSkill

    TubeScribe

    YouTube video summarizer with speaker detection, formatted documents, and audio output. Works out of the box with macOS built-in TTS. Optional recommended tools (pandoc, ffmpeg, mlx-audio) enhance quality. Requires internet for YouTube access. No paid APIs or subscriptions. Use when user sends a YouTube URL or asks to summarize/transcribe a YouTube video.

    Also in 3 projects that use this

  • seedprodSkill

    imsg

    iMessage/SMS CLI for listing chats, history, watch, and sending.

    Also in 15 projects that use this

  • AtomicBot-aiSkill

    taskflow-inbox-triage

    Also in 4 projects that use this

  • jiulingyunSkill

    SAG

    具有mac风格say用户体验的ElevenLabs文本转语音。

    Also in 15 projects that use this

  • +6 more from seedprod

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 58 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If missing, STOP and ask the user to provide one (aistudio.google.com/apikey).

    line 18
  2. Very specific:

    Default for all image work.

    line 26
  3. Very specific:

    If a model 404s, list what this key can see: curl -s "https://generativelanguage.googleapis.com/v1beta/models?key=$GEMINI_API_KEY" | jq -r …

    line 29

“Common” is measured: kept by at least 6 in 10 of the 58 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/gemini — call Gemini from the shell

Generate or edit images (and run text prompts) against the Gemini API with plain curl. Built for product asset bakes: pack shots, reveal scene layers, card heroes. No SDK, no deps beyond curl, jq, base64.

0. Key

[ -n "$GEMINI_API_KEY" ] || echo "MISSING KEY"

If missing, STOP and ask the user to provide one (aistudio.google.com/apikey). Suggest they run ! export GEMINI_API_KEY=... for the session, or add it to ~/.zshenv for persistence. Never paste the key into files that could be committed; never echo it into output.

1. Models

  • gemini-2.5-flash-image — image generation + editing ("nano-banana"). Default for all image work. Supports reference images (composition/editing) and imageConfig.aspectRatio.
  • gemini-2.5-flash — text; gemini-2.5-pro — harder text/reasoning.
  • If a model 404s, list what this key can see: curl -s "https://generativelanguage.googleapis.com/v1beta/models?key=$GEMINI_API_KEY" | jq -r '.models[].name'

2. Text → image

curl -s "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" -H "Content-Type: application/json" \
  -d @- <<'JSON' > /tmp/gem-out.json
{
  "contents": [{ "parts": [{ "text": "PROMPT HERE" }] }],
  "generationConfig": {
    "responseModalities": ["IMAGE"],
    "imageConfig": { "aspectRatio": "3:4" }
  }
}
JSON
jq -r '.candidates[0].content.parts[] | select(.inlineData) | .inlineData.data' /tmp/gem-out.json \
  | base64 -d > out.png

Aspect ratios: 1:1 2:3 3:2 3:4 4:3 9:16 16:9 (card fronts: 3:4; full-screen phone scenes: 9:16).

3. Reference image(s) + prompt (the bake)

Attach input images as parts alongside the text. This is how pack shots keep the real product and how scenes stay on-brand:

IMG=$(base64 -i input.png | tr -d '\n')
jq -n --arg img "$IMG" --arg prompt "PROMPT" '{
  contents: [{ parts: [
    { inline_data: { mime_type: "image/png", data: $img } },
    { text: $prompt }
  ]}],
  generationConfig: { responseModalities: ["IMAGE"], imageConfig: { aspectRatio: "3:4" } }
}' | curl -s "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" -H "Content-Type: application/json" -d @- > /tmp/gem-out.json

Multiple references: multiple inline_data parts. Decode as in §2.

Failure handling: if there's no inlineData in the response, print jq '.candidates[0].finishReason, .promptFeedback' /tmp/gem-out.json and read the text parts — safety blocks and prompt refusals come back as text.

4. House rules for bakes (opinionated defaults — edit for your brand)

  • Pack shots: QR small and on the BACK; fronts carry branding, never QR-as-hero. AI-generated EANs never scan — don't fake barcodes as real.
  • Reveal/card scenes: generate LAYERS when possible — background scene and product hero separately (hero re-lit, on transparency or flat background for later removal) — so code can parallax them. One flat composite is the fallback, not the goal. Card fronts 3:4; full-screen reveal scenes 9:16.
  • Brand voice: premium/tactile, story-rich; no confetti-arcade styling, no text baked into images (type is set in HTML/SVG, never rasterized).
  • Generated assets are drafts: show the user before wiring anything in, and never commit binaries without their say-so.

5. Iterating

Regenerate with the previous output as a reference part plus the correction ("same scene, warmer light, jar 20% smaller"). Keep prompts in a scratchpad file so a good recipe can be replayed; a bake worth keeping should have its prompt recorded next to the asset it produced.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.