home / skills / openclaw / skills / photoshop-automator

photoshop-automator skill

/skills/abdul-karim-mia/photoshop-automator

This skill automates Photoshop workflows on Windows and macOS by executing ExtendScript, updating text, applying filters, and exporting assets.

npx playbooks add skill openclaw/skills --skill photoshop-automator

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
2.6 KB
---
name: photoshop-automator
description: "Professional Adobe Photoshop automation via COM/ExtendScript bridge. Supports text updates, filters, and action playback."
metadata:
  {
    "openclaw":
      {
        "requires": { 
          "bins": ["cscript", "osascript"], 
          "os": ["windows", "macos"],
          "env": [], 
          "config": [] 
        }
      }
  }
---

# Photoshop Automator Skill (v1.2.4)

This skill provides a high-performance bridge for automating Adobe Photoshop (vCS6 - 2026+) on Windows and macOS using the ExtendScript (JSX) engine via VBScript or AppleScript.

## Commands

- **runScript**: Executes raw ExtendScript (ES3) code. Use this for complex document manipulation.
- **updateText**: Target a specific text layer by name and update its contents instantly.
- **createLayer**: Create new art layers with custom opacity and blending modes.
- **applyFilter**: Apply a professional Gaussian Blur filter to the active layer.
- **playAction**: Play recorded Photoshop actions (.atn) by name and set.
- **export**: Save the active document as a high-quality PNG or JPEG.

## 🛠 AI Protocol

### 1. Technical Constraints (Strict)
- **ES3 Syntax Only**: Photoshop's ExtendScript engine uses **ECMAScript 3 (ES3)**. 
    - ❌ **DO NOT USE**: `const`, `let`, arrow functions `() => {}`, template literals `` `${}` ``, or `Map`/`Set`.
    - ✅ **USE**: Only `var`, standard `function` declarations, and string concatenation (`'a' + b`).
- **Assume Active Document**: Commands operate on the *active* document. If none is open, scripts will fail unless they call `app.documents.add()`.

### 2. Security & Side Effects
- **Filesystem Access**: The `runScript` command allows execution of arbitrary ExtendScript. This engine has **direct access to the host filesystem**.
- **Side Effects**: Scripts can create, modify, or delete files on the local machine via the `File` and `Folder` objects.
- **Verification**: Always review dynamically generated scripts before execution to prevent unintended document or filesystem modifications.

### 3. Error Handling
- **GUI Blocks**: If Photoshop has a modal dialog open (e.g., Save As window, error popup), COM operations will hang or fail. Direct the user to close any open dialogs.
- **Layer Presence**: If `updateText` fails, ensure the layer name provided matches exactly (case-sensitive) with the layer in the PSD.

## Setup

Ensure Adobe Photoshop is installed on the host system. The skill automatically uses the registered COM server.

---
Developed for the OpenClaw community by [Abdul Karim Mia](https://github.com/abdul-karim-mia).

Overview

This skill provides professional Adobe Photoshop automation using a COM/ExtendScript bridge for Windows and AppleScript bridge for macOS. It exposes high-level commands like runScript, updateText, createLayer, applyFilter, playAction, and export to streamline repetitive image tasks. The focus is reliable, scriptable control of Photoshop documents from Python workflows.

How this skill works

Commands send ExtendScript (ECMAScript 3) code to Photoshop via the platform-specific bridge (VBScript/COM on Windows, AppleScript on macOS). The skill assumes an active document and uses the ExtendScript engine to manipulate layers, text, filters, recorded actions, and file exports. runScript executes raw ES3 code; other commands generate controlled JSX snippets for common operations.

When to use it

  • Batch-update text across templates or mockups
  • Create or modify layers programmatically in design pipelines
  • Apply filters like Gaussian Blur to many files without manual steps
  • Trigger recorded Photoshop actions (.atn) as part of an automated workflow
  • Export high-quality PNG/JPEG files from automated processes

Best practices

  • Always review any dynamically generated ExtendScript before executing runScript due to filesystem access risks
  • Use exact, case-sensitive layer names for updateText to avoid failures
  • Make sure Photoshop has no modal dialogs open to prevent COM hangups
  • Prefer structured commands (updateText, createLayer, applyFilter) over raw runScript when possible for safer, predictable results
  • Test scripts on a copy of your document to avoid accidental data loss

Example use cases

  • Automated social media image generation: update text layers, apply export settings, and save ready-to-post images
  • Template-driven marketing assets: populate product names and prices across hundreds of PSD templates
  • Batch photo processing: apply Gaussian Blur or other scripted adjustments then export optimized JPEGs
  • Integration with CI/CD for design handoff: run Photoshop actions to produce standardized deliverables automatically

FAQ

Is my filesystem at risk when using this skill?

runScript executes ExtendScript that can access the local filesystem via File and Folder objects. Review scripts before running and avoid executing untrusted code.

What JavaScript features are allowed in scripts sent to Photoshop?

Photoshop ExtendScript supports only ECMAScript 3. Use var and function declarations; do not use const, let, arrow functions, template literals, Map, or Set.