跳到主内容
智客 ZICQ

技能库 智客分类:文档办公 flux-kontext

Flux Kontext

在RunComfy上用Flux 1 Kontext Pro(黑色森林实验室的精确本地图像编辑模型)来编辑图像——与模型的被记录的提示模式相捆绑,因此技能的输出比对同一种模型的天真更尖锐. 文件 Flux Kontext 的长处(单引用精确的本地编辑,强烈的即时控制,一致的高纯度输出), schema(单图像 + 即时),以及何时去Nano Banana Edit / GPT Image 2 编辑 / Flux 2 Klein 取而代之. 通过当地RunComfy CLI呼叫`runcomfy run Blackforestlabs/flux-1-kontext/pro/edit'。 触发“ flux kontext ” 、 “ flux- kontext ” 、 “ flux 1 kontext ” 、 “ kontext ” 、 “ BFL kontext ” 或任何使用此模式编辑的明确请求 .

415768 安装量

官方网址:作者主页

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

在RunComfy上用Flux 1 Kontext Pro(黑色森林实验室的精确本地图像编辑模型)来编辑图像——与模型的被记录的提示模式相捆绑,因此技能的输出比对同一种模型的天真更尖锐. 文件 Flux Kontext 的长处(单引用精确的本地编辑,强烈的即时控制,一致的高纯度输出), schema(单图像 + 即时),以及何时去Nano Banana Edit / GPT Image 2 编辑 / Flux 2 Klein 取而代之. 通过当地RunComfy CLI呼叫`runcomfy run Blackforestlabs/flux-1-kontext/pro/edit'。 触发“ flux kontext ” 、 “ flux- kontext ” 、 “ flux 1 kontext ” 、 “ kontext ” 、 “ BFL kontext ” 或任何使用此模式编辑的明确请求 .

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Flux Kontext Pro — Pro Pack on RunComfy、When to pick this model (vs siblings)、Prerequisites、Endpoints + input schema、`blackforestlabs/flux-1-kontext/pro/edit`、How to invoke。 其中含规范建议的小节:边界情况。

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

Edit images with Flux 1 Kontext Pro (Black Forest Labs' precise local image-edit model) on RunComfy — bundled with the model's documented prompting patterns so the skill gets sharper output than naive prompting against the same model. Documents Flux Kontext's strengths (single-reference precise local edits, strong prompt control, consistent high-fidelity outputs), the schema (single image + prompt), and when to route to Nano Banana Edit / GPT Image 2 edit / Flux 2 Klein instead. Calls `runcomfy run blackforestlabs/flux-1-kontext/pro/edit` through the local RunComfy CLI. Triggers on "flux kontext", "flux-kontext", "flux 1 kontext", "kontext", "BFL kontext", or any explicit ask to edit with this model.

Flux Kontext Pro — Pro Pack on RunComfyWhen to pick this model (vs siblings)PrerequisitesEndpoints + input schema`blackforestlabs/flux-1-kontext/pro/edit`How to invokePrompting — what actually worksWhere it shinesSample prompts (verified to produce strong results)LimitationsExit codesHow it works

· 许可:MIT

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
flux-kontext
description
Edit images with Flux 1 Kontext Pro (Black Forest Labs' precise local image-edit model) on RunComfy — bundled with the model's documented prompting patterns so the skill gets sharper output than naive prompting against the same model. Documents Flux Kontext's strengths (single-reference precise local edits, strong prompt control, consistent high-fidelity outputs), the schema (single image + prompt), and when to route to Nano Banana Edit / GPT Image 2 edit / Flux 2 Klein instead. Calls `runcomfy run blackforestlabs/flux-1-kontext/pro/edit` through the local RunComfy CLI. Triggers on "flux kontext", "flux-kontext", "flux 1 kontext", "kontext", "BFL kontext", or any explicit ask to edit with this model.
许可
MIT
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「flux-kontext」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-9405b6a7f4eca779-Flux-Kontext.html
请存为 .cursor/skills/flux-kontext/SKILL.md 或 .claude/skills/flux-kontext/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/prime-skills/runcomfy-agent-skills' --list

npx skills add 'https://github.com/prime-skills/runcomfy-agent-skills' --skill 'flux-kontext'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: flux-kontext displayName: "Flux Kontext Pro — Pro Pack on RunComfy" description: > Edit images with Flux 1 Kontext Pro (Black Forest Labs' precise local image-edit model) on RunComfy — bundled with the model's documented prompting patterns so the skill gets sharper output than naive prompting against the same model. Documents Flux Kontext's strengths (single-reference precise local edits, strong prompt control, consistent high-fidelity outputs), the schema (single image + prompt), and when to route to Nano Banana Edit / GPT Image 2 edit / Flux 2 Klein instead. Calls `runcomfy run blackforestlabs/flux-1-kontext/pro/edit` through the local RunComfy CLI. Triggers on "flux kontext", "flux-kontext", "flux 1 kontext", "kontext", "BFL kontext", or any explicit ask to edit with this model. homepage: https://www.runcomfy.com license: MIT --- # Flux Kontext Pro — Pro Pack on RunComfy [runcomfy.com](https://www.runcomfy.com/?utm_source=skills.sh&utm_medium=skill&utm_campaign=flux-kontext) · [Model page](https://www.runcomfy.com/models/blackforestlabs/flux-1-kontext-pro/image-to-image?utm_source=skills.sh&utm_medium=skill&utm_campaign=flux-kontext) · [GitHub](https://github.com/agentspace-so/runcomfy-skills/tree/main/flux-kontext) Black Forest Labs' **Flux 1 Kontext Pro** — single-reference precise local image edit — hosted on the **RunComfy Model API**. Strong prompt control, consistent outputs, high fidelity. ```bash npx skills add agentspace-so/runcomfy-skills --skill flux-kontext -g ``` ## When to pick this model (vs siblings) | You want | Use | |---|---| | Single-image precise local edit ("she's now holding X") | **Flux Kontext** | | High-fidelity preservation of source identity | **Flux Kontext** | | Batch edits across 1–20 images | Nano Banana Edit | | Edit multilingual / embedded text in image | GPT Image 2 edit | | Generate from scratch, no source image | Flux 2 Klein | If the user said "Flux Kontext" / "kontext" / "BFL Kontext" explicitly, route here regardless. ## Prerequisites 1. **RunComfy CLI** — `npm i -g @runcomfy/cli` 2. **RunComfy account** — `runcomfy login` opens a browser device-code flow. 3. **CI / containers** — set `RUNCOMFY_TOKEN=` instead of `runcomfy login`. ## Endpoints + input schema ### `blackforestlabs/flux-1-kontext/pro/edit` | Field | Type | Required | Default | Notes | |---|---|---|---|---| | `prompt` | string | yes | — | Single declarative edit instruction. | | `image` | string | yes | — | Single source image URL (publicly fetchable HTTPS). | | `aspect_ratio` | enum | no | (input) | Pick from supported W:H options on the model page. | | `seed` | int | no | — | Reuse for variant comparisons. | The schema is intentionally minimal — Kontext leans on prompt + single ref. For multi-image or web-grounded edits, route to Nano Banana Edit. ## How to invoke **Default — local edit, preserve everything else:** ```bash runcomfy run blackforestlabs/flux-1-kontext/pro/edit \ --input '{ "prompt": "Keep the person'\''s face, pose, and clothing unchanged. Add an orange umbrella in her left hand and a slight smile.", "image": "https://.../portrait.jpg" }' \ --output-dir ``` **With seed for reproducible variant series:** ```bash runcomfy run blackforestlabs/flux-1-kontext/pro/edit \ --input '{ "prompt": "Keep the bottle, label, and lighting unchanged. Replace the brand text on the label from \"ALPHA\" to \"AURA\".", "image": "https://.../bottle.jpg", "seed": 42 }' \ --output-dir ``` ## Prompting — what actually works **One declarative instruction.** Kontext shines on prompts shaped like the docs example: `"She is now holding an orange umbrella and smiling"`. Imperative mood, single change. **Preservation first.** Lead with `"Keep [identity / pose / framing / brand] unchanged."` Then the change. Models honor what's stated up front. **Single ref only — pick the right one.** No multi-image fanout here. If you have multiple references, decide which is primary and pass that one. For multi-image flows, route to Nano Banana Edit. **Iterate on small changes.** If Kontext drifts, split a compound edit into sequential single-instruction passes (pass 1: change background, pass 2: change clothing). **Aspect ratio — pick from the supported enum.** Out-of-list values 422 or crop. **Anti-patterns:** - Compound prompts ("change A and add B and remove C") → drift. - Trying to fan out to multiple source images → wrong model (use Nano Banana Edit). - Prompts written in passive voice → less reliable. - Asking for novel composition without a source image → wrong model (use Flux 2 Klein t2i). ## Where it shines | Use case | Why Flux Kontext | |---|---| | **Single-shot precise local edit** | Specifically designed for this; high fidelity | | **Preserve source identity through targeted change** | Strong preservation under explicit instruction | | **Brand-asset text or color swap** | Quoted text + preservation lead-in works well | | **Quick iteration on one image** | Short prompts + single ref = fast result loop | ## Sample prompts (verified to produce strong results) **Page example:** ``` She is now holding an orange umbrella and smiling ``` **Preservation-led brand edit:** ``` Keep the bottle silhouette, table, and lighting exactly as in the input. Replace only the brand text on the label, from "ALPHA" to "AURA". Same font weight, white on black, centered. ``` **Compositional micro-edit:** ``` Keep the person's face, pose, and clothing unchanged. Add a leather shoulder bag, dark brown, hanging on the right shoulder. ``` ## Limitations - **Single source image only.** For multi-image flows, use Nano Banana Edit (1–20). - **Public RunComfy docs are minimal** — schema fields beyond prompt + image + aspect_ratio + seed may exist; check the [model page](https://www.runcomfy.com/models/blackforestlabs/flux-1-kontext-pro/image-to-image?utm_source=skills.sh&utm_medium=skill&utm_campaign=flux-kontext) for the latest field list. - **Compound prompts drift** — split into sequential passes. - **For multilingual / embedded text editing, GPT Image 2 edit usually wins.** ## Exit codes | code | meaning | |---|---| | 0 | success | | 64 | bad CLI args | | 65 | bad input JSON / schema mismatch | | 69 | upstream 5xx | | 75 | retryable: timeout / 429 | | 77 | not signed in or token rejected | Full reference: [docs.runcomfy.com/cli/troubleshooting](https://docs.runcomfy.com/cli/troubleshooting?utm_source=skills.sh&utm_medium=skill&utm_campaign=flux-kontext). ## How it works The skill invokes `runcomfy run blackforestlabs/flux-1-kontext/pro/edit` with a JSON body matching the schema. The CLI POSTs to `https://model-api.runcomfy.net/v1/models/blackforestlabs/flux-1-kontext/pro/edit`, polls the request, fetches the result, and downloads any `.runcomfy.net`/`.runcomfy.com` URL into `--output-dir`. `Ctrl-C` cancels the remote request before exit. ## Security & Privacy - **Token storage**: `runcomfy login` writes the API token to `~/.config/runcomfy/token.json` with mode 0600 (owner-only read/write). Set `RUNCOMFY_TOKEN` env var to bypass the file entirely in CI / containers. - **Input boundary**: the user prompt is passed as a JSON string to the CLI via `--input`. The CLI does NOT shell-expand the prompt; it transmits the JSON body directly to the Model API over HTTPS. No shell injection surface from prompt content. - **Third-party content**: image / mask / video URLs you pass are fetched by the RunComfy model server, not by the CLI on your machine. Treat external URLs as untrusted; image-based prompt injection is a known risk for any image-edit / video-edit model. - **Outbound endpoints**: only `model-api.runcomfy.net` (request submission) and `*.runcomfy.net` / `*.runcomfy.com` (download whitelist for generated outputs). No telemetry, no callbacks. - **Generated-file size cap**: the CLI aborts any single download > 2 GiB to prevent disk-fill from a malicious or runaway model output.

相关技能

文档办公

Ontology

为结构化的代理内存和可堆肥技能所打入的知识图. 在创建/征服实体(Person, project, Task, Evention, Document)时使用,链接相关对象,强制约束,规划多步动作作为图变,或技能需要共享状态时使用. 触发到"记住","我知道什么","链接X到Y",…

文档办公

Nano Pdf

使用纳米-pdf CLI编辑带有自然语言指令的PDF.

文档办公

Word / DOCX

创建,检查,并编辑有可靠样式的Microsoft Word文档和DOCX文件,编号,跟踪更改,表格,章节,并进行相容性检查. 当 (1) 任务涉及 Word 或 ".docx " 时使用; (2) 文件包括跟踪的更改,评论,字段,表格,模板,或页面布局限制; (3) 文档必须在不…

文档办公

Baidu Search

使用Baidu AI搜索引擎(BDSE)搜索网页. 用于实时信息、文件或研究专题.