Split Image logo

Split Image

Community
JianhuiWei7
split-image

【图片四宫格分割工具】将一张图片均分为 2x2 四宫格(4张子图),常用于真人参考图视频生成场景 —— 用户提供真人图片作为视频生成参考时,必须先调用此技能将其分割为 4 张子图,再在 video-gen 的 prompt 中以 [图1][图1][图1][图1] 的形式引用,以规避版权审核。

Overview

PublisherJianhuiWei7
RepositoryVideoWeaver
Skill namesplit-image
Stars
48
Forks
1
Bundled files
1
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.

  • 1 bundled files

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

  • Open source

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

Installation

Install the Split Image 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/JianhuiWei7/VideoWeaver/tree/main/skills/split-image
  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/JianhuiWei7/VideoWeaver.git /tmp/VideoWeaver
mkdir -p .claude/skills
cp -r /tmp/VideoWeaver/skills/split-image .claude/skills/split-image
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Split Image 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 Split Image 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 Split Image 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.

Split Image (图片四宫格分割)

环境依赖: Pillow

支持模式

2x2 网格分割

将输入图片按宽高中线均分为 4 张子图,输出顺序固定为:

  • grid_1:左上(top-left)
  • grid_2:右上(top-right)
  • grid_3:左下(bottom-left)
  • grid_4:右下(bottom-right)

奇数尺寸按整除处理(width // 2、height // 2),最多损失 1 像素边缘,不影响人物参考用途。输入图小于 100x100 时拒绝处理。

参数:

  • --image_path: 输入图片的绝对路径。
  • --session-key: (Optional; OpenClaw Required) 输出目录 session-key。CodeX/Claude Code 环境会自动识别,不需要传入内容;OpenClaw 环境必须运行 session_status 获取session-key并且传入, 格式通常为 agent:{agent_id}:{session_id}。

典型使用案例

1. 基础调用

将一张图片分割为 4 张子图,自动保存到 session 的 images/ 目录下:

bash
python split-image/scripts/split_image.py \
  --image_path "/path/to/image.jpg" \
  --session-key "agent:{agent_id}:{session_id}"

stdout 会输出 4 行绝对路径(顺序:左上、右上、左下、右下),便于上游脚本直接解析:

/path/to/session/images/image_grid_1.jpg
/path/to/session/images/image_grid_2.jpg
/path/to/session/images/image_grid_3.jpg
/path/to/session/images/image_grid_4.jpg

2. 真人参考图视频生成联动(核心用法)

当需要用真人图片作为 video-gen 的参考图但担心版权审核时,必须先用本技能将真人图分割为 4 张子图,再将这 4 张子图路径传给 video-gen,并在 prompt 中以 [图1][图1][图1][图1] 的形式强调参考这 4 张图作为人物形象:

bash
# 步骤 1:分割真人参考图
python split-image/scripts/split_image.py \
  --image_path "/path/to/real_person.jpg" \
  --session-key "agent:test:test"
# 输出 4 张子图路径 grid_1 ~ grid_4

# 步骤 2:调用 video-gen,将 4 张子图作为参考图传入
# prompt 示例:"参考[图1][图1][图1][图1]作为人物形象,生成一段人物在公园散步的视频"
# images 参数:[grid_1路径, grid_2路径, grid_3路径, grid_4路径]

关键点:prompt 中必须显式写出 [图1][图1][图1][图1](4 次引用)而非 [图1],这是绕过版权审核的已验证有效写法。

运行模式与日志监控

默认行为: 该脚本为前台同步执行(Blocking),直接在终端输出执行结果。

完成状态:

  • 成功:stdout 输出 4 行绝对路径,每行一条,顺序为 grid_1 ~ grid_4。
  • 失败:stdout/stderr 输出以 Error: 开头的错误信息,脚本以非零状态码退出。

参数说明

参数名说明
--image_path(必填)需要分割的输入图片文件绝对路径。支持常见格式(jpg/png/webp 等 Pillow 支持的格式)。
--session-key(Optional; OpenClaw Required) 输出目录 session-key。CodeX/Claude Code 环境会自动识别,不需要传入内容;OpenClaw 环境必须运行 session_status 获取session-key并且传入, 格式通常为 agent:{agent_id}:{session_id}。

执行规范

  • 路径检查:确保传入的 --image_path 在本地确实存在。
  • 最小尺寸:输入图片宽或高小于 100 像素时会直接报错拒绝处理。
  • 输出命名:输出文件固定命名为 {原文件名}_grid_1.{后缀} ~ _grid_4.{后缀},与原文件后缀一致。
  • 中间产物:4 张子图作为中间产物平铺在 session images/ 目录下,供下游(如 video-gen)直接引用。
  • 结果反馈:分割成功后,向用户汇报:"✅ 图片四宫格分割成功!已生成 4 张子图至 session images/ 目录。" 并附上 4 条路径。

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 Split Image AI skill do?

【图片四宫格分割工具】将一张图片均分为 2x2 四宫格(4张子图),常用于真人参考图视频生成场景 —— 用户提供真人图片作为视频生成参考时,必须先调用此技能将其分割为 4 张子图,再在 video-gen 的 prompt 中以 [图1][图1][图1][图1] 的形式引用,以规避版权审核。

Why use Split Image on TypingMind?

Because you install it once and use it with any model. Split Image 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 Split Image in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/JianhuiWei7/VideoWeaver/tree/main/skills/split-image. 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 Split Image?

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 Split Image?

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

Is the Split Image AI skill free?

It is published on GitHub by JianhuiWei7. Check the repository for licensing terms. 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 👇