cascade-img GEMINI.md

cascade-img GEMINI.md is an instructions file for Gemini CLI from laffeyp/cascade-img. It costs 1,009 tokens per session, scanned A, a copy of cascade-img copilot-instructions.md, Apache-2.0.

An instruction file describing cascade-img, an image-generation workflow operated by an AI agent through a Discord connection and other possible image services.

In plain words
What is it for?
It is for operating cascade-img sessions, including prompt creation, image generation, image inspection, asset selection, and attempt logging.
Why use it?
It gives the agent the required startup steps and sequence for generating, reviewing, selecting, and recording images.

Instructions file for Gemini CLI

Written for Gemini CLI: the file is GEMINI.md. Also seen: mentions AGENTS.md.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/laffeyp/cascade-img/gemini-md
Clone the repo
git clone --depth 1 https://github.com/laffeyp/cascade-img

Made for: Gemini CLI.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cascade-img GEMINI.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/laffeyp/cascade-img/gemini-md.svg)](https://agentmods.dev/instructions/laffeyp/cascade-img/gemini-md)
Your own site
<a href="https://agentmods.dev/instructions/laffeyp/cascade-img/gemini-md"><img src="https://agentmods.dev/badge/instructions/laffeyp/cascade-img/gemini-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,009 This file is loaded in full into every session.
When invoked 1,009 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01009 $0.01009
Opus 5 $0.00504 $0.00504
Sonnet 5 $0.00202 $0.00202
Haiku 4.5 $0.00101 $0.00101

Measured 5d ago against content hash eae3b376fae3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

cascade-img GEMINI.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to cascade-img copilot-instructions.md — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

GEMINI.md · 29 lines

How it starts

The opening of the file, as written. The whole thing — 29 lines — stays where its author put it; the contents beside it link to each section on GitHub.

What cascade-img is, and how you drive it

What it is. cascade-img is an LLM-operable image-generation pipeline — Midjourney through a Discord bridge at v0.1, with pluggable backends (Flux, DALL-E, Imagen, …) behind one interface after. You, the agent, are its primary operator: it is built so you compose a prompt, generate, curate the winner, and log the attempt without a human on every generation.

Session start. Your first tool call is cascade_guide — it returns this full operating manual in one call and unlocks the rest. The generation and curation tools refuse with GUIDE_UNREAD until you've called it once this session.

The loop, per asset. compose_prompt → imagine → wait → inspect (read the PNG with vision) → curate (crop_grid → [alpha_key?] → promote) → log_append. Open each iteration with read_prompt_log(n=5) — the append-only log is your working memory across generation runs.

The shape — one daemon, two entry points, all over local HTTP:

  • cascade-mj-bridge — the daemon, and the only process that talks to Discord. It must stay running the whole session: it holds the live Discord connection and the in-flight job table, while the two entry points below are stateless clients that reach it over local HTTP.
  • cascade-mcp — the MCP server exposing 23 tools; this is how you, the agent, drive everything.
  • cascade-mj — the CLI, for scripting and one-off generations.

The 23 MCP tools, by job. onboardingcascade_guide (returns this full operating manual; call it first — the generation and curation tools are gated with GUIDE_UNREAD until you do); generationimagine, generate_video (native image→video; composes + fires --video/--loop/--motion/--end/--bs), wait, status, bridge_health, mj_action; catch-upchannel_recent (the newest MJ results in the channel, including ones the human made by hand in Discord; tracked_job_id: null marks them), adopt_message (claim an untracked result into the job table so status/curation/mj_action work on it); compositioncompose_prompt, compose_video (build a native image→video prompt without firing); curationcrop_grid, alpha_key, auto_trim, palette_quantize, contact_sheet, sprite_sheet, score_grid, video_filmstrip (sample a video's keyframes into a vision-readable still), loop_seam_delta (score how cleanly a --loop video closes), promote; working memorylog_append, read_prompt_log. Every call returns {ok, result} or {ok: false, error: {code, remediation}} — branch on the stable code, never the message.

Where to go next.

  • RUNBOOK.md — install, the Discord .env values to capture, bring-up, and every failure mode with its error code and fix. Read this to set up or to recover.
  • CAPABILITIES.md — every Midjourney prompt parameter and mj_action, the V8.1/V7 version split, with ranges and effects.
  • README.md — the overview and why cascade-img exists.
  • examples/ — three end-to-end walkthroughs: one image, a batch sharing one style, and a video.
  • AGENT_RUNDOWN.md — a paste-in prompt that has an LLM read the source and brief you from it.

The one constraint. cascade-img drives Midjourney through a Discord user account; both services' Terms of Service prohibit that automation, and the human who configured the daemon has acknowledged it. Treat a persistent token rejection (DISCORD_401 after re-capture, or DISCORD_RECONNECT_FAILED(reason=auth)) as a structural failure that needs the human — the daemon cannot self-recover.

Full operator guide: AGENTS.md — the complete tool reference, the prompt-part details, identity-lock guidance, and the failure-mode→action table.

Read the full file on GitHub · 29 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 29 lines · 1,009 tokens per session scan A eae3b376fae3

Subscribe to this mod's changes

cascade-img GEMINI.md is an instructions file published in the GitHub repository laffeyp/cascade-img (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 1,009 tokens to every session, about $0.0050 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to cascade-img copilot-instructions.md, differing in 12 lines, and is treated as a copy.