Borrowing it
Nothing to install: this file belongs to laffeyp/cascade-img. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/laffeyp/cascade-img/main/AGENTS.mdgit clone --depth 1 https://github.com/laffeyp/cascade-imgWrote 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.
[](https://agentmods.dev/instructions/laffeyp/cascade-img/agents-md)<a href="https://agentmods.dev/instructions/laffeyp/cascade-img/agents-md"><img src="https://agentmods.dev/badge/instructions/laffeyp/cascade-img/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/laffeyp/cascade-img/agents-md"><img src="https://agentmods.dev/badge/instructions/laffeyp/cascade-img/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.06440 | $0.06440 |
| Opus 5.5 | $0.02576 | $0.02576 |
| Sonnet 5.5 | $0.01288 | $0.01288 |
| Haiku 4.5 | $0.00644 | $0.00644 |
Grade A, and why
cascade-img AGENTS.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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 247 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
This file follows the agents.md convention — drop it in front of any LLM agent that operates cascade-img. The orientation block below is also the canonical source for the per-harness entry files (CLAUDE.md, GEMINI.md, .github/copilot-instructions.md, .cursor/rules/, .windsurfrules, .clinerules): they are generated from it by packages/python/tools/render_agent_entrypoints.py and kept in sync by CI. Edit the block here; never edit a generated file by hand.
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. onboarding — cascade_guide (returns this full operating manual; call it first — the generation and curation tools are gated with GUIDE_UNREAD until you do); generation — imagine, generate_video (native image→video; composes + fires --video/--loop/--motion/--end/--bs), wait, status, bridge_health, mj_action; catch-up — channel_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); composition — compose_prompt, compose_video (build a native image→video prompt without firing); curation — crop_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 memory — log_append, read_prompt_log. Every call returns {ok, result} or {ok: false, error: {code, remediation}} — branch on the stable code, never the message.
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.
- 2mo ago First seen · 247 lines · 6,440 tokens per session scan A a9cb6124a637
cascade-img AGENTS.md is an instructions file published in the GitHub repository laffeyp/cascade-img (2 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 6,440 tokens to every session, about $0.0258 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
cascade-img AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cascade-img AGENTS.mdlaffeyp/cascade-img | Instructions file | 2 | 3mo ago | Apache-2.0 | A | 6,440 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |