跳到主要内容
知仓学习社ZHICANG

imagen

|

执行命令读凭据联网严重 3 · 高危 4sanjay3290/ai-skills

它会碰到什么

扫了多少6 个文本文件,35 KB
它会碰到什么执行命令读凭据联网
命中总数15 处
命中统计严重 3 · 高 4 · 中 4 · 低 4
逐条看命中(7 条严重或高危)
  • 严重 README.md:38persistence
    echo 'export GEMINI_API_KEY="your-api-key-here"' >> ~/.zshrc
  • 严重 README.md:130cred-paths
    ├── .env.example           # API key template
  • 严重 reference.md:33persistence
    echo 'export GEMINI_API_KEY="your-api-key-here"' >> ~/.zshrc
  • scripts/generate_image.py:42cred-envread
    api_key = os.environ.get("GEMINI_API_KEY")
  • scripts/generate_image.py:46cred-envread
    print("  Windows (PowerShell): $env:GEMINI_API_KEY = 'your-key'", file=sys.stderr)
  • scripts/generate_image.py:254cred-envread
    model_id = args.model or os.environ.get("GEMINI_MODEL", DEFAULT_MODEL_ID)
  • scripts/generate_image.py:255cred-envread
    image_size = args.size or os.environ.get("IMAGE_SIZE", DEFAULT_IMAGE_SIZE)

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Imagen - AI Image Generation Skill

Overview

This skill generates images using Google Gemini's image generation model (gemini-3-pro-image-preview). It enables seamless image creation during any Claude Code session - whether you're building frontend UIs, creating documentation, or need visual representations of concepts.

Cross-Platform: Works on Windows, macOS, and Linux.

When to Use This Skill

Automatically activate this skill when:

  • User requests image generation (e.g., "generate an image of...", "create a picture...")
  • Frontend development requires placeholder or actual images
  • Documentation needs illustrations or diagrams
  • Visualizing concepts, architectures, or ideas
  • Creating icons, logos, or UI assets
  • Any task where an AI-generated image would be helpful

How It Works

  1. Takes a text prompt describing the desired image
  2. Calls Google Gemini API with image generation configuration
  3. Saves the generated image to a specified location (defaults to current directory)
  4. Returns the file path for use in your project

Usage

Python (Cross-Platform - Recommended)

# Basic usage
python scripts/generate_image.py "A futuristic city skyline at sunset"

# With custom output path
python scripts/generate_image.py "A minimalist app icon for a music player" "./assets/icons/music-icon.png"

# With custom size
python scripts/generate_image.py --size 2K "High resolution landscape" "./wallpaper.png"

Requirements

  • GEMINI_API_KEY environment variable must be set
  • Python 3.6+ (uses standard library only, no pip install needed)

Output

Generated images are saved as PNG files. The script returns:

  • Success: Path to the generated image
  • Failure: Error message with details

Examples

Frontend Development

User: "I need a hero image for my landing page - something abstract and tech-focused"
-> Generates and saves image, provides path for use in HTML/CSS

Documentation

User: "Create a diagram showing microservices architecture"
-> Generates visual representation, ready for README or docs

UI Assets

User: "Generate a placeholder avatar image for the user profile component"
-> Creates image in appropriate size for component use

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 424
本站分层T2
该仓技能数24
原文件路径skills/imagen/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 24 个技能