/harness:flux2-klein-promptingfrom Harness (обвязка)
Expert prompt engineering for FLUX.2 [klein] image generation and editing. Covers T2I/I2I prompt structure, model variants, text-in-image rules, and multi-reference workflows.
Ships in Harness (обвязка). Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
| Axis | Options | Notes |
|---|---|---|
| Size | 4B / 9B | 9B better for complex instructions; 4B fastest |
| Mode | Distilled / Base | Use the exact model-card or serving API settings; step/CFG values are implementation-specific |
| License | 4B Apache-2.0 / 9B Non-Commercial | Check before commercial use |
| Task | T2I / Edit (I2I) / Multi-reference | The 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).
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.
Фотореалистичная предметная фотография [объект] на [фон], ракурс [сверху/на уровне глаз/крупный план], мягкий студийный свет, реалистичные материалы и фактуры, аккуратные тени, высокая детализация. Без логотипов и водяных знаков.
Каталожный product shot: [товар] в центре кадра, фон [описание], чистая композиция, цвет товара строго [HEX или словом], реалистичные отражения, нейтральный стиль, как для e-commerce.
Минималистичная иконка: [смысл/символ], плоский дизайн, 2–3 цвета, чёткий силуэт, без мелких деталей. Без текста.
Персонаж: [кто], внешний вид: [рост/пропорции/одежда], выражение лица [эмоция], стиль [аниме/3D/иллюстрация], палитра [цвета], фон простой. Сохранить узнаваемость: [признак 1], [признак 2].
Набор стикеров одного персонажа (6 штук): радость, злость, удивление, смущение, сон, восторг. Единый стиль, толстый контур, яркая палитра, прозрачный фон, без текста.
Постер [стиль]. Вверху крупный заголовок: "ТОЧНЫЙ ТЕКСТ". Шрифт: жирный гротеск, ровный кернинг, читаемо. Ниже подзаголовок: "Ещё одна строка". Остальные надписи не добавлять.
UI‑мокап мобильного приложения [тематика]. 3 экрана в одной сетке. Читаемые заголовки на русском в кавычках: "[Экран 1]", "[Экран 2]", "[Экран 3]". Минималистичная дизайн‑система, много воздуха, аккуратная типографика, без лишнего декоративного шума.
Бесшовная текстура (seamless): [материал], равномерное освещение, без объектов, без текста, высокая детализация, натуральные вариации, без резких пятен.
Это то же изображение, но: [что изменить]. Сохрани: [освещение / перспектива / лицо / композиция / стиль]. Сделай результат фотореалистичным и согласованным по теням и отражениям.
Это то же изображение, но добавь на [табличку/вывеску] точный текст: "[ТЕКСТ]". Сохрани стиль таблички, фон и освещение. Текст должен быть читаемым. Больше текста не добавляй.
Это то же изображение, но возьми персонажа из image 2 и помести рядом с персонажем из image 1. Сохрани реалистичные тени, масштаб и общую атмосферу сцены.
| Mode | Settings | Use for |
|---|---|---|
| Distilled / Base | Read the exact checkpoint or API reference | Choose from the requested fidelity, latency and cost constraints |
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.
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.
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)
Illustrative pipeline shape only. The shown step/guidance values are not a recommended default; verify the installed pipeline and selected model card.
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]
| Problem | Cause | Fix |
|---|---|---|
| Garbled text / glyphs | Text not quoted explicitly | Exact string in quotes; say "no other text" |
| Blurry / artifacts | Selected configuration may be too aggressive for the task | Compare a small, pinned parameter change on the accepted visual criteria; do not assume a universal step count or mode |
| Style drift in edit | Missing preservation clause | Always add "Сохрани: свет/лицо/композицию" |
| Multi-reference "soup" | Overloaded prompt + conflicting refs | Simplify text; use "image 1 / image 2" indexing |
| Wrong resolution | Input not multiple of 16 | Pre-resize input to ×16, ≤4MP |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anastasiyaw/codex-claude-code-config --plugin harness60 skills in this plugin
/agent-harness-designDesigning agent harnesses and tool systems — risk taxonomy for tools, permission decisions, draft/commit pattern, structured tool results, agent budgets (10 types), context trust labels against prompt injection, plan-artifact, approval records, observability and traces, evals (13 categories), event model, streaming buffering, 3rd-party skill install checklist, agentic RAG, self-improving SOP loops, model policy, reasoning effort, and Programmatic Tool Calling adoption gates. Use when building a new Agent SDK app, custom orchestrator, MCP server, Cloudflare Worker with tool calls, agentic RAG pipeline, model router, or model-tier policy; when designing tools and permissions; when writing an agent loop; or when you need trust labels for external content. Do NOT use for improving or auditing an already-built harness (use harness-audit / harness-design instead), nor for ordinary Claude Code sessions where the harness is already given./agents-best-practicesUse when designing, auditing, refactoring, or explaining an agentic harness for any domain, especially when work must continue from a measured gap to verified completion. Covers provider-neutral loops, tools, permissions, environment adaptation, planning, durable workflow state, context, skills, observability, evals, and safety for OpenAI, Anthropic, and compatible APIs. Not for implementing an ordinary app feature or reviewing one concrete diff.Other plugins' skills for the same job