flux-image

flux-image is a skill for Claude Code from mishahanin/heading-os. It costs 117 tokens per session (1,748 once invoked), scanned A, original, Apache-2.0.

An image-generation tool that calls AI image models through the Replicate service and saves the resulting image files locally. It supports Nano Banana 2 and FLUX.2 max.

In plain words
What is it for?
Use it to generate images from prompts, including images based on an earlier image-prompt workflow or supplied project context.
Why use it?
It removes the need to create image assets manually when a suitable prompt can describe what is needed.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; positional $N argument.

Good fit Use it to generate images from prompts, including images based on an earlier image-prompt workflow or supplied project context.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mishahanin/heading-os/flux-image
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.

Any agent
npx skills add mishahanin/heading-os --skill flux-image
Clone the repo
git clone --depth 1 https://github.com/mishahanin/heading-os

Made for: Claude Code.

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 flux-image

README.md
[![agentmods](https://agentmods.dev/badge/skills/mishahanin/heading-os/flux-image/github.svg)](https://agentmods.dev/skills/mishahanin/heading-os/flux-image)
Your own site
<a href="https://agentmods.dev/skills/mishahanin/heading-os/flux-image"><img src="https://agentmods.dev/badge/skills/mishahanin/heading-os/flux-image/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.

agentmods 80×15 button for flux-image

Your own site · 80×15
<a href="https://agentmods.dev/skills/mishahanin/heading-os/flux-image"><img src="https://agentmods.dev/badge/skills/mishahanin/heading-os/flux-image.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,748 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 56
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Excessive Agency · line 6
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
How audits are shown
Origin original No closer match found 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.00117 $0.01748
Opus 5 $0.00059 $0.00874
Sonnet 5 $0.00023 $0.00350
Haiku 4.5 $0.00012 $0.00175

Measured 6d ago against content hash 4e7e95eb87f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

flux-image 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 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate_image.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/flux-image/SKILL.md · 154 lines

How it starts

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

AI Image Generator

Generate images using Nano Banana 2 (Google DeepMind) or FLUX.2 max (Black Forest Labs) via the Replicate API. Runs a Python script that calls the API and saves images locally.

Prerequisites

The REPLICATE_API_TOKEN must be set in the workspace .env file (root directory). The script auto-loads it from .env using python-dotenv -- no manual export needed.

If the token is missing or invalid, instruct the user to add it to .env:

# In the workspace root .env file:
REPLICATE_API_TOKEN=r8_your_token_here

Get a token at: https://replicate.com/account/api-tokens

Security: Never hardcode API tokens in skill files, scripts, or documentation. All secrets live in .env only.

Workflow

1. Determine the prompt

Either:

  • Use the image prompt from a preceding /image-prompt skill invocation
  • Use a prompt the user provides directly
  • Craft a prompt from context (article, post, etc.) using the image prompt guidelines

2. Run the generation script

Run from the workspace root (the script path is root-relative). The image is a DATA artifact. It must land in the DATA overlay, never the engine tree. generate_image.py writes --output literally relative to the current directory, which is the engine root after the cd. A bare outputs/... would create a stray image inside the engine. An omitted --output now resolves the data outputs dir itself, and refuses when it cannot. Still resolve the dir here and pass an absolute path, so the filename is descriptive:

cd "$(git rev-parse --show-toplevel)"
OUTPUTS_DIR="$(python3 -c "import sys; sys.path.insert(0,'.'); from scripts.utils.workspace import get_outputs_dir; print(get_outputs_dir())")"
python ".claude/skills/flux-image/scripts/generate_image.py" \
  --prompt "your detailed image prompt here" \
  --output "$OUTPUTS_DIR/content/images/my-image.png" \
  --aspect-ratio 16:9 \
  --model banana \
  --format png

3. Report the result

Tell the user the file path of the generated image. Use the Read tool to display the image to the user (Claude Code can render images).

Read the full file on GitHub · 154 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago Changed · +3 lines 4e7e95eb87f9
  2. 10d ago First seen · 151 lines · 117 tokens per session scan A 591c1e7b32ac

Subscribe to this mod's changes

flux-image is a skill published in the GitHub repository mishahanin/heading-os (11 stars, last pushed yesterday), licensed Apache-2.0. It adds 117 tokens to every session and 1,748 once invoked, about $0.0006 per session on Opus 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-30.