把 imagegen skill 注册进 skill 注册表,无需往 $DSH_HOME/skills 手工拷贝文件,每个会话都能生成或编辑图片:agent 调用随包附带的 image_gen.py CLI,对接任意 OpenAI 兼容的 GPT Image 端点,支持文生图、参考图编辑与透明背景抠图。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:dingchenhui0618-arch/dsh-imagegen-skill
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Bundled imagegen skill for DeepSeek Harness: one dsh plugin add puts image generation and image editing in every session's skill catalog — no copying files into $DSH_HOME/skills by hand.
用着还行的话,点个 ⭐ 就够了——插件市场的「搜插件」按 GitHub star 排序,star 是这个插件能被人翻到的唯一杠杆。
dsh plugin --profile web add dsh-imagegen-skill
After a restart the agent can load the skill with the skill tool (or you can invoke it with /imagegen), and it will generate or edit raster images through the CLI that ships with this package.
What it does
The skill teaches the agent to drive scripts/image_gen.py — a small openai-SDK CLI — against any OpenAI-compatible endpoint that serves GPT Image:
generate— text to image, including transparent-background cutoutsedit— one or more reference images in, one image out (image-to-image, chain edits)generate-batch— many jobs from a JSONL file, only when you explicitly ask for CLI/API/model control
Artifacts land in the project (output/imagegen/ by default), never in a temp directory, and never overwrite an existing asset unless you ask.
Configuration
| Variable | Meaning |
|---|---|
OPENAI_API_KEY |
Credential for your endpoint. Required for real calls. |
OPENAI_BASE_URL |
Base URL of an OpenAI-compatible /v1 root. Leave unset for api.openai.com. |
Any relay works as long as it exposes /v1/images/generations: the official API, an Azure-style gateway, a company proxy, or a local relay in front of a ChatGPT subscription. Billing follows whatever that endpoint charges — a subscription relay spends subscription quota, not API credit, and surfaces exhaustion as 429 usage_limit_reached with resets_in_seconds in the body.
--dry-run validates arguments and the real output path with no key, no network, and no cost.
Requirement
On Windows the python on PATH is often the Microsoft Store placeholder with no real interpreter. Install uv and let the skill load dependencies per run:
$env:OPENAI_BASE_URL = "https://api.openai.com/v1"
$env:OPENAI_API_KEY = "<your key>"
uv run --quiet --with openai python scripts/image_gen.py generate --prompt "a small red dot on white" --size 1024x1024 --out out.png
Distribution requires dsh plugin add to reach npm or GitHub; nothing else is needed, because this package ships plain JavaScript and no build step.
Layout
package.json dsh.bundle.patch -> cordis.patch.yml (inserts this plugin into the web composition)
cordis.patch.yml the insert row
src/index.js Cordis plugin: registers the bundled skill on ctx.skills
skills/imagegen/
SKILL.md the instructions the model loads
scripts/ image_gen.py, remove_chroma_key.py
references/ CLI, API, prompting and sample-prompt notes
assets/ skill icons
test/ contract tests for the provider
src/index.js registers a provider on the skill registry (ctx.skills.registerProvider) with resourceBase pointing at skills/imagegen/, so relative paths in SKILL.md resolve against the installed copy wherever node_modules happens to be.
Install from a local checkout
dsh plugin --profile web add D:\Projects\dsh-imagegen-skill
dsh plugin --profile web list
Uninstall
dsh plugin --profile web remove dsh-imagegen-skill
Note on shadowing a hand-installed copy
A hand-installed $DSH_HOME/skills/imagegen and this package both register a skill named imagegen. The packaged provider uses the standard packaged rank (600) and the filesystem user root ranks lower (400), so the packaged copy wins and the registry logs a notice about the ignored duplicate. Keep one of the two: if you install this package, remove the hand-copied directory (or the reverse).
Attribution and license
Apache-2.0. The reference documents, the assets, and the Python scripts under skills/imagegen/ come from the Codex imagegen system skill; SKILL.md and the Cordis provider are this repository's work. See NOTICE for the full provenance statement, and LICENSE for the license text.
Installing any dsh plugin runs third-party code with your own permissions. This one is a skill provider: it reads files inside its own package and registers a catalog entry. It makes no network request of its own — the skill only runs
scripts/image_gen.pywhen an agent or a user actually asks for an image.
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-skill-explorer★ 9959
技能中心:按来源分级浏览已加载的全部 skill,启用/禁用模型调用、创建新技能、删除进可恢复回收站。
iflytek/skillhub#dsh★ 5358
在 DeepSeek Harness 内浏览、搜索 SkillHub 技能,并管理本地技能的安装、更新和卸载。适配 DSH 0.2.0-rc.2 与 0.2.1-rc.2,暂不兼容 0.2.1-rc.3。
QingYunA/answer-me-with-html★ 5085
把回答做成一页可视化 HTML:模型只写简短的 Markdown 草稿,随包附带的 `am` 命令行生成页面,支持流程图、时序图、树、时间线、ER 图、表格和提示框。
hyhmrright/brooks-lint★ 1556
提供六个代码质量技能,涵盖代码审查、架构审计、技术债、测试质量、健康看板与修复。
GanyuanRan/Aegis★ 1411
面向编码 Agent 的软件工程方法包,提供基线优先规划、系统化调试、提示词卫生、完成前验证,以及修复/退役双轨跟踪技能。
superdesigndev/superdesign-skill★ 935
在 Superdesign 画布上做 UI 与营销图的设计技能:先读代码库拿上下文、抽取现有设计系统,再通过 Superdesign CLI 生成并迭代可分支的设计稿、流程页与可复用组件。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。