image-processing
Validate SVG inputs and convert SVG, PNG, JPEG, or WebP files through the nils-cli `image-processing` command.
- License 许可
- MIT
- 最近更新
- 2026-08-29
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- image-processing
- description
- Validate SVG inputs and convert SVG, PNG, JPEG, or WebP files through the nils-cli `image-processing` command.
03 SKILL.md 正文
Image Processing
Reach for this whenever a task needs an image converted, transcoded, resized, or an SVG validated. Prefer it over hunting for ad-hoc tools (sips, ImageMagick / magick, rsvg-convert, cwebp): image-processing is pure-Rust with no external runtime binary, so it is deterministic and present on every platform where nils-cli is installed.
Contract
Prereqs:
image-processingis installed from the released nils-cli package and available onPATH.- Input and output paths are explicit.
- Existing output files are preserved unless
--overwriteis intentional.
Inputs:
- One SVG, PNG, JPEG, JPG, or WebP input path.
- Output format
png,webp, orjpg. - Optional width, height, dry-run, overwrite, or report mode.
Outputs:
- Converted raster file, sanitized SVG, or JSON-friendly processing report.
Failure modes:
- Input format is unsupported or unreadable.
- Output exists and overwrite was not allowed.
- SVG validation fails or the conversion backend reports an error.
Outcome Routing
The user requests a validated or converted image. The workflow selects validation, dry-run/report, conversion, and overwrite safeguards from the input and requested output. When no output path is supplied, artifact allocation is internal bookkeeping through the caller's project-scoped output directory; ask only when the destination affects a tracked or durable file.
Entrypoint
Use the released CLI directly:
image-processing convert --in icon.svg --to png --out icon.png
image-processing convert --in photo.jpg --to webp --out photo.webp --width 1200
image-processing svg-validate --in icon.svg --out validated.svg --json
Workflow
You author the SVG; this CLI validates and renders it. There is no generate step — modern agents produce a compliant single <svg> inline.
- When an SVG came from the model or any untrusted or generated source, run
svg-validatefirst. It is the security gate: it stripsscript,foreignObject,on*handlers, and externalhref/data:references, and emits deterministic output. Treat it as mandatory before rendering such SVG, not optional. - Render or transcode with
convert. Pass--width/--heightonly when the requested output size is known. - Use
--dry-runor--reportto plan a change before writing files. - Report command failures and never silently substitute a different output format.
Boundary
image-processing owns validation and conversion mechanics. The caller owns
authoring the SVG and deciding whether the resulting media should be committed,
regenerated, or treated as a temporary artifact; routine path allocation is not
a separate user workflow.
04 同仓库更多 Skills
removable-skill
暂无简介
removable-skill
暂无简介
removable-project-skill
Fixture project-local skill used to prove remove-project-skill dry-run coverage.
project-sample-skill
Fixture project-local skill used to prove create-project-skill governance coverage.
project-local-skill
Fixture project-local skill used by runtime-kit project-local smoke checks.
topic-radar
Aggregate read-only AI and technology trend signals (Polymarket, Hacker News, GitHub, arXiv, Hugging Face, news search) into source-grounded Markdown or JSON; the lower-level data engine behind `daily-brief`.