Image Forge Skill logo

Image Forge Skill

Community
jiushiwon
image-forge-skill

⚠️ 已迁移到 frontend-icon-skill。图片处理与图标生成能力(压缩、转格式、改尺寸、裁剪、base64、水印、遮罩、多图合成、SVG→PNG)已整体并入 frontend-icon-skill,使用 image-forge.cjs。触发词:「处理图片」「压缩图片」「转 webp」「加水印」「图片合成」「生成图标」「做一套图标」「icon 生成」「生成 png 图标」

Overview

Publisherjiushiwon
Repositorywg-skills
Skill nameimage-forge-skill
Stars
123
Forks
38
Bundled files
4
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by jiushiwon on GitHub. Read the source before you install it.

Installation

Install the Image Forge Skill AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jiushiwon/wg-skills/tree/main/vibeCoding/frontend/image-forge-skill
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jiushiwon/wg-skills.git /tmp/wg-skills
mkdir -p .claude/skills
cp -r /tmp/wg-skills/vibeCoding/frontend/image-forge-skill .claude/skills/image-forge-skill
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Image Forge Skill in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Image Forge Skill on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Image Forge Skill is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

image-forge-skill — 图片处理 & 图标生成

⚠️ 已迁移:本技能已整体并入 frontend-icon-skill。 image-forge.js → frontend-icon-skill/image-forge.cjs(命令接口完全不变)。

基于 sharp 的配置驱动工具,内置可执行脚本 image-forge.js。两种配置模式:

  • icons 模式:把 SVG path(或完整 SVG)批量渲染成 PNG(原 icon-forge 能力)。
  • jobs 模式:图片处理 —— 压缩、转格式、改尺寸、裁剪、base64、水印、遮罩、多图合成。

脚本位置

脚本 image-forge.js 与本 SKILL.md 在同一目录。设该目录为 $SKILL_DIR(运行时即本技能所在目录的绝对路径,例如 ~/.claude/skills/image-forge-skill)。

首次使用前需在该目录装一次依赖(sharp):

bash
cd "$SKILL_DIR" && npm install

调用方式

从技能目录运行,让 require('sharp') 能解析到本地依赖:

bash
cd "$SKILL_DIR" && echo '<JSON>' | node image-forge.cjs -

或写入临时文件再传入:node image-forge.cjs /path/to/spec.json

① icons 模式 — 图标生成

用户只需说清「要哪些图标、什么颜色、放哪个目录」,由你写好 JSON 并运行。

json
{
  "outDir": "<目标项目>/src/static/icons/login",
  "size": 72,
  "color": "#059669",
  "strokeWidth": 2,
  "icons": [
    { "name": "feature-data.png", "path": "M9 12h6m-6 4h6..." },
    { "name": "custom.png", "svg": "<svg ...>...</svg>" }
  ]
}
  • outDir 必填,自动创建。size/color/strokeWidth 可选(默认 72 / #059669 / 2)。
  • 每个图标:path(heroicons/feather 风格,viewBox 0 0 24 24)或 svg(完整字符串)二选一。

工作流:确认三要素(输出目录、主题色、要哪些图标)→ 写 JSON → 运行脚本 → 回报 [OK] 路径。

常用 path 速查(heroicons outline,stroke 风格):

  • 数据/文档:M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z
  • 看板/图表:M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z
  • 灯泡/洞察:M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z
  • 计划/勾选:M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4
  • 刷新/重测:M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15

需要其它图标时,按 heroicons/feather 语义自行给出对应 path。

② jobs 模式 — 图片处理

适用于压缩、转格式、改尺寸、裁剪、base64、水印、遮罩、多图合成。

json
{
  "outDir": "./dist",
  "defaults": { "format": "webp", "quality": 85, "fit": "cover" },
  "jobs": [
    {
      "type": "image",
      "input": "src/photo.jpg",
      "output": "photo-thumb.webp",
      "format": "webp",
      "quality": 85,
      "resize": { "width": 800, "height": 600, "fit": "cover" },
      "base64": false,
      "overlays": []
    },
    {
      "type": "composite",
      "output": "banner.jpg",
      "width": 1200,
      "height": 600,
      "background": "#eeeeee",
      "backgroundOpacity": 1,
      "layers": [
        { "type": "image", "input": "src/bg.jpg", "fit": "cover", "width": 1200, "height": 600 },
        { "type": "color", "color": "#000000", "opacity": 0.3 },
        { "type": "text", "text": "标题", "x": 600, "y": 300, "fontSize": 72, "color": "#ffffff", "align": "center" }
      ]
    }
  ]
}

处理类型

类型字段说明
单图处理format, quality, resize.*, base64压缩、转格式、裁剪
图片水印overlays[].type: image图片叠加层
文字水印overlays[].type: text文字叠加层
纯色遮罩overlays[].type: color颜色遮罩层
多图合成type: composite画布 + 多图层

详细字段说明见 references/operation-schema.md。

image 任务

  • input 必填;output 缺省从 input 派生(如 a.jpg + format: webp → a.webp)。
  • resize:width / height / fit(cover/contain/fill/inside/outside)/ position / withoutEnlargement。
  • overlays:叠加图片/文字/遮罩。
  • base64: true 时,结果附带 data URI(FORGE_OUTPUT_JSON=1 可打印 JSON 报告)。

composite 任务

  • width / height 必填(画布尺寸)。
  • background 背景色(默认 #ffffff)、backgroundOpacity 背景透明度。
  • layers 图层数组:image(坐标/尺寸/fit/opacity/blend)、text(坐标/字号/颜色/字体/对齐)、color(纯色遮罩铺满)。

执行边界

以下场景超出本技能范围,应拒绝并建议换工具:

  • AI 图片放大(需超分模型)
  • SVG 描迹(需矢量工具)
  • 复杂艺术滤镜(需设计工具)
  • 远程图片直接处理(需先下载,可用 icon-image-catch-skill)

异常处理

  • 输入文件不存在:提示检查路径
  • 格式不支持:提示可用格式列表(jpeg, webp, png)
  • 工具未安装:cd "$SKILL_DIR" && npm install
  • 权限问题:提示检查文件权限

与其他技能的关系

技能关系
icon-image-catch-skill远程抓图 → 本技能处理
uniapp-theme-skill主题换肤后,用本技能 icons 模式生成主题色 tabBar 图标

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Image Forge Skill AI skill do?

⚠️ 已迁移到 frontend-icon-skill。图片处理与图标生成能力(压缩、转格式、改尺寸、裁剪、base64、水印、遮罩、多图合成、SVG→PNG)已整体并入 frontend-icon-skill,使用 image-forge.cjs。触发词:「处理图片」「压缩图片」「转 webp」「加水印」「图片合成」「生成图标」「做一套图标」「icon 生成」「生成 png 图标」

Why use Image Forge Skill on TypingMind?

Because you install it once and use it with any model. Image Forge Skill is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Image Forge Skill in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jiushiwon/wg-skills/tree/main/vibeCoding/frontend/image-forge-skill. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Image Forge Skill?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Image Forge Skill?

As many as you like. As long as a model supports skills, you can use Image Forge Skill with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Image Forge Skill AI skill free?

Yes. It is published on GitHub by jiushiwon under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇