Agent skill

Flux2 Klein Prompting

by AnastasiyaW in AnastasiyaW/codex-claude-code-config

Expert prompt engineering for FLUX.2 [klein] image generation and editing model.

MITAuto-check passedMedia & Creative

Install Flux2 Klein Prompting

skills CLI
$ npx skills add AnastasiyaW/codex-claude-code-config --skill flux2-klein-prompting -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AnastasiyaW/codex-claude-code-config flux2-klein-prompting --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ai-ml/flux2-klein-prompting .claude/skills/flux2-klein-prompting && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
flux2-klein-prompting
GitHub stars
154
Token cost
~2.8k tokens
SKILL.md length
735 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
MIT

At a glance

Expert prompt engineering for FLUX.2 [klein] image generation and editing model.

  • Works in 6 steps: Subject — who/what, key attributes → Scene/context — where, time of day,… → Composition — framing, angle, background → …
  • The user wants to create prompts for FLUX.2 [klein]
  • SKILL.md covers Core principle: prose, not tags, Model variants quick reference, Prompt structure and Key rules, plus 8 more sections
  • Reaches api.bfl.ai; needs BFL_API_KEY

What it does

Flux2 Klein Prompting is an agent skill from AnastasiyaW/codex-claude-code-config. Expert prompt engineering for FLUX.2 [klein] image generation and editing model. Use this skill whenever the user wants to create prompts for FLUX.2 [klein], generate images, edit photos with the klein model, work with multi-reference image editing, or needs templates for T2I/I2I tasks. Trigger for any mention of: FLUX.2, flux klein, BFL API, image editing prompts, text-to-image prompts for FLUX, product mockups, poster generation, UI mockups, sticker packs, character design, seamless textures, or any request to…

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Media & Creative, covering Image generation, Diffusion and image models and Image editing. It works with Qwen. The repository describes itself as: Claude Code, Codex, and multi-agent configuration system: principles, hooks, skills, and workflow patterns for AI-assisted development. The licence is MIT.

When your agent uses it

  • The user wants to create prompts for FLUX.2 [klein]
  • Generate images
  • Edit photos with the klein model
  • Work with multi-reference image editing

Example prompts

  • “/flux2-klein-prompting”

Requirements

  • Python 3
  • A credential in BFL_API_KEY

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Subject — who/what, key attributes
  2. Scene/context — where, time of day, surroundings
  3. Composition — framing, angle, background
  4. Light/materials — source, softness, reflections, texture
  5. Style/genre — photorealism, illustration, catalog, poster, UI
  6. Text in image (if needed) — exact string in quotes + position/font

What it can do on your machine

Read from SKILL.md and the folder at commit 67709af. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.bfl.ai

    Also links to:

    • docs.bfl.ai
    • huggingface.co
    • bfl.ai
    • docs.bfl.ml

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • BFL_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Flux2 Klein Prompting loads about 2.8k tokens when it runs. Until then it costs about 238 tokens; SKILL.md has 735 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~238
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from AnastasiyaW/codex-claude-code-config at commit 67709af, republished under its MIT licence (© AnastasiyaW). 735 words, ~2,768 tokens.

Download SKILL.mdSave it as .claude/skills/flux2-klein-prompting/SKILL.md (or your agent's skills folder).
name
flux2-klein-prompting
description
Expert prompt engineering for FLUX.2 [klein] image generation and editing model. Use this skill whenever the user wants to create prompts for FLUX.2 [klein], generate images, edit photos with the klein model, work with multi-reference image editing, or needs templates for T2I/I2I tasks. Trigger for any mention of: FLUX.2, flux klein, BFL API, image editing prompts, text-to-image prompts for FLUX, product mockups, poster generation, UI mockups, sticker packs, character design, seamless textures, or any request to write/improve/translate prompts for FLUX-family models. Also trigger when user asks about guidance_scale, inference steps, distilled vs base modes, or multi-reference workflows. Do NOT use for training a FLUX.2 Klein / Qwen-Edit LoRA (use flux2-lora-training), nor for reconstructing a prompt FROM an existing source image (use forensic-prompt-compiler); this skill is for authoring generation/edit prompts only.

FLUX.2 [klein] — Prompt Engineering Guide

Core principle: prose, not tags

BFL guidance favors a concrete natural-language description over an ambiguous bag of tags. State who/what is in the image, where, style, materials/light/camera and — for editing — the properties to preserve. Prompt shape is a starting point, not a quality guarantee; assess the result against the requested edit.


Model variants quick reference

AxisOptionsNotes
Size4B / 9B9B better for complex instructions; 4B fastest
ModeDistilled / BaseUse the exact model-card or serving API settings; step/CFG values are implementation-specific
License4B Apache-2.0 / 9B Non-CommercialCheck before commercial use
TaskT2I / Edit (I2I) / Multi-referenceThe current BFL image-editing guide documents up to 8 references via API (10 in playground); re-check the selected endpoint schema before use

9B uses Qwen3 8B text embedder → solid multilingual support (Russian works natively).


Prompt structure

T2I (text-to-image)
  1. Subject — who/what, key attributes
  2. Scene/context — where, time of day, surroundings
  3. Composition — framing, angle, background
  4. Light/materials — source, softness, reflections, texture
  5. Style/genre — photorealism, illustration, catalog, poster, UI
  6. Text in image (if needed) — exact string in quotes + position/font
Edit (I2I, no mask)
  1. Base anchor — "This exact image but…"
  2. What to change — object / background / text / color / material
  3. What to preserve — face, lighting, style, perspective, brand elements
  4. Multi-reference — reference by "image 2 / image 3", keep prompt concise

Key rules

Text in image → always in straight quotes, specify position. Without this: garbled glyphs.

Заголовок: "ТОЧНЫЙ ТЕКСТ". Шрифт жирный гротеск, ровный кернинг. Других надписей не добавлять.

Negatives → positives → don't say "don't change X", say "preserve X"

❌ "не меняй освещение"
✅ "Сохрани освещение, перспективу и лицо"

Multi-reference → simplify text, use explicit indexing

"Возьми персонажа из image 2 и помести рядом с объектом из image 1."

Choose distilled or base only after the task’s quality/latency requirement and the exact model card are known; neither is an automatic “preview” or “final” mode.


Ready-to-use templates (Russian)

Photorealistic object
Фотореалистичная предметная фотография [объект] на [фон], ракурс [сверху/на уровне глаз/крупный план], мягкий студийный свет, реалистичные материалы и фактуры, аккуратные тени, высокая детализация. Без логотипов и водяных знаков.
Product mockup / e-commerce
Каталожный product shot: [товар] в центре кадра, фон [описание], чистая композиция, цвет товара строго [HEX или словом], реалистичные отражения, нейтральный стиль, как для e-commerce.
Logo / icon
Минималистичная иконка: [смысл/символ], плоский дизайн, 2–3 цвета, чёткий силуэт, без мелких деталей. Без текста.
Character design
Персонаж: [кто], внешний вид: [рост/пропорции/одежда], выражение лица [эмоция], стиль [аниме/3D/иллюстрация], палитра [цвета], фон простой. Сохранить узнаваемость: [признак 1], [признак 2].
Sticker pack (6 emotions)
Набор стикеров одного персонажа (6 штук): радость, злость, удивление, смущение, сон, восторг. Единый стиль, толстый контур, яркая палитра, прозрачный фон, без текста.
Poster with readable text
Постер [стиль]. Вверху крупный заголовок: "ТОЧНЫЙ ТЕКСТ". Шрифт: жирный гротеск, ровный кернинг, читаемо. Ниже подзаголовок: "Ещё одна строка". Остальные надписи не добавлять.
UI mockup (mobile)
UI‑мокап мобильного приложения [тематика]. 3 экрана в одной сетке. Читаемые заголовки на русском в кавычках: "[Экран 1]", "[Экран 2]", "[Экран 3]". Минималистичная дизайн‑система, много воздуха, аккуратная типографика, без лишнего декоративного шума.
Seamless texture
Бесшовная текстура (seamless): [материал], равномерное освещение, без объектов, без текста, высокая детализация, натуральные вариации, без резких пятен.
Edit: replace / recolor / swap background
Это то же изображение, но: [что изменить]. Сохрани: [освещение / перспектива / лицо / композиция / стиль]. Сделай результат фотореалистичным и согласованным по теням и отражениям.
Edit: add text to sign/label
Это то же изображение, но добавь на [табличку/вывеску] точный текст: "[ТЕКСТ]". Сохрани стиль таблички, фон и освещение. Текст должен быть читаемым. Больше текста не добавляй.
Edit: multi-reference character swap
Это то же изображение, но возьми персонажа из image 2 и помести рядом с персонажем из image 1. Сохрани реалистичные тени, масштаб и общую атмосферу сцены.

API parameters

ModeSettingsUse for
Distilled / BaseRead the exact checkpoint or API referenceChoose from the requested fidelity, latency and cost constraints
BFL API constraints (klein endpoints)
  • Endpoint fields, size limits, reference-image count and result-URL lifetime are API-version facts. Read the current endpoint reference before constructing a request; do not infer them from a local pipeline or another FLUX endpoint.
Available API fields (klein)

Do not maintain a local fixed field list. Copy the request schema from the current BFL API reference for the selected endpoint; multi-reference capacity, endpoint names and optional fields change independently of this skill.


Python: BFL API (async polling)

Illustrative request shape only: copy the current selected-endpoint example from BFL before use. This snippet does not establish that its endpoint or fields are currently supported.

python
import os, time, requests

BFL_API_KEY = os.environ["BFL_API_KEY"]

# 1. Create task
create = requests.post(
    "https://api.bfl.ai/v1/flux-2-klein-4b",
    headers={"x-key": BFL_API_KEY, "Content-Type": "application/json"},
    json={
        "prompt": 'Это то же изображение, но добавь на вывеску текст "ОТКРЫТО". '
                  "Сохрани фон, освещение и перспективу. Больше текста не добавляй.",
        "input_image": "https://example.com/your-image.png",
        "seed": 42,
        "output_format": "png",
    },
    timeout=60,
)
task = create.json()

# 2. Poll until ready
while True:
    time.sleep(0.5)
    data = requests.get(task["polling_url"], headers={"x-key": BFL_API_KEY}).json()
    if data["status"] == "Ready":
        print("Done:", data["result"]["sample"])  # signed URL
        break
    if data["status"] in ("Error", "Failed"):
        raise RuntimeError(data)
Show full SKILL.md (280 more words)Show less

Python: local Diffusers

Illustrative pipeline shape only. The shown step/guidance values are not a recommended default; verify the installed pipeline and selected model card.

python
import torch
from PIL import Image
from diffusers import Flux2KleinPipeline

pipe = Flux2KleinPipeline.from_pretrained(
    "black-forest-labs/FLUX.2-klein-4B", torch_dtype=torch.bfloat16
).to("cuda")

# T2I
image = pipe(
    prompt='Постер "КОФЕ". Жирный гротеск, ровный кернинг, без других надписей.',
    height=1024, width=1024,
    guidance_scale=1.0, num_inference_steps=4,
    # A CPU generator makes comparisons more stable across GPU runs.  It is
    # not a cross-version or cross-hardware reproducibility guarantee.
    generator=torch.Generator("cpu").manual_seed(42),
).images[0]

# Edit (I2I)
base = Image.open("input.png").convert("RGB").resize((1024, 1024))
edited = pipe(
    prompt="Это то же изображение, но замени фон на светлую кухню. "
           "Сохрани объект, освещение и перспективу.",
    image=[base],
    height=1024, width=1024,
    guidance_scale=1.0, num_inference_steps=4,
).images[0]

Troubleshooting

ProblemCauseFix
Garbled text / glyphsText not quoted explicitlyExact string in quotes; say "no other text"
Blurry / artifactsSelected configuration may be too aggressive for the taskCompare a small, pinned parameter change on the accepted visual criteria; do not assume a universal step count or mode
Style drift in editMissing preservation clauseAlways add "Сохрани: свет/лицо/композицию"
Multi-reference "soup"Overloaded prompt + conflicting refsSimplify text; use "image 1 / image 2" indexing
Wrong resolutionInput not multiple of 16Pre-resize input to ×16, ≤4MP

Iteration workflow

  1. Write scene in prose (one paragraph)
  2. Create a controlled candidate using parameters supported by the selected checkpoint or API, and record them with the output.
  3. Fix the seed when the runner supports it and record the model revision, Diffusers/PyTorch version, hardware, dtype and scheduler. A seed makes a controlled comparison within that recorded stack; it is not a cross-version or cross-hardware reproducibility guarantee. Pick 1–2 directions against the task's actual criteria.
  4. Refine prompt: add specifics, quote text, remove filler adjectives.
  5. Edit iterations: one change per step, state what must be preserved, and keep only variants that pass the requested fidelity checks.

Quality metrics (for A/B testing)

  • CLIPScore — prompt↔image alignment (reference-free)
  • FID — realism vs real image distribution
  • Human rating — separate scales for: (a) prompt adherence, (b) quality/realism, (c) text readability, (d) preservation of unchanged parts in edit

Official sources

© AnastasiyaW, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/ai-ml/flux2-klein-prompting of AnastasiyaW/codex-claude-code-config.

Open the folder on GitHubat commit 67709af

Compare with similar skills

Flux2 Klein Prompting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Flux2 Klein Prompting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flux2 Klein Prompting this skillAnastasiyaW/codex-claude-code-config154—~2.8kAutomated safety check: PassMIT
Ernie Imageartokun/comfyui-mcp803—~4.5kAutomated safety check: PassMIT
Anima Baseartokun/comfyui-mcp803—~4kAutomated safety check: PassMIT
Imagegennexu-io/open-design100k—~300Automated safety check: PassApache-2.0
Workflow Template BuilderMooshieblob1/MooshieUI207—~640Automated safety check: PassAGPL-3.0
Qwen Txt2imgartokun/comfyui-mcp803—~3.3kAutomated safety check: PassMIT

Similar skills

  • Ernie Image

    artokun/comfyui-mcp

    Build Baidu ERNIE-Image / ERNIE-Image-Turbo workflows, primarily TEXT-TO-IMAGE.

    803 GitHub stars~4.5k tokensUpdated 6 days ago
    Media & CreativeAuto-check passed
  • Anima Base

    artokun/comfyui-mcp

    Anime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT).

    803 GitHub stars~4k tokensUpdated 6 days ago
    Media & CreativeAuto-check passed
  • Imagegen

    nexu-io/open-design

    Generate and edit images using OpenAI's Image API for project assets — UI mockups, icons, illustrations, social cards, and visual references.

    100k GitHub stars~300 tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Workflow Template Builder

    Mooshieblob1/MooshieUI

    Builds or modifies ComfyUI workflow JSON templates in MooshieUI's Rust backend (src-tauri/src/templates).

    207 GitHub stars~640 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Qwen Txt2img

    artokun/comfyui-mcp

    Build Qwen Image 2512 text-to-image workflows with QwenImageIntegratedKSampler, separate component loading, lightning LoRAs, and fine-tuned model variants

    803 GitHub stars~3.3k tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed
  • Stable Diffusion with Diffusers

    Orchestra-Research/AI-Research-SKILLs

    Generates and edits images with Stable Diffusion through Hugging Face Diffusers, covering text-to-image, image-to-image, inpainting, SDXL and custom pipelines.

    13k GitHub starsUsed in 5 repos~3.2k tokens
    Media & CreativeAuto-check passed

More from AnastasiyaW/codex-claude-code-config

All 50 skills in this repo
  • Bug Reproducer

    AnastasiyaW/codex-claude-code-config

    Find likely software bugs in a codebase, rank concrete bug candidates, and prove or reject them with focused regression tests before proposing a fix.

    154 GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • Motion Framer

    AnastasiyaW/codex-claude-code-config

    A skill your agent uses when implementing Motion or Framer Motion in React/JavaScript: interactive UI components, micro-interactions, gestures, layout or page transitions, and scroll-based animation.

    154 GitHub starsUsed in 1 repo~5.2k tokens
    Auto-check passed
  • Proof Verify

    AnastasiyaW/codex-claude-code-config

    Plan-based verification - freeze acceptance criteria before building, then verify after with an independent fresh-context agent (the builder must not verify their own work).

    154 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Workflow Orchestration

    AnastasiyaW/codex-claude-code-config

    Написание и запуск Claude Code dynamic workflows (JS-оркестратор субагентов).

    154 GitHub stars~3.8k tokensUpdated today
    Auto-check passed
  • Notebooklm Grounded Research

    AnastasiyaW/codex-claude-code-config

    A skill your agent uses when: NotebookLM, notebooklm MCP, large documentation sets, courses, books, papers, or citation-backed research are mentioned.

    154 GitHub stars~2.4k tokensUpdated today
    Auto-check: warnings
  • Deepseek Provider Contract

    AnastasiyaW/codex-claude-code-config

    Validate a proposed DeepSeek API integration before any key or project context is sent: check thinking-mode tool-call history, strict-schema assumptions, bounded output, and provider data boundaries.

    154 GitHub stars~1.2k tokensUpdated today
    Auto-check passed

Works with

Questions about Flux2 Klein Prompting

What does Flux2 Klein Prompting do?

Expert prompt engineering for FLUX.2 [klein] image generation and editing model. Flux2 Klein Prompting is an agent skill from AnastasiyaW/codex-claude-code-config.2 [klein] image generation and editing model.

When should I use Flux2 Klein Prompting?

Flux2 Klein Prompting fits situations like: the user wants to create prompts for FLUX.2 [klein]; generate images; edit photos with the klein model; work with multi-reference image editing.

How do I install Flux2 Klein Prompting in Claude Code?

Run `npx skills add AnastasiyaW/codex-claude-code-config --skill flux2-klein-prompting -a claude-code`. Or copy the skill folder (skills/ai-ml/flux2-klein-prompting in AnastasiyaW/codex-claude-code-config) into .claude/skills/flux2-klein-prompting in your project. Claude Code loads it when a task matches its description.

How do I install Flux2 Klein Prompting in Codex?

Run `npx skills add AnastasiyaW/codex-claude-code-config --skill flux2-klein-prompting -a codex`. Or copy the skill folder (skills/ai-ml/flux2-klein-prompting in AnastasiyaW/codex-claude-code-config) into .agents/skills/flux2-klein-prompting in your project. Codex loads it when a task matches its description.

Can I use Flux2 Klein Prompting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AnastasiyaW/codex-claude-code-config --skill flux2-klein-prompting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flux2-klein-prompting, .gemini/skills/flux2-klein-prompting, .github/skills/flux2-klein-prompting and .opencode/skills/flux2-klein-prompting in your project.

What does Flux2 Klein Prompting need to run?

Going by SKILL.md and its folder, Flux2 Klein Prompting needs credentials named BFL_API_KEY. Our summary lists: Python 3; A credential in BFL_API_KEY.

Does Flux2 Klein Prompting access the network?

SKILL.md names 5 domains. In commands or code: api.bfl.ai; the agent is likely to contact it when it follows the instructions. As links in the text: docs.bfl.ai, huggingface.co, bfl.ai and docs.bfl.ml. This is read from the text; nothing was executed.

Is Flux2 Klein Prompting safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Flux2 Klein Prompting use?

Flux2 Klein Prompting is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Flux2 Klein Prompting use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Flux2 Klein Prompting?

Skills that share tags, products or a category with Flux2 Klein Prompting: Ernie Image (artokun/comfyui-mcp, 803 stars), Anima Base (artokun/comfyui-mcp, 803 stars), Imagegen (nexu-io/open-design, 100k stars) and Workflow Template Builder (Mooshieblob1/MooshieUI, 207 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flux2 Klein Prompting?

AnastasiyaW (a GitHub user) maintains it in AnastasiyaW/codex-claude-code-config, which has 154 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 9, 2026.

Source: AnastasiyaW/codex-claude-code-config on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.