llm-image-generation SKILL.md skillB
llm-image-generation from black-yt/skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add black-yt/skills/llm-image-generation@git:20260529.d765bbcPins git:20260529.d765bbc in mdr.lock. Pin the fingerprint instead.
- Audit grade
- B, 16 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- black-yt/skills
- Path
llm-image-generation/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260529.d765bbc, committed May 29, 2026
- Size
- 7,271 bytes
- Repository stars
- 16
- License
- none declared
当需要通过 OpenAI-compatible LLM 网关生成图片时使用,尤其是使用 LLM_API_KEY 和 LLM_BASE_URL 调用 gpt-image-2、gpt-image-1、dall-e-3 等图像模型;覆盖环境变量检查、缺失配置提示、模型选择、/images/generations 请求、长等待时间处理、base64/URL 返回保存和排错。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# LLM Image Generation
## 使用原则
- 优先从环境变量读取 `LLM_API_KEY` 和 `LLM_BASE_URL`,不要把 key 写进代码、日志、README 或命令输出。
- 如果环境变量缺失,先要求用户配置环境变量,不要猜测 key 或 base URL。
- 图像生成比普通 chat completion 慢很多。请求发出后 60-180 秒没有输出是常见情况;默认等待至少 180 秒,推荐超时设置为 300 秒。不要因为 30-60 秒无输出就判断失败。
- 输出图片保存到用户指定路径或当前项目的明确输出目录。仅测试时可以临时写入 `/tmp`,但验证后必须删除。
- 只在用户明确要求真实生成图片时调用接口;普通写作、提示词设计或代码生成不需要真的发图像请求。
## 环境变量
必需:
```bash
export LLM_API_KEY="sk-..."
export LLM_BASE_URL="http://host:port/v1"
```
可选:
```bash
export LLM_IMAGE_MODEL="gpt-image-2"
```
检查当前环境:
```bash
python3 - <<'PY'
import os
print("LLM_API_KEY:", "<set>" if os.environ.get("LLM_API_KEY") else "<unset>")
print("LLM_BASE_URL:", os.environ.get("LLM_BASE_URL", "<unset>"))
print("LLM_IMAGE_MODEL:", os.environ.get("LLM_IMAGE_MODEL", "<unset>"))
PY
```
如果 `LLM_API_KEY` 或 `LLM_BASE_URL` 是 `<unset>`,回复用户:
```text
当前环境缺少 LLM_API_KEY 或 LLM_BASE_URL。请先在 shell 中配置:
export LLM_API_KEY="sk-..."
export LLM_BASE_URL="http://host:port/v1"
如果有指定图像模型,也可以配置:
export LLM_IMAGE_MODEL="gpt-image-2"
```
## 模型选择
先查询模型列表,再选择模型:
```bash
python3 - <<'PY'
import os, json, urllib.request
base = os.environ["LLM_BASE_URL"].rstrip("/")
key = os.environ["LLM_API_KEY"]
…Read the whole file at its exact version.
How to install
mdr add black-yt/skills/llm-image-generation@sha256:b255ed05607a1690The line at the top of this page pins the label git:20260529.d765bbc, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_zywyztnrdurecj7u)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on May 29, 2026.
Audit of the latest version
- fail: No link to a raw IP address (matched: http://35.220.164.252:3888)
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (7271 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No script tag
Starting a new one? Use a template for SKILL.md on mdpantry, which passes every one of these checks and says what to change in it.
Source
black-yt/skills · 16 stars · license none declared · pushed 2026-11-05 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_zywyztnrdurecj7u GET https://markdownregistry.com/api/v1/resolve?ref=black-yt/skills/llm-image-generation GET https://markdownregistry.com/api/v1/blob/b255ed05607a1690ef04df7f0d1290329592e46695947c293cdcc0ba7681c44e
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.