happycode-imagegen

Installation
SKILL.md

HappyCode Image Gen

Use only the HappyCode clients in <SKILL_DIR>/scripts; do not call the built-in image_gen tool or another provider. Run the client directly after reading this file. Do not inspect other skill files, read config.json, run tests, probe the API, or perform setup unless the client returns CONFIG_REQUIRED. The clients own authentication, request defaults, proxying, timeout, downloads, PNG validation, and output creation.

Decide And Prompt

  1. Treat a request without an input image as generation. Treat a requested change to an existing image as an edit; ask for a target only when none is available.
  2. Identify each supplied image as an edit target, reference, mask, or supporting input. Pass every relevant non-mask image with repeated --image; use --mask only for a supplied mask.
  3. Ask another question only when a missing detail makes execution impossible.
  4. Pass the user's request verbatim as the --prompt argument, except for the batch transformation below. Do not translate, paraphrase, expand, censor, or add style, content, negative, or preservation instructions. Resolve pronouns only when selecting inputs.
  5. Shell-quote every dynamic argument so the client receives the exact prompt and paths as argument values.

Track Edit Inputs

  • Internally remember the input target for every successful SAVED path; a text-only generation has no input. Do not print or persist this bookkeeping.
  • For a normal follow-up, edit the latest successful result.
  • If the user rejects the latest result, apply the correction to its remembered input target instead of the rejected image. If it had no input, generate again without --image. Preserve all other explicit requirements.
  • For a batch, keep each saved path associated with its BATCH_RESULT index. Resolve ordinal references such as "the second image" by that index; ask which image only when a follow-up does not identify one of multiple results.
Installs
153
GitHub Stars
1
First Seen
Jul 17, 2026