一个 纯 Go、面向 Agent的图像后处理 CLI。它面向脚本、Worker、和自动化流水线,目标不是“做一切图像能力”,把已经存在的图片资产稳定地检查、加工、排版、打包和导出。
SaferSkills independently audited imgcli (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
用于指导 Agent 直接执行 imgcli,而不是解释底层图像算法实现。
imgcli 不负责生成图片。imgcli 负责对已经存在的图片做检查、加工、排版、打包和导出。imgcli version 或 ./bin/imgcli versionmake build
./bin/imgcli version--json./bin/imgcli inspect \
--input input.jpg \
--hash \
--color-stats可选:
--input-dir ./images--limit 10./bin/imgcli compose \
--input input.jpg \
--output poster.jpg \
--width 1080 \
--height 1440 \
--layout poster \
--title "Launch Day" \
--subtitle "A fixed-layout creator card"可选:
--logo brand.png--badge NEW--background-color '#f3efe7'--safe-area 64,64,64,64./bin/imgcli convert \
--input alpha.png \
--output out.jpg \
--flatten-background "#ffffff" \
--max-width 1600 \
--quality 82 \
--strip-metadata./bin/imgcli run \
--recipe recipe.json \
--dry-run
./bin/imgcli run \
--recipe recipe.json引用规则:
input:<name> 引用顶层输入step:<id> 引用前置 step 产出的文件./bin/imgcli variants \
--input poster.jpg \
--output-dir dist \
--preset-set creator-basic可选:
--preset xiaohongshu --preset wechat_cover--background blur|solid--filename-template '{base}_{preset}{ext}'./bin/imgcli smartpad \
--input input.jpg \
--output output.jpg \
--preset xiaohongshu可选:
--background blur|solid--blur-sigma 5--quality 85./bin/imgcli topdf \
--input page1.jpg \
--input page2.jpg \
--output bundle.pdf \
--watermark-text "internal" \
--watermark-position tile可选:
--input-dir ./images--watermark-opacity 0.25--watermark-size 42./bin/imgcli stitch \
--input a.jpg \
--input b.jpg \
--output stitched.jpg \
--width 1080可选:
--input-dir ./images--part-height-limit 65535--quality 85如果本机已经配置 baoyu-image-gen,执行:
make real-smoke该流程会:
inspectcomposeconvertvariantsrunsmartpad、topdf、stitch成功:
{"ok":true,"command":"smartpad","data":{}}失败:
{"error":"reason","code":"INVALID_ARGUMENT","exit_code":2}PRESET_NOT_FOUND:检查 --presetINVALID_ARGUMENT:检查必填 flag 与输入模式冲突CONFIG_ERROR:检查 --recipe 文件扩展名和 JSON/YAML 语法PLAN_INVALID:检查 step 引用、重复 step id、必填字段OUTPUT_CONFLICT:检查 recipe 是否把多个 step 写到同一路径,或覆盖顶层输入DECODE_FAILED:检查图片是否损坏或格式不支持PDF_WRITE_FAILED:检查输出路径是否可写CANVAS_TOO_LARGE:减小 --width 或调低分卷阈值~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.