From tensorslab-skills
Edits images using tl-image's quickedit model: change aspect ratio, erase objects, remove background, or apply custom edits. Requires TensorsLab authorization.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tensorslab-skills:image_editThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
基于 tl-image 的 quickedit 模型实现快速图像编辑操作。
基于 tl-image 的 quickedit 模型实现快速图像编辑操作。
本技能使用 tl-image 技能的 tensorslab_image.py 脚本,配合 --model quickedit 参数。脚本位于 tl-image 技能的 scripts/ 目录下,必须使用绝对路径执行。根据 tl-image 技能的安装位置确定绝对路径。
例如,如果 tl-image 的 SKILL.md 位于 /path/to/skills/tl-image/SKILL.md,则:
python "<tl-image绝对路径>/scripts/tensorslab_image.py" "<编辑指令>" --source <image_path> --model quickedit
使用前需确保已通过 TensorsLab 授权。运行:
python "<tl-image绝对路径>/scripts/tensorslab_auth.py"
如果之前已授权过(~/.tensorslab/.env 中有 key),则无需重复授权。
所有传给脚本的提示词(prompt)必须用引号包裹,防止 shell 解析问题:
# 正确
python "scripts/tensorslab_image.py" "remove the watermark" --source photo.jpg --model quickedit
python "scripts/tensorslab_image.py" "把天空改成星空" --source photo.jpg --model quickedit
# 错误 - 没有引号
python "scripts/tensorslab_image.py" remove the watermark --source photo.jpg --model quickedit
改变图片宽高比,保持内容不变。
python "<tl-image绝对路径>/scripts/tensorslab_image.py" "保持画面内容不变,调整构图适应新的宽高比" --source input.jpg --model quickedit --resolution 16:9
支持的宽高比:1:1、4:3、3:4、16:9、9:16、3:2、2:3、21:9、9:21
用户请求映射:
1:116:99:164:3从图片中移除指定对象。
python "<tl-image绝对路径>/scripts/tensorslab_image.py" "remove the watermark from the image" --source photo.jpg --model quickedit
python "<tl-image绝对路径>/scripts/tensorslab_image.py" "remove the person in the background" --source photo.jpg --model quickedit
python "<tl-image绝对路径>/scripts/tensorslab_image.py" "remove the logo" --source photo.jpg --model quickedit
擦除提示词应明确描述要移除的对象,并用英文效果最佳。
移除图片背景,只保留主体。
python "<tl-image绝对路径>/scripts/tensorslab_image.py" "remove the background, keep only the main subject" --source portrait.jpg --model quickedit
使用自定义指令编辑图片。
python "<tl-image绝对路径>/scripts/tensorslab_image.py" "change the sky to a starry night" --source input.jpg --model quickedit
python "<tl-image绝对路径>/scripts/tensorslab_image.py" "add snow effect" --source input.jpg --model quickedit --resolution 16:9
可选参数:
--resolution - 输出宽高比(如 16:9、1:1)--output-dir - 自定义输出目录编辑指令使用英文效果最佳,保留用户的创意意图。
所有命令支持以下可选参数:
--output-dir 或 -o - 输出目录(默认: ./tensorslab_output/)--resolution - 输出宽高比(如 16:9、1:1)生成文件名使用格式: yyyy-mm-dd-hh-mm-ss-name.jpg
格式: {timestamp}-{descriptive-name}.jpg
yyyy-mm-dd-hh-mm-ss(24小时制)x9k2、a7b3)示例:
2025-01-19-20-30-05-remove-watermark.jpg2025-01-19-20-31-12-aspect-9-16.jpg2025-01-19-20-32-33-remove-bg.jpg2025-01-19-20-33-48-snow-effect.jpg./tensorslab_output/ 目录Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub tensorslab/skills --plugin ali-video