[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DM5E2RJFT4NSF20Z6F6279":3,"skill-same:01M7DM5E2RJFT4NSF20Z6F6279":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":6,"ownerHtmlUrl":45,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":46,"install":47,"resources":60},"01M7DM5E2RJFT4NSF20Z6F6279","image-generator",null,"Generate and edit images using Gemini's Nano Banana Pro model (gemini-3-pro-image-preview). Use this skill when the user asks you to generate images, create visuals, edit photos, create logos, generate product mockups, or perform any image generation\u002Fediting task.","Hazek-dc\u002FPresensiGuru_FaceNet_EMAR","Hazek-dc","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F75208960?v=4","01M7DEQV5B4YGS86A81DYH81DR","Hazek","01M7DEQV5XP4TM0C6NTHXCXCHR",1,"MIT","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimage-generator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: image-generator\ndescription: Generate and edit images using Gemini's Nano Banana Pro model (gemini-3-pro-image-preview). Use this skill when the user asks you to generate images, create visuals, edit photos, create logos, generate product mockups, or perform any image generation\u002Fediting task.\nallowed-tools: Read, Write, Bash, WebFetch\ncategory: \"media\"\nrisk: \"safe\"\nsource: \"official\"\nsource_repo: \"dair-ai\u002Fdair-academy-plugins\"\nsource_type: \"official\"\ndate_added: \"2026-06-19\"\nauthor: \"DAIR.AI\"\nlicense: \"MIT\"\nlicense_source: \"https:\u002F\u002Fgithub.com\u002Fdair-ai\u002Fdair-academy-plugins\u002Fblob\u002Fmain\u002FREADME.md#license\"\ntags:\n  - dair-academy\n  - ai\n  - workflow\ntools:\n  - claude-code\n  - codex-cli\n  - cursor\n---\n\n# Image Generator\n\n## When to Use\n\nUse when this workflow matches the user request: Generate and edit images using Gemini's Nano Banana Pro model (gemini-3-pro-image-preview). Use this skill when the user asks you to generate images, create visuals, edit photos, create logos, generate product mockups, or perform any image generation\u002Fediting task.\n\n\n_Source: [dair-ai\u002Fdair-academy-plugins](https:\u002F\u002Fgithub.com\u002Fdair-ai\u002Fdair-academy-plugins) (MIT)._\n\nThis skill generates and edits images using Google's Gemini Nano Banana Pro model (`gemini-3-pro-image-preview`).\n\n## IMPORTANT: Setup Required\n\nBefore using this skill, the user must set the `GEMINI_API_KEY` environment variable:\n\n1. Get a free API key from [Google AI Studio](https:\u002F\u002Faistudio.google.com\u002F)\n2. Export the key in your shell profile (`~\u002F.zshrc`, `~\u002F.bashrc`, etc.):\n   ```bash\n   read -rsp \"Gemini API key: \" GEMINI_API_KEY\n   echo\n   export GEMINI_API_KEY\n   ```\n3. Restart your terminal or run `source ~\u002F.zshrc` (or `~\u002F.bashrc`)\n\n**The skill will not work without this configuration.**\n\n## Pre-flight Check\n\nBefore making any API call, verify the key is set:\n\n```bash\nif [ -z \"$GEMINI_API_KEY\" ]; then\n  echo \"ERROR: GEMINI_API_KEY is not set. Please export it in your shell profile.\"\n  exit 1\nfi\n```\n\nIf the key is missing, stop and tell the user to set it using the instructions above.\n\n## Configuration\n\n**Model**: `gemini-3-pro-image-preview`\n\n**API Key**: Read from the `GEMINI_API_KEY` environment variable\n\n## Iterating on User-Provided Images\n\nWhen the user provides a path to an image they want to edit or iterate on, use this workflow:\n\n### Step 1: Read and encode the image to base64\n\n```bash\n# Get the image path from user\nIMG_PATH=\"\u002Fpath\u002Fto\u002Fuser\u002Fimage.png\"\n\n# Detect mime type\nif [[ \"$IMG_PATH\" == *.png ]]; then\n    MIME_TYPE=\"image\u002Fpng\"\nelif [[ \"$IMG_PATH\" == *.jpg ]] || [[ \"$IMG_PATH\" == *.jpeg ]]; then\n    MIME_TYPE=\"image\u002Fjpeg\"\nelif [[ \"$IMG_PATH\" == *.webp ]]; then\n    MIME_TYPE=\"image\u002Fwebp\"\nelse\n    MIME_TYPE=\"image\u002Fpng\"\nfi\n\n# Encode to base64 (works on both macOS and Linux)\nif [[ \"$(uname)\" == \"Darwin\" ]]; then\n    IMG_BASE64=$(base64 -i \"$IMG_PATH\")\nelse\n    IMG_BASE64=$(base64 -w0 \"$IMG_PATH\")\nfi\n```\n\n### Step 2: Send image with edit prompt (File-Based Approach)\n\n**IMPORTANT:** Always use a file-based approach for the request body. Base64-encoded images are too large for command-line arguments and will cause \"argument list too long\" errors.\n\n```bash\n# User's edit request\nEDIT_PROMPT=\"Add a santa hat to the person in this image\"\n\n# Write request to a JSON file (avoids command line length limits)\ncat > \u002Ftmp\u002Fgemini_request.json \u003C\u003C JSONEOF\n{\n  \"contents\": [{\n    \"parts\": [\n      {\"text\": \"$EDIT_PROMPT\"},\n      {\n        \"inline_data\": {\n          \"mime_type\": \"$MIME_TYPE\",\n          \"data\": \"$IMG_BASE64\"\n        }\n      }\n    ]\n  }],\n  \"generationConfig\": {\n    \"responseModalities\": [\"TEXT\", \"IMAGE\"]\n  }\n}\nJSONEOF\n\n# Call the API using the file\ncurl -s -X POST \\\n  \"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fmodels\u002Fgemini-3-pro-image-preview:generateContent\" \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @\u002Ftmp\u002Fgemini_request.json > \u002Ftmp\u002Fgemini_response.json\n```\n\n### Step 3: Extract and save the edited image\n\n```bash\n# Extract image from response and save\npython3 -c \"\nimport json\nimport base64\n\nwith open('\u002Ftmp\u002Fgemini_response.json') as f:\n    data = json.load(f)\n\nfor part in data['candidates'][0]['content']['parts']:\n    if 'inlineData' in part:\n        img_data = part['inlineData']['data']\n        mime = part['inlineData']['mimeType']\n        ext = 'png' if 'png' in mime else 'jpg'\n        with open('edited_image.' + ext, 'wb') as out:\n            out.write(base64.b64decode(img_data))\n        print(f'Saved: edited_image.{ext}')\n    elif 'text' in part:\n        print(part['text'])\n\"\n```\n\n### Complete Example (File-Based)\n\nFor iterating on images, always use file-based requests:\n\n```bash\n# Variables\nIMG_PATH=\"\u002Fpath\u002Fto\u002Fimage.png\"\nEDIT_PROMPT=\"Make the background a sunset beach\"\nOUTPUT_PATH=\"edited_output.png\"\n# Detect mime type and encode\nMIME_TYPE=$([[ \"$IMG_PATH\" == *.png ]] && echo \"image\u002Fpng\" || echo \"image\u002Fjpeg\")\nIMG_BASE64=$(base64 -i \"$IMG_PATH\" 2>\u002Fdev\u002Fnull || base64 -w0 \"$IMG_PATH\")\n\n# Write request to file (required - base64 images are too large for command line)\ncat > \u002Ftmp\u002Fgemini_request.json \u003C\u003C JSONEOF\n{\n  \"contents\": [{\n    \"parts\": [\n      {\"text\": \"$EDIT_PROMPT\"},\n      {\"inline_data\": {\"mime_type\": \"$MIME_TYPE\", \"data\": \"$IMG_BASE64\"}}\n    ]\n  }],\n  \"generationConfig\": {\n    \"responseModalities\": [\"TEXT\", \"IMAGE\"]\n  }\n}\nJSONEOF\n\n# Call API and extract image\ncurl -s -X POST \\\n  \"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fmodels\u002Fgemini-3-pro-image-preview:generateContent\" \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @\u002Ftmp\u002Fgemini_request.json > \u002Ftmp\u002Fgemini_response.json\n\n# Save the output image\npython3 -c \"\nimport json, base64\nwith open('\u002Ftmp\u002Fgemini_response.json') as f:\n    data = json.load(f)\nfor part in data.get('candidates', [{}])[0].get('content', {}).get('parts', []):\n    if 'inlineData' in part:\n        with open('$OUTPUT_PATH', 'wb') as f:\n            f.write(base64.b64decode(part['inlineData']['data']))\n        print('Saved: $OUTPUT_PATH')\n\"\n```\n\n### Multi-Image Input (Combine\u002FCompose)\n\nTo combine elements from multiple images (also uses file-based approach):\n\n```bash\nIMG1_PATH=\"\u002Fpath\u002Fto\u002Fimage1.png\"\nIMG2_PATH=\"\u002Fpath\u002Fto\u002Fimage2.png\"\nPROMPT=\"Put the dress from the first image on the person in the second image\"\nIMG1_BASE64=$(base64 -i \"$IMG1_PATH\" 2>\u002Fdev\u002Fnull || base64 -w0 \"$IMG1_PATH\")\nIMG2_BASE64=$(base64 -i \"$IMG2_PATH\" 2>\u002Fdev\u002Fnull || base64 -w0 \"$IMG2_PATH\")\n\n# Write request to file\ncat > \u002Ftmp\u002Fgemini_request.json \u003C\u003C JSONEOF\n{\n  \"contents\": [{\n    \"parts\": [\n      {\"text\": \"$PROMPT\"},\n      {\"inline_data\": {\"mime_type\": \"image\u002Fpng\", \"data\": \"$IMG1_BASE64\"}},\n      {\"inline_data\": {\"mime_type\": \"image\u002Fpng\", \"data\": \"$IMG2_BASE64\"}}\n    ]\n  }],\n  \"generationConfig\": {\"responseModalities\": [\"TEXT\", \"IMAGE\"]}\n}\nJSONEOF\n\ncurl -s -X POST \\\n  \"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fmodels\u002Fgemini-3-pro-image-preview:generateContent\" \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @\u002Ftmp\u002Fgemini_request.json > \u002Ftmp\u002Fgemini_response.json\n```\n\n## Capabilities\n\n### Text-to-Image Generation\n- Generate high-quality images from text descriptions\n- Support for photorealistic, stylized, and artistic outputs\n- Accurate text rendering in images (logos, infographics, diagrams)\n\n### Image Editing\n- Add or remove elements from images\n- Inpainting with semantic masking (edit specific parts)\n- Style transfer (apply artistic styles to photos)\n- Multi-image composition (combine elements from multiple images)\n\n### Advanced Features\n- **High Resolution**: 1K, 2K, or 4K output\n- **Aspect Ratios**: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9\n- **Google Search Grounding**: Generate images based on real-time data\n- **Multi-turn Editing**: Iteratively refine images through conversation\n- **Up to 14 Reference Images**: Combine multiple inputs for complex compositions\n\n## API Usage\n\n### Basic Text-to-Image (Python)\n\n```python\nfrom google import genai\nfrom google.genai import types\n\nclient = genai.Client()\n\nresponse = client.models.generate_content(\n    model=\"gemini-3-pro-image-preview\",\n    contents=[\"Your prompt here\"],\n    config=types.GenerateContentConfig(\n        response_modalities=['TEXT', 'IMAGE'],\n        image_config=types.ImageConfig(\n            aspect_ratio=\"16:9\",  # Optional\n            image_size=\"2K\"       # Optional: \"1K\", \"2K\", \"4K\"\n        )\n    )\n)\n\nfor part in response.parts:\n    if part.text is not None:\n        print(part.text)\n    elif part.inline_data is not None:\n        image = part.as_image()\n        image.save(\"generated_image.png\")\n```\n\n### Basic Text-to-Image (JavaScript)\n\n```javascript\nimport { GoogleGenAI } from \"@google\u002Fgenai\";\nimport * as fs from \"node:fs\";\n\nconst ai = new GoogleGenAI({});\n\nconst response = await ai.models.generateContent({\n    model: \"gemini-3-pro-image-preview\",\n    contents: \"Your prompt here\",\n    config: {\n        responseModalities: ['TEXT', 'IMAGE'],\n        imageConfig: {\n            aspectRatio: \"16:9\",\n            imageSize: \"2K\"\n        }\n    }\n});\n\nfor (const part of response.candidates[0].content.parts) {\n    if (part.text) {\n        console.log(part.text);\n    } else if (part.inlineData) {\n        const buffer = Buffer.from(part.inlineData.data, \"base64\");\n        fs.writeFileSync(\"generated_image.png\", buffer);\n    }\n}\n```\n\n### REST API (curl)\n\n```bash\ncurl -s -X POST \\\n  \"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fmodels\u002Fgemini-3-pro-image-preview:generateContent\" \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"contents\": [{\n      \"parts\": [{\"text\": \"Your prompt here\"}]\n    }],\n    \"generationConfig\": {\n      \"responseModalities\": [\"TEXT\", \"IMAGE\"],\n      \"imageConfig\": {\n        \"aspectRatio\": \"16:9\",\n        \"imageSize\": \"2K\"\n      }\n    }\n  }' | jq -r '.candidates[0].content.parts[] | select(.inlineData) | .inlineData.data' | base64 --decode > output.png\n```\n\n### Image Editing (with input image)\n\n```python\nfrom google import genai\nfrom google.genai import types\nfrom PIL import Image\n\nclient = genai.Client()\n\ninput_image = Image.open('input.png')\nprompt = \"Add a wizard hat to the cat in this image\"\n\nresponse = client.models.generate_content(\n    model=\"gemini-3-pro-image-preview\",\n    contents=[prompt, input_image],\n    config=types.GenerateContentConfig(\n        response_modalities=['TEXT', 'IMAGE']\n    )\n)\n\nfor part in response.parts:\n    if part.inline_data is not None:\n        image = part.as_image()\n        image.save(\"edited_image.png\")\n```\n\n### Multi-Image Composition\n\n```python\nfrom google import genai\nfrom google.genai import types\nfrom PIL import Image\n\nclient = genai.Client()\n\nimage1 = Image.open('dress.png')\nimage2 = Image.open('model.png')\nprompt = \"Put the dress from the first image on the model from the second image\"\n\nresponse = client.models.generate_content(\n    model=\"gemini-3-pro-image-preview\",\n    contents=[image1, image2, prompt],\n    config=types.GenerateContentConfig(\n        response_modalities=['TEXT', 'IMAGE'],\n        image_config=types.ImageConfig(\n            aspect_ratio=\"3:4\",\n            image_size=\"2K\"\n        )\n    )\n)\n```\n\n### With Google Search Grounding\n\n```python\nfrom google import genai\nfrom google.genai import types\n\nclient = genai.Client()\n\nresponse = client.models.generate_content(\n    model=\"gemini-3-pro-image-preview\",\n    contents=\"Visualize the current weather forecast for San Francisco\",\n    config=types.GenerateContentConfig(\n        response_modalities=['TEXT', 'IMAGE'],\n        image_config=types.ImageConfig(aspect_ratio=\"16:9\"),\n        tools=[{\"google_search\": {}}]\n    )\n)\n```\n\n## Prompting Best Practices\n\n### 1. Be Descriptive, Not Keyword-Based\nInstead of: `cat, wizard hat, cute`\nWrite: `A fluffy orange cat wearing a small knitted wizard hat, sitting on a wooden floor with soft natural lighting from a window`\n\n### 2. Specify Style and Mood\n- Photography terms: \"shot with 85mm lens\", \"soft bokeh background\", \"golden hour lighting\"\n- Artistic styles: \"in the style of Van Gogh\", \"minimalist illustration\", \"photorealistic\"\n- Mood: \"warm and cozy atmosphere\", \"dramatic noir lighting\"\n\n### 3. For Text in Images\nBe explicit about:\n- The exact text to render\n- Font style (descriptively): \"clean, bold, sans-serif font\"\n- Placement and size\n\n### 4. For Editing\n- Describe what to change and what to preserve\n- Use \"keep everything else unchanged\"\n- Reference specific elements clearly\n\n### 5. For Product\u002FCommercial Images\nMention:\n- Lighting setup: \"three-point softbox lighting\"\n- Background: \"clean white studio background\"\n- Camera angle: \"slightly elevated 45-degree shot\"\n\n## Resolution and Aspect Ratio Reference\n\n| Aspect Ratio | 1K Resolution | 2K Resolution | 4K Resolution |\n|--------------|---------------|---------------|---------------|\n| 1:1          | 1024x1024     | 2048x2048     | 4096x4096     |\n| 16:9         | 1376x768      | 2752x1536     | 5504x3072     |\n| 9:16         | 768x1376      | 1536x2752     | 3072x5504     |\n| 3:2          | 1264x848      | 2528x1696     | 5056x3392     |\n| 2:3          | 848x1264      | 1696x2528     | 3392x5056     |\n\n## Common Use Cases\n\n### Logo Creation\n```\nCreate a modern, minimalist logo for a coffee shop called 'The Daily Grind'.\nThe text should be in a clean, bold, sans-serif font.\nBlack and white color scheme. Put the logo in a circle.\n```\n\n### Product Photography\n```\nA high-resolution, studio-lit product photograph of a minimalist ceramic\ncoffee mug in matte black on a polished concrete surface. Three-point\nsoftbox lighting with soft, diffused highlights. Slightly elevated\n45-degree camera angle. Sharp focus on steam rising from the coffee.\n```\n\n### Style Transfer\n```\nTransform this photograph of a city street at night into Vincent van Gogh's\n'Starry Night' style. Preserve the composition but render with swirling,\nimpasto brushstrokes and deep blues with bright yellows.\n```\n\n### Infographic\n```\nCreate a vibrant infographic explaining photosynthesis as a recipe.\nShow \"ingredients\" (sunlight, water, CO2) and \"finished dish\" (sugar\u002Fenergy).\nStyle like a colorful kids' cookbook, suitable for 4th graders.\n```\n\n## Error Handling\n\nCommon issues:\n- **No image returned**: Check that `response_modalities` includes `'IMAGE'`\n- **Safety filters**: Some prompts may be blocked; try rephrasing\n- **Rate limits**: Implement exponential backoff for retries\n- **Large images**: For 4K, ensure sufficient timeout settings\n\n## Dependencies\n\nTo use the Python SDK:\n```bash\npip install google-genai pillow\n```\n\nFor JavaScript:\n```bash\nnpm install @google\u002Fgenai\n```\n\n## Important Notes\n\n- All generated images include a SynthID watermark\n- The model uses a \"thinking\" process for complex prompts\n- For best text rendering, generate text first, then request image with that text\n- Images are not stored by the API - save outputs locally\n\n\n## Limitations\n\n- Requires the upstream tool, account, API key, or local setup when the workflow names one.\n- Does not authorize destructive, production, paid, or external-message actions without explicit user approval.\n- Validate generated artifacts or recommendations against the user's real sources before treating them as final.\n","# Image Generator\n\n## When to Use\n\nUse when this workflow matches the user request: Generate and edit images using Gemini's Nano Banana Pro model (gemini-3-pro-image-preview). Use this skill when the user asks you to generate images, create visuals, edit photos, create logos, generate product mockups, or perform any image generation\u002Fediting task.\n\n\n_Source: [dair-ai\u002Fdair-academy-plugins](https:\u002F\u002Fgithub.com\u002Fdair-ai\u002Fdair-academy-plugins) (MIT)._\n\nThis skill generates and edits images using Google's Gemini Nano Banana Pro model (`gemini-3-pro-image-preview`).\n\n## IMPORTANT: Setup Required\n\nBefore using this skill, the user must set the `GEMINI_API_KEY` environment variable:\n\n1. Get a free API key from [Google AI Studio](https:\u002F\u002Faistudio.google.com\u002F)\n2. Export the key in your shell profile (`~\u002F.zshrc`, `~\u002F.bashrc`, etc.):\n   ```bash\n   read -rsp \"Gemini API key: \" GEMINI_API_KEY\n   echo\n   export GEMINI_API_KEY\n   ```\n3. Restart your terminal or run `source ~\u002F.zshrc` (or `~\u002F.bashrc`)\n\n**The skill will not work without this configuration.**\n\n## Pre-flight Check\n\nBefore making any API call, verify the key is set:\n\n```bash\nif [ -z \"$GEMINI_API_KEY\" ]; then\n  echo \"ERROR: GEMINI_API_KEY is not set. Please export it in your shell profile.\"\n  exit 1\nfi\n```\n\nIf the key is missing, stop and tell the user to set it using the instructions above.\n\n## Configuration\n\n**Model**: `gemini-3-pro-image-preview`\n\n**API Key**: Read from the `GEMINI_API_KEY` environment variable\n\n## Iterating on User-Provided Images\n\nWhen the user provides a path to an image they want to edit or iterate on, use this workflow:\n\n### Step 1: Read and encode the image to base64\n\n```bash\n# Get the image path from user\nIMG_PATH=\"\u002Fpath\u002Fto\u002Fuser\u002Fimage.png\"\n\n# Detect mime type\nif [[ \"$IMG_PATH\" == *.png ]]; then\n    MIME_TYPE=\"image\u002Fpng\"\nelif [[ \"$IMG_PATH\" == *.jpg ]] || [[ \"$IMG_PATH\" == *.jpeg ]]; then\n    MIME_TYPE=\"image\u002Fjpeg\"\nelif [[ \"$IMG_PATH\" == *.webp ]]; then\n    MIME_TYPE=\"image\u002Fwebp\"\nelse\n    MIME_TYPE=\"image\u002Fpng\"\nfi\n\n# Encode to base64 (works on both macOS and Linux)\nif [[ \"$(uname)\" == \"Darwin\" ]]; then\n    IMG_BASE64=$(base64 -i \"$IMG_PATH\")\nelse\n    IMG_BASE64=$(base64 -w0 \"$IMG_PATH\")\nfi\n```\n\n### Step 2: Send image with edit prompt (File-Based Approach)\n\n**IMPORTANT:** Always use a file-based approach for the request body. Base64-encoded images are too large for command-line arguments and will cause \"argument list too long\" errors.\n\n```bash\n# User's edit request\nEDIT_PROMPT=\"Add a santa hat to the person in this image\"\n\n# Write request to a JSON file (avoids command line length limits)\ncat > \u002Ftmp\u002Fgemini_request.json \u003C\u003C JSONEOF\n{\n  \"contents\": [{\n    \"parts\": [\n      {\"text\": \"$EDIT_PROMPT\"},\n      {\n        \"inline_data\": {\n          \"mime_type\": \"$MIME_TYPE\",\n          \"data\": \"$IMG_BASE64\"\n        }\n      }\n    ]\n  }],\n  \"generationConfig\": {\n    \"responseModalities\": [\"TEXT\", \"IMAGE\"]\n  }\n}\nJSONEOF\n\n# Call the API using the file\ncurl -s -X POST \\\n  \"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fmodels\u002Fgemini-3-pro-image-preview:generateContent\" \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @\u002Ftmp\u002Fgemini_request.json > \u002Ftmp\u002Fgemini_response.json\n```\n\n### Step 3: Extract and save the edited image\n\n```bash\n# Extract image from response and save\npython3 -c \"\nimport json\nimport base64\n\nwith open('\u002Ftmp\u002Fgemini_response.json') as f:\n    data = json.load(f)\n\nfor part in data['candidates'][0]['content']['parts']:\n    if 'inlineData' in part:\n        img_data = part['inlineData']['data']\n        mime = part['inlineData']['mimeType']\n        ext = 'png' if 'png' in mime else 'jpg'\n        with open('edited_image.' + ext, 'wb') as out:\n            out.write(base64.b64decode(img_data))\n        print(f'Saved: edited_image.{ext}')\n    elif 'text' in part:\n        print(part['text'])\n\"\n```\n\n### Complete Example (File-Based)\n\nFor iterating on images, always use file-based requests:\n\n```bash\n# Variables\nIMG_PATH=\"\u002Fpath\u002Fto\u002Fimage.png\"\nEDIT_PROMPT=\"Make the background a sunset beach\"\nOUTPUT_PATH=\"edited_output.png\"\n# Detect mime type and encode\nMIME_TYPE=$([[ \"$IMG_PATH\" == *.png ]] && echo \"image\u002Fpng\" || echo \"image\u002Fjpeg\")\nIMG_BASE64=$(base64 -i \"$IMG_PATH\" 2>\u002Fdev\u002Fnull || base64 -w0 \"$IMG_PATH\")\n\n# Write request to file (required - base64 images are too large for command line)\ncat > \u002Ftmp\u002Fgemini_request.json \u003C\u003C JSONEOF\n{\n  \"contents\": [{\n    \"parts\": [\n      {\"text\": \"$EDIT_PROMPT\"},\n      {\"inline_data\": {\"mime_type\": \"$MIME_TYPE\", \"data\": \"$IMG_BASE64\"}}\n    ]\n  }],\n  \"generationConfig\": {\n    \"responseModalities\": [\"TEXT\", \"IMAGE\"]\n  }\n}\nJSONEOF\n\n# Call API and extract image\ncurl -s -X POST \\\n  \"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fmodels\u002Fgemini-3-pro-image-preview:generateContent\" \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @\u002Ftmp\u002Fgemini_request.json > \u002Ftmp\u002Fgemini_response.json\n\n# Save the output image\npython3 -c \"\nimport json, base64\nwith open('\u002Ftmp\u002Fgemini_response.json') as f:\n    data = json.load(f)\nfor part in data.get('candidates', [{}])[0].get('content', {}).get('parts', []):\n    if 'inlineData' in part:\n        with open('$OUTPUT_PATH', 'wb') as f:\n            f.write(base64.b64decode(part['inlineData']['data']))\n        print('Saved: $OUTPUT_PATH')\n\"\n```\n\n### Multi-Image Input (Combine\u002FCompose)\n\nTo combine elements from multiple images (also uses file-based approach):\n\n```bash\nIMG1_PATH=\"\u002Fpath\u002Fto\u002Fimage1.png\"\nIMG2_PATH=\"\u002Fpath\u002Fto\u002Fimage2.png\"\nPROMPT=\"Put the dress from the first image on the person in the second image\"\nIMG1_BASE64=$(base64 -i \"$IMG1_PATH\" 2>\u002Fdev\u002Fnull || base64 -w0 \"$IMG1_PATH\")\nIMG2_BASE64=$(base64 -i \"$IMG2_PATH\" 2>\u002Fdev\u002Fnull || base64 -w0 \"$IMG2_PATH\")\n\n# Write request to file\ncat > \u002Ftmp\u002Fgemini_request.json \u003C\u003C JSONEOF\n{\n  \"contents\": [{\n    \"parts\": [\n      {\"text\": \"$PROMPT\"},\n      {\"inline_data\": {\"mime_type\": \"image\u002Fpng\", \"data\": \"$IMG1_BASE64\"}},\n      {\"inline_data\": {\"mime_type\": \"image\u002Fpng\", \"data\": \"$IMG2_BASE64\"}}\n    ]\n  }],\n  \"generationConfig\": {\"responseModalities\": [\"TEXT\", \"IMAGE\"]}\n}\nJSONEOF\n\ncurl -s -X POST \\\n  \"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fmodels\u002Fgemini-3-pro-image-preview:generateContent\" \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @\u002Ftmp\u002Fgemini_request.json > \u002Ftmp\u002Fgemini_response.json\n```\n\n## Capabilities\n\n### Text-to-Image Generation\n- Generate high-quality images from text descriptions\n- Support for photorealistic, stylized, and artistic outputs\n- Accurate text rendering in images (logos, infographics, diagrams)\n\n### Image Editing\n- Add or remove elements from images\n- Inpainting with semantic masking (edit specific parts)\n- Style transfer (apply artistic styles to photos)\n- Multi-image composition (combine elements from multiple images)\n\n### Advanced Features\n- **High Resolution**: 1K, 2K, or 4K output\n- **Aspect Ratios**: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9\n- **Google Search Grounding**: Generate images based on real-time data\n- **Multi-turn Editing**: Iteratively refine images through conversation\n- **Up to 14 Reference Images**: Combine multiple inputs for complex compositions\n\n## API Usage\n\n### Basic Text-to-Image (Python)\n\n```python\nfrom google import genai\nfrom google.genai import types\n\nclient = genai.Client()\n\nresponse = client.models.generate_content(\n    model=\"gemini-3-pro-image-preview\",\n    contents=[\"Your prompt here\"],\n    config=types.GenerateContentConfig(\n        response_modalities=['TEXT', 'IMAGE'],\n        image_config=types.ImageConfig(\n            aspect_ratio=\"16:9\",  # Optional\n            image_size=\"2K\"       # Optional: \"1K\", \"2K\", \"4K\"\n        )\n    )\n)\n\nfor part in response.parts:\n    if part.text is not None:\n        print(part.text)\n    elif part.inline_data is not None:\n        image = part.as_image()\n        image.save(\"generated_image.png\")\n```\n\n### Basic Text-to-Image (JavaScript)\n\n```javascript\nimport { GoogleGenAI } from \"@google\u002Fgenai\";\nimport * as fs from \"node:fs\";\n\nconst ai = new GoogleGenAI({});\n\nconst response = await ai.models.generateContent({\n    model: \"gemini-3-pro-image-preview\",\n    contents: \"Your prompt here\",\n    config: {\n        responseModalities: ['TEXT', 'IMAGE'],\n        imageConfig: {\n            aspectRatio: \"16:9\",\n            imageSize: \"2K\"\n        }\n    }\n});\n\nfor (const part of response.candidates[0].content.parts) {\n    if (part.text) {\n        console.log(part.text);\n    } else if (part.inlineData) {\n        const buffer = Buffer.from(part.inlineData.data, \"base64\");\n        fs.writeFileSync(\"generated_image.png\", buffer);\n    }\n}\n```\n\n### REST API (curl)\n\n```bash\ncurl -s -X POST \\\n  \"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fmodels\u002Fgemini-3-pro-image-preview:generateContent\" \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"contents\": [{\n      \"parts\": [{\"text\": \"Your prompt here\"}]\n    }],\n    \"generationConfig\": {\n      \"responseModalities\": [\"TEXT\", \"IMAGE\"],\n      \"imageConfig\": {\n        \"aspectRatio\": \"16:9\",\n        \"imageSize\": \"2K\"\n      }\n    }\n  }' | jq -r '.candidates[0].content.parts[] | select(.inlineData) | .inlineData.data' | base64 --decode > output.png\n```\n\n### Image Editing (with input image)\n\n```python\nfrom google import genai\nfrom google.genai import types\nfrom PIL import Image\n\nclient = genai.Client()\n\ninput_image = Image.open('input.png')\nprompt = \"Add a wizard hat to the cat in this image\"\n\nresponse = client.models.generate_content(\n    model=\"gemini-3-pro-image-preview\",\n    contents=[prompt, input_image],\n    config=types.GenerateContentConfig(\n        response_modalities=['TEXT', 'IMAGE']\n    )\n)\n\nfor part in response.parts:\n    if part.inline_data is not None:\n        image = part.as_image()\n        image.save(\"edited_image.png\")\n```\n\n### Multi-Image Composition\n\n```python\nfrom google import genai\nfrom google.genai import types\nfrom PIL import Image\n\nclient = genai.Client()\n\nimage1 = Image.open('dress.png')\nimage2 = Image.open('model.png')\nprompt = \"Put the dress from the first image on the model from the second image\"\n\nresponse = client.models.generate_content(\n    model=\"gemini-3-pro-image-preview\",\n    contents=[image1, image2, prompt],\n    config=types.GenerateContentConfig(\n        response_modalities=['TEXT', 'IMAGE'],\n        image_config=types.ImageConfig(\n            aspect_ratio=\"3:4\",\n            image_size=\"2K\"\n        )\n    )\n)\n```\n\n### With Google Search Grounding\n\n```python\nfrom google import genai\nfrom google.genai import types\n\nclient = genai.Client()\n\nresponse = client.models.generate_content(\n    model=\"gemini-3-pro-image-preview\",\n    contents=\"Visualize the current weather forecast for San Francisco\",\n    config=types.GenerateContentConfig(\n        response_modalities=['TEXT', 'IMAGE'],\n        image_config=types.ImageConfig(aspect_ratio=\"16:9\"),\n        tools=[{\"google_search\": {}}]\n    )\n)\n```\n\n## Prompting Best Practices\n\n### 1. Be Descriptive, Not Keyword-Based\nInstead of: `cat, wizard hat, cute`\nWrite: `A fluffy orange cat wearing a small knitted wizard hat, sitting on a wooden floor with soft natural lighting from a window`\n\n### 2. Specify Style and Mood\n- Photography terms: \"shot with 85mm lens\", \"soft bokeh background\", \"golden hour lighting\"\n- Artistic styles: \"in the style of Van Gogh\", \"minimalist illustration\", \"photorealistic\"\n- Mood: \"warm and cozy atmosphere\", \"dramatic noir lighting\"\n\n### 3. For Text in Images\nBe explicit about:\n- The exact text to render\n- Font style (descriptively): \"clean, bold, sans-serif font\"\n- Placement and size\n\n### 4. For Editing\n- Describe what to change and what to preserve\n- Use \"keep everything else unchanged\"\n- Reference specific elements clearly\n\n### 5. For Product\u002FCommercial Images\nMention:\n- Lighting setup: \"three-point softbox lighting\"\n- Background: \"clean white studio background\"\n- Camera angle: \"slightly elevated 45-degree shot\"\n\n## Resolution and Aspect Ratio Reference\n\n| Aspect Ratio | 1K Resolution | 2K Resolution | 4K Resolution |\n|--------------|---------------|---------------|---------------|\n| 1:1          | 1024x1024     | 2048x2048     | 4096x4096     |\n| 16:9         | 1376x768      | 2752x1536     | 5504x3072     |\n| 9:16         | 768x1376      | 1536x2752     | 3072x5504     |\n| 3:2          | 1264x848      | 2528x1696     | 5056x3392     |\n| 2:3          | 848x1264      | 1696x2528     | 3392x5056     |\n\n## Common Use Cases\n\n### Logo Creation\n```\nCreate a modern, minimalist logo for a coffee shop called 'The Daily Grind'.\nThe text should be in a clean, bold, sans-serif font.\nBlack and white color scheme. Put the logo in a circle.\n```\n\n### Product Photography\n```\nA high-resolution, studio-lit product photograph of a minimalist ceramic\ncoffee mug in matte black on a polished concrete surface. Three-point\nsoftbox lighting with soft, diffused highlights. Slightly elevated\n45-degree camera angle. Sharp focus on steam rising from the coffee.\n```\n\n### Style Transfer\n```\nTransform this photograph of a city street at night into Vincent van Gogh's\n'Starry Night' style. Preserve the composition but render with swirling,\nimpasto brushstrokes and deep blues with bright yellows.\n```\n\n### Infographic\n```\nCreate a vibrant infographic explaining photosynthesis as a recipe.\nShow \"ingredients\" (sunlight, water, CO2) and \"finished dish\" (sugar\u002Fenergy).\nStyle like a colorful kids' cookbook, suitable for 4th graders.\n```\n\n## Error Handling\n\nCommon issues:\n- **No image returned**: Check that `response_modalities` includes `'IMAGE'`\n- **Safety filters**: Some prompts may be blocked; try rephrasing\n- **Rate limits**: Implement exponential backoff for retries\n- **Large images**: For 4K, ensure sufficient timeout settings\n\n## Dependencies\n\nTo use the Python SDK:\n```bash\npip install google-genai pillow\n```\n\nFor JavaScript:\n```bash\nnpm install @google\u002Fgenai\n```\n\n## Important Notes\n\n- All generated images include a SynthID watermark\n- The model uses a \"thinking\" process for complex prompts\n- For best text rendering, generate text first, then request image with that text\n- Images are not stored by the API - save outputs locally\n\n\n## Limitations\n\n- Requires the upstream tool, account, API key, or local setup when the workflow names one.\n- Does not authorize destructive, production, paid, or external-message actions without explicit user approval.\n- Validate generated artifacts or recommendations against the user's real sources before treating them as final.\n",{"name":5,"risk":24,"tags":25,"tools":29,"author":33,"source":34,"license":15,"category":35,"date_added":36,"description":7,"source_repo":37,"source_type":34,"allowed-tools":38,"license_source":39},"safe",[26,27,28],"dair-academy","ai","workflow",[30,31,32],"claude-code","codex-cli","cursor","DAIR.AI","official","media","2026-06-19","dair-ai\u002Fdair-academy-plugins","Read, Write, Bash, WebFetch","https:\u002F\u002Fgithub.com\u002Fdair-ai\u002Fdair-academy-plugins\u002Fblob\u002Fmain\u002FREADME.md#license","main","b1e4ffadb4f933bbbcaa03a83f8b9929171ac28b",".agents\u002Fskills\u002Fimage-generator",0,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR","https:\u002F\u002Fgithub.com\u002FHazek-dc","2026-10-22 08:36:44",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill image-generator",{"tool":53,"command":54},"bunx","bunx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill image-generator",{"tool":56,"command":57},"pnpm","pnpm dlx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill image-generator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimage-generator\u002FSKILL.md",true,[61],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},".env.example","OTHER","其他",255,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimage-generator\u002F.env.example",[68,75,82,89,96,103],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7DS6GGYRZAYD33PFPS8Z2T3","testing-best-practices","Laravel test design and review. Use when selecting coverage, naming or structuring tests, choosing assertions or test data, isolating dependencies, testing HTTP or security boundaries, improving suite performance, or reviewing test value. Use framework guidance or search-docs for Pest and PHPUnit syntax.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Ftesting-best-practices\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7DS6BC3AW7HTPRHE2TTVKWM","tailwindcss-development","Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex\u002Fgrid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3\u002Fv4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML\u002FCSS component, CSS file audits, build tool configuration, and vanilla CSS.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Ftailwindcss-development\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7DS66GE6B11MYJDVC74HXM4","laravel-best-practices","Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization and security patterns, validation, error handling, queue and job configuration, route definitions, and architectural decisions. Also use for Laravel code reviews and refactoring existing Laravel code to follow best practices. Covers any task involving Laravel backend PHP code patterns.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Flaravel-best-practices\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7DS5ZW717DMS6P1E90AQCKV","infer-conventions","Use this skill to analyze how a Laravel application is actually written and record its conventions as shared rules. Trigger when the user wants to detect, infer, document, or standardize project conventions or coding style, set up or grow `.ai\u002Frules`, resolve mixed or conflicting patterns (e.g. \"are we using Form Requests or inline validation?\"), or onboard agents and teammates to \"how we do things here\". Covers: a systematic sweep of ~49 Laravel convention dimensions (validation, models, architecture, testing, frontend, database, console), open-ended house-pattern discovery, conflict reporting, and recording rules scoped to the right paths via the Boost `record-rule` MCP tool. Only run this skill when the user explicitly asks for it; never start a sweep as part of another task. Do not use for one-off code review, enforcing formatting a linter already handles, or editing `.ai\u002Frules` files by hand.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Finfer-conventions\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7DS5W12RGCVJTFQJ1N0GB8E","inertia-react-development","Develops Inertia.js v2 React client-side applications. Activates when creating React pages, forms, or navigation; using \u003CLink>, \u003CForm>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions React with Inertia, React pages, React forms, or React navigation.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Finertia-react-development\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7DS5PVDPMPCWSK2RXPDC9BB","deploying-to-cloud","Deploys and manages Laravel applications on Laravel Cloud using the `cloud` CLI. Use when the user wants to deploy an app, ship to Cloud, create or manage applications, environments, databases, caches, object storage, queues, domains, instances, background processes, secrets, compute, scheduled tasks, or Laravel Cloud infrastructure; or check billing, usage, or spend. Triggers on deployment, shipping, Cloud management, environment setup, database provisioning, billing or usage queries, the `cloud` CLI, and Laravel Cloud deployment troubleshooting.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Fdeploying-to-cloud\u002FSKILL.md",[],[]]