agentleFS
yfpgle-glitchyfpgle-glitch/relay-imagegen/SKILL.md

relay-imagegen

Skill0 starsChanged 2 months agoMITView on GitHub

Generate or edit images through RC (Right Code, the AI image-generation API service at rightapi.ai). Use when the user says RC, Right Code, rightapi.ai, right.codes, or relay-imagegen, or an active image router selects RC. Also configure or check RC authentication. Do not override an explicit choice of the host's built-in image tool or another provider.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. weiweimhy/agent-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 7 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

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

    Use the bundled scripts/generate_image.py with Python 3.

    line 10
  2. Very specific:

    Default: RC, gpt-image-2.5, --size 16:9, --image-size 1K.

    line 18
  3. Very specific:

    Use --count N for N sequential single-image tasks.

    line 23
  4. Distinctive:

    Keep it simple: 2-4 words describing the main subject and action/scene

    line 27
  5. Distinctive:

    Use lowercase with hyphens, no special characters

    line 28
  6. Distinctive:

    If the user provides a filename, use it as-is.

    line 29
  7. Very specific:

    Use --help when other arguments are needed.

    line 30
  8. Distinctive:

    Read keys internally; never print them or request them in chat.

    line 40
  9. Very specific:

    Use the original output root when resuming, including the same explicit --output-dir if supplied.

    line 54
  10. Very specific:

    Every failure prints one JSON object: {"status": "error", "kind": ..., "message": ..., "checkpoint": ...}.

    line 57
  11. Very specific:

    Stop kinds (exit 2): auth_error (fix the key first), submission_ambiguous (submit outcome unknown — never resubmit blindly.

    line 58
  12. Distinctive:

    If no task can be recovered, allow at most three total submissions per intended image under the original request.

    line 60
  13. Distinctive:

    Never combine resume with a new prompt, references or multiple outputs.

    line 61
  14. Distinctive:

    Read final JSON. Display saved originals and link each image and matching prompt file.

    line 79
  15. Very specific:

    Keep asynchronous submission to https://www.rightapi.ai/draw/v1/images/generations and polling at …

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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

relay-imagegen

RC (Right Code) is an image-generation relay: the AI image-generation API service at rightapi.ai, relaying models such as gpt-image and nano-banana. This skill generates and edits images through RC; RC is the shorthand used throughout.

Use the bundled scripts/generate_image.py with Python 3. RC is the default; leave the Codex config.toml unchanged. Resolve scripts relative to this skill, regardless of the current project directory.

1. Generate or edit

python3 scripts/generate_image.py --prompt "一只戴着太空头盔的橘猫"

Default: RC, gpt-image-2.5, --size 16:9, --image-size 1K.

--image-size is model-dependent: gpt-image-2-vip honors 2K/4K (measured 2048x1152 / 3840x2160 at 16:9) and so does nano-banana-pro; gpt-image-2.5 and gpt-image-2 ignore the tier and render one fixed size per aspect ratio (1672x940 at 16:9). Use --model gpt-image-2-vip or nano-banana-pro when the user asks for 2K/4K.

  • Edit through RC by adding one --reference /absolute/path/image.png per reference.
  • Use --count N for N sequential single-image tasks. Provider field n stays 1.
  • Always provide --filename with a descriptive English name (without extension).
    • For non-English prompts, automatically generate a short, descriptive English filename based on the prompt content
    • Examples: --filename "orange-cat-astronaut", --filename "running-dog", --filename "sunset-mountain"
    • Keep it simple: 2-4 words describing the main subject and action/scene
    • Use lowercase with hyphens, no special characters
    • If the user provides a filename, use it as-is; otherwise generate one from the prompt
  • Use --help when other arguments are needed.

A request to generate or edit authorizes the requested images. State the selected provider and count briefly, then proceed.

Primary provider: RC is the default and preferred provider.

RC is the only provider in this Skill.

2. Keys

Read keys internally; never print them or request them in chat.

ProviderEnvironment variableKey file
RC (Right Code)RIGHT_CODES_API_KEY~/.config/right-code/api_key

For RC setup, run python3 scripts/configure_api_key.py, then --check; report status and saved path only. It uses hidden local input. If needed, link to registration and key creation. Local configuration checks do not prove live generation access. Do not generate a paid image solely to check a key unless the user requested a live test.

3. Recovery

python3 scripts/generate_image.py --resume-task-id TASK_ID

Use the original output root when resuming, including the same explicit --output-dir if supplied.

  • RC resumes remote polling without resubmitting. The client retries transient polling errors with bounded backoff.
  • Every failure prints one JSON object: {"status": "error", "kind": ..., "message": ..., "checkpoint": ...}. Exit code 2 means stop; exit code 3 means retryable — wait, then resume with --resume-task-id TASK_ID.
  • Stop kinds (exit 2): auth_error (fix the key first), submission_ambiguous (submit outcome unknown — never resubmit blindly; check the RC console for a charged task before any new submission), task_failed, unknown_status, bad_response, http_error, error.
  • Retryable kinds (exit 3): transient_poll, poll_timeout.
  • If no task can be recovered, allow at most three total submissions per intended image under the original request; stop for authentication failures, unexpected cost or an uncertain submission outcome.
  • Never combine resume with a new prompt, references or multiple outputs.

4. Output

Outputs use the project-local layout when a project root exists, otherwise the personal pictures library:

<project>/output/images/          (inside a project)
~/Pictures/AI-generates-images/   (no project root)
  YYYY-MM-DD/YYMMDD-HHMM-NNN-content.png
  .prompts/YYYY-MM-DD/YYMMDD-HHMM-NNN-content.md
  .tasks/rightcode/...

The nearest Git/Mercurial root takes precedence over package markers. Pass --output-dir to place images anywhere explicitly; never fall back to Downloads, Desktop or agent internal state. An explicit directory keeps hidden .prompts and .tasks sidecars. Existing artifacts are not deleted. RC still finds legacy generated_images/.tasks/rightcode checkpoints.

Prompt records contain the provider, model, size, operation, timestamp and full prompt, without secrets or temporary URLs. Task records may contain temporary image URLs for recovery. Generated artifacts are ignored by the managed output root's .gitignore.

Read final JSON. Display saved originals and link each image and matching prompt file. Report partial failures accurately; a model listing or quote is not a successful generation. Confirm image format and actual dimensions before reporting a live test as successful.

5. RC protocol

Keep asynchronous submission to https://www.rightapi.ai/draw/v1/images/generations and polling at https://www.rightapi.ai/v1/tasks/{task_id}. Preserve async: true, n: 1, immediate checkpoints, and completed responses containing URL/base64/inline images even without a status. Download original bytes before presenting results.

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.