image-gen

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Image Generation & Editing Skill

图片生成与编辑技能

Use the
alma image
command to generate or edit images. It handles API keys, model selection, and everything automatically.
使用
alma image
命令生成或编辑图片。该命令会自动处理API密钥、模型选择等所有相关操作。

Generate an Image

生成图片

bash
alma image generate "detailed prompt describing the image"
The command outputs the file path to stdout. Then use
alma send photo <path>
to deliver it to the user.
bash
alma image generate "描述图片的详细提示词"
命令会在标准输出中返回文件路径。随后使用
alma send photo <path>
将图片发送给用户。

Edit an Image

编辑图片

bash
alma image edit /path/to/source.jpg "describe the changes you want"
bash
alma image edit /path/to/source.jpg "描述你想要的修改内容"

Selfies

自拍场景

For selfies, use the selfie skill instead — it handles face consistency, album management, and photorealistic prompting automatically.
若涉及自拍,请使用selfie技能——它会自动处理面部一致性、相册管理以及逼真的提示词设置。

Tips

提示技巧

  • Always write detailed prompts: style, setting, lighting, composition
  • After generating, send the image with
    alma send photo <path>
    — do NOT just paste the path in text
  • If you get rate limit errors, wait a moment and retry
  • The command auto-selects the best available Gemini image model
  • Always save selfies to build up your album for better face consistency over time
  • The
    --reference
    flag works with
    generate
    to inject a reference image for the AI to maintain appearance
  • NEVER assume the API is broken based on past errors. API errors (rate limits, temporary failures) are transient. ALWAYS try the command — never tell the user "the API is down" or "the key is invalid" without actually running the command first. Each attempt is independent.
  • 始终编写详细的提示词:包含风格、场景、光线、构图等信息
  • 生成图片后,使用
    alma send photo <path>
    发送图片——不要仅在文本中粘贴文件路径
  • 若遇到速率限制错误,请稍等片刻后重试
  • 命令会自动选择最佳可用的Gemini图片模型
  • 务必保存自拍,以逐步构建你的相册,提升后续的面部一致性效果
  • --reference
    标志可与
    generate
    命令配合使用,注入参考图片,让AI保持目标外观
  • 切勿根据过往错误就认定API已损坏。API错误(速率限制、临时故障)是暂时的。务必先尝试执行命令——在未实际运行命令的情况下,永远不要告诉用户“API已宕机”或“密钥无效”。每次尝试都是独立的。