photoshop-controller

Drive native Photoshop CS6 by natural language to perform posters, retouching, composites, background removal, batch tasks, and similar workflows; generate an executable script when connection is unavailable.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "photoshop-controller" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-b64cb37202c8afce86d21821c283bf9ce64aa12c8cc8ba79bc7b5d49cbb25b7a. Verify the upstream source and version against https://skillhub.cn/skills/user_6cb94693/photoshop-controller before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Drive native Photoshop CS6 by natural language to perform posters, retouching, composites, background removal, batch tasks, and similar workflows; generate an executable script when connection is unavailable.

0 Downloads

Introduction source: third_party · user_6cb94693 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: photoshop-controller
description: 用自然语言驱动本机 Photoshop CS6 做海报/修图/合成/去背/批量等广泛任务(自动执行,连不上时生成脚本)

photoshop-controller

用自然语言驱动本机 Adobe Photoshop CS6 完成广泛任务:海报/名片/Banner、修图调色、磨皮祛痘、去背抠图、水印合成、批量改尺寸、色卡/拼图等。 当本机连不上 Photoshop 时,自动生成 .jsx 脚本并给出手动运行指引,绝不报错崩溃(退出码恒为 0)。

触发场景

  • 用户说:帮我做张海报 / 去个白底 / 批量改尺寸 / 加水印 / 调个色 / 做色卡 等。
  • 任何明确或隐含需要调用本机 Photoshop CS6 进行图形处理的需求。

完整工作流

  1. 解析需求:从用户自然语言提取意图与参数(画布尺寸、文字、颜色、图片路径、导出格式/目录等)。

  2. 找配方:依据 references/recipes.md(35 条任务→配方)+ references/recipes-portrait.md(人像/证件照日常案例)把用户需求映射到实现路径,确定用哪些能力。

    • 运行时联网兜底(Path B):若 references 中没有匹配配方(遇到没写过的需求),先用 WebSearch / 浏览器检索 Photoshop CS6 <需求> ExtendScript/动作/AM 事件,优先选用 DOM 或已验证 AM 事件(见 jsx-cheatsheet-p1.md C12 滤镜事件清单)落地实现;CS6 是 2012 年版本,网上多数教程是 CC/新版,DOM 不同,必须筛选能用于 CS6 的写法,不要照搬新版 API。
  3. 取 API(DOM 优先,缺失用 AM):

    • 优先用 references/jsx-cheatsheet.md(P0 DOM 干净可用部分:文档/图层/调整/滤镜/选区/文字/颜色/导出/通道/混合模式/图层类型)。
    • 若某项 CS6 DOM 没有或无法精细控制(色相/饱和度、渐变填充层、纯色填充层、加蒙版、图层样式、转/替换智能对象、内容识别填充),改用 references/jsx-cheatsheet-p1.md(P1 AM 配方 C2–C10);置入图片见 C11(DOM open+duplicate,非 AM)。
    • 生成约束已放开:可使用 references 中全部已文档化 API(不再限于 20 项);DOM 缺失必须改用 AM 片段,不要臆造不存在的方法(如 adjustHueSaturation 在 CS6 不存在,必须 AM C6)。
    • 脚本开头设置单位与 AM 助手:
      app.preferences.rulerUnits = Units.PIXELS;
      var s2t = function (s) { return app.stringIDToTypeID(s); };
      var c2t = function (s) { return app.charIDToTypeID(s); };
    • 导出路径必须用桥接注入的全局变量 EXPORT_DIR,不得写死用户目录。
    • 脚本结尾返回出图路径:
      return "OK:" + outPath;
    • 不要写 #target photoshop(COM 已定向)。桥接会把整段包进 function __ps_run__(){ ... } __ps_run__();,所以直接写顶层 return 即可。
  4. 调用桥接执行(把 .jsx 落盘后执行):

    python "<skill_dir>/bridge/run_jsx.py" --jsx <jsx路径> [--dry-run] [--export-dir <目录>] [--json]
    • <skill_dir> 为本 Skill 目录(即本文件所在目录)。
    • 用户指定了绝对导出目录时加 --export-dir <目录>;否则默认 <当前工作区>/photoshop-output。
    • 需强制只看生成效果时加 --dry-run。
    • 需结构化结果时加 --json(输出完整 PsResult 单行 JSON)。
  5. 读取 stdout 回复用户:

    • 成功:mode=exec 且带 output_path=...,把出图路径告知用户。
    • dry-run:mode=dry-run 且带 jsx_path=...,告诉用户:

      已生成 Photoshop 脚本(连不上本机 Photoshop)。请在 Photoshop 中:文件 → 脚本 → 浏览,选择该文件即可执行。脚本路径:<jsx_path>

诚实边界(CS6 不支持的能力,遇到请礼貌说明并给替代方案,不要瞎编)

  • 无生成式 / AI 去背、无 Generative Fill / 生成式填充。
  • 无 Sky Replacement(天空替换)、无 Select Subject / 对象选择 / 选择主体。
  • 无 WebP / HEIF 直接读写:导出统一用 JPEG / PNG / PSD。
  • 无 Neural Filters(神经滤镜)。
  • 去背只能走通道法 / 蒙版 / 色彩范围 / 快速选择近似(见 recipes.md 任务 15 与 examples/background_remove.jsx)。
  • 色相/饱和度、渐变、多数调整层与全部图层样式 CS6 DOM 无精细控制 → 必须 AM(见 jsx-cheatsheet-p1.md)。
  • 智能对象 CS6 不能用 layer.kind = SMARTOBJECT 转换 → 必须 newPlacedLayer AM(C3)。
  • 加蒙版无 DOM → 必须 AM(C7)。
  • PS pathItems 无 rectangle/ellipse 快捷构造,必须手动 PathPointInfo(A8)。
  • 字体用 PostScript 名且本机需安装(中文默认 Microsoft YaHei)。
  • 液化(Liquify)/瘦脸、发丝级精修(Refine Edge)、换脸/复杂合成:CS6 脚本极不可靠或不可行——液化是 AM 插件操作、Refine Edge 脚本支持弱。遇到这类需求请说明限制并建议用户用 GUI/动作,或仅做可脚本化的近似(如高低频磨皮代替液化)。
  • 滤镜事件需认 CS6 可用清单:gaussianBlur/surfaceBlur/dustAndScratches/highPass/hueSaturation 等以 AM + pixelsUnit 单位调用(见 jsx-cheatsheet-p1.md C12);adjustHueSaturation 在 CS6 DOM 不存在,必须走 AM。

安全与二次确认规则(硬约束)

  • 破坏性编辑前默认先 duplicate 背景层(亮度/对比度/滤镜直接改像素);优先调整图层/智能对象(非破坏)。
  • 导出/另存一律新文件名,绝不静默覆盖原图;原文件保护见 references/jsx-handbook.md 安全规则。
  • 覆盖保存(Save)/ 删除图层(layer.remove())需向用户明确确认后再执行。
  • 生成脚本只允许使用 references 中声明的能力与 API,禁止执行任意系统命令或访问无关文件。

依赖说明

  • 需 Python 3 + pip install pywin32(见 bridge/requirements.txt)。
  • 仅支持 Windows(COM 调用 Photoshop)。
  • 真实执行需本机安装并运行 Adobe Photoshop CS6(Windows)。
  • 自检与手动验证见 tests/README.md。

参考文件索引

  • references/recipes.md:任务→配方(先在这里找实现路径)。
  • references/recipes-portrait.md:人像/证件照日常案例(换底色、去背换背景、磨皮美白祛斑、证件照排版、调色预设)。
  • references/jsx-cheatsheet.md:P0 DOM 干净可用 API(首选)。
  • references/jsx-cheatsheet-p1.md:P1/P2 AM 配方与进阶(DOM 缺失时用;C11 置入、C12 滤镜事件、C13 跨文档复制、C14 调色预设、C15 液化/动作触发)。
  • references/jsx-handbook.md:跨文件约定、EXPORT_DIR/包裹/AM 助手、错误映射、不支持能力清单。
  • examples/:可直接 dry-run 的示例(海报/水印/去背/人像修图/证件照换底色与排版/调色预设 color_grade/液化动作触发 liquify_via_action 等)。

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 支持海报、修图、去背、批量处理等高频刚需场景
  • 实现端到端闭环:自动执行或生成脚本兜底,绝不报错崩溃
  • 明确列出 CS6 能力边界并提供替代方案,诚实可靠
Trigger Precision95/100

Highlights

  • 触发词覆盖全面(做海报/去白底/批量改尺寸/加水印等)
  • 边界清晰,明确限定为本机 Photoshop CS6 图形处理需求
Structure and Standards90/100

Areas to improve

  • Description in the wrong location Reported severity: Minor

    顶层 frontmatter 中 description 为空,实际描述内容位于 skill_body 内部

    Recommendation: 将 description 内容移至顶层 frontmatter,保持规范

  • 缺少When to Use章节 Reported severity: Minor

    文档未显式包含 When to Use 章节

    Recommendation: 建议增加 When to Use 章节,明确使用时机与典型场景

  • Document is too long Reported severity: Minor

    主文档约480行,略长

    Recommendation: 可考虑将部分细节移至 references 或 examples,保持主文档简洁

Highlights

  • 工作流分步清晰(解析→找配方→取API→执行→回复)
  • 包含完整出口条件与端到端示例
  • frontmatter 结构基本完整
Execution Reliability90/100

Highlights

  • 工具链明确(Python + pywin32 + COM桥接)
  • 覆盖主要异常场景(连不上PS时生成.jsx脚本兜底)
  • 不可逆操作有二次确认机制,安全规则完善
  • 导出路径使用桥接变量,避免写死用户目录
Evidence Verifiability (mean of the first four)92/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 74

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.