Skill: abdul-karim-mia/adobe-automator (version 1.1.2)

--- name: adobe-automator description: "Universal Adobe application automation via ExtendScript bridge. Supports Photoshop, Illustrator, InDesign, Premiere Pro, and After Effects." metadata: { "openclaw": { "requires": { "bins": [], "os": ["windows", "macos"], "env": [], "config": [] } } } --- # Adobe Master Automator (v1.1.2) A generalized skill for automating multiple Adobe applications using a cross-platform ExtendScript bridge. ## Supported Applications - **Photoshop** - **Illustrator** - **InDesign** - **Premiere Pro** - **After Effects** ## Commands ### runScript Executes raw ExtendScript (ES3) in the target application. **Parameters:** - `app`: Target application (`photoshop`, `illustrator`, `indesign`, `premiere`, `aftereffects`). - `script`: The JSX code to execute. ## 🛠 AI Protocol ### 1. Technical Constraints - **ES3 Syntax Only**: Adobe apps use the ExtendScript (ES3) engine. Avoid modern JS features. - **Target App Availability**: Ensure the target application is installed and running (or able to launch) on the host system. ### 2. Security & Side Effects > [!CAUTION] > **High Risk Capability**: The `runScript` command accepts and executes **arbitrary ExtendScript (JSX)** code. Attempting to restrict this would break the skill's core purpose, but users must be aware of the implications. - **Filesystem Access**: The Adobe ExtendScript engine has **unrestricted access to the host filesystem** via the `File` and `Folder` objects. - **Untrusted Scripts**: ❌ **NEVER** execute scripts from untrusted sources. A malicious script could delete files, exfiltrate data, or install persistent malware. - **Verification**: Always inspect the `script` parameter payload before allowing execution. ## Setup The skill automatically detects your operating system and routes commands to the appropriate application. - **Windows**: Uses built-in `cscript` (Windows Script Host). - **macOS**: Uses built-in `osascript` (AppleScript). --- Developed for the OpenClaw community by [Abdul Karim Mia](https://github.com/abdul-karim-mia).

path: _meta.json
content: {
    "name": "adobe-automator",
    "version": "1.1.2",
    "description": "Generalized Adobe application automation script for Photoshop, Illustrator, InDesign, Premiere Pro, and After Effects.",
    "author": "Abdul Karim Mia",
    "homepage": "https://github.com/abdul-karim-mia/adobe-automator",
    "metadata": {
        "openclaw": {
            "requires": {
                "bins": [],
                "os": [
                    "windows",
                    "macos"
                ],
                "env": [],
                "config": []
            }
        }
    }
}

path: handler.js
content: const { spawnSync } = require('child_process');
const fs = require('fs');
const path = require('path');
const os = require('os');

const APP_MAP = {
    photoshop: {
        win: 'Photoshop.Application',
        mac: 'Adobe Photoshop'
    },
    illustrator: {
        win: 'Illustrator.Application',
        mac: 'Adobe Illustrator'
    },
    indesign: {
        win: 'InDesign.Application',
        mac: 'Adobe InDesign'
    },
    premiere: {
        win: 'Premiere.Application',
        mac: 'Adobe Premiere Pro'
    },
    aftereffects: {
        win: 'AfterEffects.Application',
        mac: 'Adobe After Effects'
    }
};

const VBS_TEMPLATE = (appId, scriptPath) => `
On Error Resume Next
Set psApp = CreateObject("${appId}")
If Err.Number <> 0 Then
    WScript.Echo "ERROR: ${appId} is not installed or the COM object is not registered."
    WScript.Quit 1
End If
result = psApp.DoJavaScriptFile("${scriptPath.replace(/\\/g, '\\\\')}")
If Err.Number <> 0 Then
    WScript.Echo "ERROR: JSX Execution failed: " & Err.Description
    WScript.Quit 1
Else
    WScript.Echo "SUCCESS"
End If
`;

const APPLE_SCRIPT_TEMPLATE = (appName, scriptPath) => `
tell application "${appName}"
    do javascript file "${scriptPath}"
end tell
`;

module.exports = {
    name: 'adobe-automator',
    version: '1.1.2',
    description: 'Adobe Application Automation Bridge',

    commands: {
        runScript: {
            description: 'Run a custom ExtendScript (JSX) in an Adobe application',
            params: {
                app: { type: 'string', enum: ['photoshop', 'illustrator', 'indesign', 'premiere', 'aftereffects'], description: 'The Adobe application to target', required: true },
                script: { type: 'string', description: 'The JSX code to execute (ES3)', required: true }
            },
            handler: async (ctx) => {
                const targetApp = ctx.params.app.toLowerCase();
                const config = APP_MAP[targetApp];
                if (!config) return { text: `❌ **Error**: Unsupported application: ${targetApp}` };

                const isWin = os.platform() === 'win32';
                const tempDir = os.tmpdir();
                const timestamp = Date.now();
                const jsxPath = path.join(tempDir, `adobe_script_${timestamp}.jsx`);

                // SECURITY WARNING: This executes arbitrary ExtendScript which has filesystem access.
                // The skill relies on the user/agent to verify the script content before execution.
                fs.writeFileSync(jsxPath, ctx.params.script);

                let result;
                if (isWin) {
                    const vbsPath = path.join(tempDir, `adobe_bridge_${timestamp}.vbs`);
                    fs.writeFileSync(vbsPath, VBS_TEMPLATE(config.win, jsxPath));
                    result = spawnSync('cscript', ['/nologo', vbsPath]);
                    try { fs.unlinkSync(vbsPath); } catch (e) { }
                } else {
                    const appleScript = APPLE_SCRIPT_TEMPLATE(config.mac, jsxPath);
                    result = spawnSync('osascript', ['-e', appleScript]);
                }

                const output = result.stdout.toString().trim() || result.stderr.toString().trim();

                // Cleanup
                try {
                    fs.unlinkSync(jsxPath);
                } catch (e) { }

                if (output.includes('SUCCESS') || (!isWin && result.status === 0)) {
                    return { text: `✅ **${ctx.params.app} script executed successfully**` };
                } else {
                    return { text: `❌ **Adobe Automation Error** (${ctx.params.app}):\n\`\`\`\n${output}\n\`\`\`` };
                }
            }
        }
    }
};


path: package.json
content: {
    "name": "adobe-automator",
    "version": "1.1.2",
    "description": "Cross-platform automation for Adobe Photoshop, Illustrator, InDesign, Premiere Pro, and After Effects.",
    "main": "handler.js",
    "os": [
        "win32",
        "darwin"
    ],
    "engines": {
        "node": ">=16.0.0"
    },
    "author": "Abdul Karim Mia",
    "openclaw": {
        "requires": {
            "bins": [],
            "os": [
                "windows",
                "macos"
            ],
            "files": [],
            "env": [],
            "config": []
        }
    }
}

Security scan verdicts — ClawScan: clean | static analysis: suspicious | VirusTotal: suspicious | SkillSpector: clean (LOW)