agentleFS
ZEROTCREATIVEZEROTCREATIVE/adobe-suite-agent-skills/skills/premiere-pro/SKILL.md

premiere-pro

Skill4 starsChanged 7 months agoMITView on GitHub

Automate Adobe Premiere Pro via ExtendScript. Use when the user asks to create, modify, or query anything in a Premiere Pro project — sequences, tracks, clips, effects, transitions, markers, captions, import, export. Generates and executes JSX ExtendScript via osascript on macOS.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

32 rules. About 0 are common, 16 are distinctive, and 16 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 16

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run scripts/runner.sh with any query script to detect the Premiere Pro version

    line 21
  2. Very specific:

    If multiple versions are installed, the user must choose one — runner.sh will prompt

    line 22
  3. Distinctive:

    Ensure Premiere Pro Preferences > Scripting > "Enable scripting" is checked

    line 23
  4. Very specific:

    Use --background for all query scripts — this skips ppro.activate() so Premiere Pro doesn't steal focus:

    line 31
  5. Distinctive:

    If this is the first interaction or the project context is unknown, also run:

    line 38
  6. Very specific:

    Read the relevant rule file from rules/.

    line 55
  7. Distinctive:

    Before writing or executing any action script, resolve the skill's real (non-symlinked) path:

    line 66
  8. Distinctive:

    Every generated script MUST follow this template:

    line 75
  9. Very specific:

    Use the Write tool to write the script to $SKILL_SCRIPTS/ppro-action.jsx

    line 118
  10. Distinctive:

    All read-only queries (active-state, project-overview, sequence-detail)

    line 127
  11. Distinctive:

    Before generating a custom script, check if a built-in script handles the task:

    line 138
  12. Very specific:

    Read /tmp/ppro-assistant-result.json for the result.

    line 209
  13. Distinctive:

    If a script fails, check these in order:

    line 213
  14. Distinctive:

    ALWAYS use 0-based indexing for tracks, clips, project items, and sequences

    line 221
  15. Distinctive:

    ALWAYS use ticks for time values (254016000000 ticks per second)

    line 222
  16. Very specific:

    ALWAYS write action scripts to $SKILL_SCRIPTS/ppro-action.jsx (the resolved real path)

    line 223
  17. Very specific:

    ALWAYS use relative #include "lib/json2.jsx" and #include "lib/utils.jsx"

    line 224
  18. Distinctive:

    ALWAYS wrap in an IIFE to avoid global scope pollution

    line 225
  19. Very specific:

    ALWAYS use var, never let or const (ES3)

    line 226
  20. Very specific:

    ALWAYS write results to /tmp/ppro-assistant-result.json via writeResult()

    line 227
  21. Very specific:

    ALWAYS use getActiveSequence() to get the active sequence (handles null check)

    line 228
  22. Very specific:

    ALWAYS use --background flag for query scripts to avoid focus-steal

    line 229
  23. Very specific:

    ALWAYS call app.enableQE() before using QE DOM methods

    line 230
  24. Distinctive:

    NEVER use ES5+ syntax: let, const, arrow functions, template literals, destructuring

    line 234
  25. Distinctive:

    NEVER use Array.map, Array.filter, Array.reduce, Array.forEach (not in ES3)

    line 235
  26. Very specific:

    NEVER use JSON.parse or JSON.stringify without including json2.jsx

    line 236
  27. Very specific:

    NEVER write action scripts to /tmp/ — ExtendScript #include can't resolve paths from there

    line 237
  28. Distinctive:

    NEVER hardcode track or clip indices — use names, iteration, or arguments

    line 238
  29. Distinctive:

    NEVER run destructive operations without user confirmation

    line 239
  30. Distinctive:

    NEVER assume a sequence is active without checking

    line 240
  31. Very specific:

    NEVER use cat > file << 'SCRIPT' heredocs — use the Write tool instead

    line 241
  32. Distinctive:

    NEVER use 1-based indexing (this is NOT After Effects)

    line 242

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Overview

This skill automates Premiere Pro by generating ExtendScript (.jsx) and executing it via osascript. It reads project state through query scripts, uses rule files for domain knowledge, and provides built-in scripts for common operations.

First-Time Setup

  1. Run scripts/runner.sh with any query script to detect the Premiere Pro version
  2. If multiple versions are installed, the user must choose one — runner.sh will prompt
  3. Ensure Premiere Pro Preferences > Scripting > "Enable scripting" is checked

Workflow

For every user request:

Step 1: Gather context (auto-run, no confirmation needed)

Use --background for all query scripts — this skips ppro.activate() so Premiere Pro doesn't steal focus:

bash scripts/runner.sh --background scripts/active-state.jsx

Then read /tmp/ppro-assistant-result.json for active sequence, project info, player position.

If this is the first interaction or the project context is unknown, also run:

bash scripts/runner.sh --background scripts/project-overview.jsx

To drill into a specific sequence:

bash scripts/runner.sh --background scripts/sequence-detail.jsx '{"sequenceName": "My Sequence"}'

To list items in a specific bin:

bash scripts/runner.sh --background scripts/project-overview.jsx '{"mode": "bin", "binName": "Footage"}'

Step 2: Load domain knowledge

Read the relevant rule file from rules/. Always read rules/extendscript-fundamentals.md — it contains ES3 constraints and the Premiere Pro DOM hierarchy.

Task involvesLoad rule file
Sequences (create, configure)rules/sequence-management.md
Clips (insert, trim, properties)rules/clip-operations.md
Effects and transitionsrules/effects-transitions.md
Import media, exportrules/import-export.md

Step 3: Resolve the skill's real path

Before writing or executing any action script, resolve the skill's real (non-symlinked) path:

SKILL_SCRIPTS="$(readlink -f ~/.claude/skills/premiere-pro-assistant/scripts 2>/dev/null || readlink ~/.claude/skills/premiere-pro-assistant/scripts)"
echo "$SKILL_SCRIPTS"

Step 4: Generate the action script

Every generated script MUST follow this template:

#include "lib/json2.jsx"
#include "lib/utils.jsx"

(function() {
    try {
        var args = readArgs();
        var seq = getActiveSequence();
        if (!seq) return;

        // ... action code ...

        writeResult({ success: true, message: "<what was done>" });
    } catch (e) {
        try { writeResult({ error: e.toString(), line: e.line, fileName: e.fileName }); }
        catch(e2) { writeError(e.toString(), "line:" + e.line); }
    }
})();

utils.jsx helpers available for generated scripts

FunctionPurpose
writeResult(obj)Write JSON result to /tmp/ppro-assistant-result.json
writeError(msg, detail)Last-resort error capture
readArgs()Read args from /tmp/ppro-assistant-args.json
getActiveSequence()Returns active sequence or writes error and returns null
ticksToSeconds(ticks)Convert ticks to seconds
secondsToTicks(seconds)Convert seconds to ticks string
getSequenceByName(name)Find sequence by name
findProjectItemByName(name)Find project item by name (recursive)
findProjectItemByPath(path)Find project item by media path
getTrackClips(track)Get array of all clips on a track
getVideoTracks(seq)Get array of all video tracks
getAudioTracks(seq)Get array of all audio tracks
hexToRGB(hex)"#ff0000" -> [255, 0, 0]
appendLog(message)Append to ~/.ppro-assistant-extendscript.log

Write the script using the Write tool, then execute with a short bash command:

  1. Use the Write tool to write the script to $SKILL_SCRIPTS/ppro-action.jsx
  2. Execute it with bash:
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/ppro-action.jsx"

Step 5: Execute or confirm

Auto-run (no confirmation needed):

  • All read-only queries (active-state, project-overview, sequence-detail)
  • Non-destructive additions: inserting a clip, adding a marker, creating a bin

Confirm before running (show the script and ask the user):

  • Deleting clips or sequences
  • Export operations
  • Bulk modifications
  • Any operation the user might not expect

Built-in Action Scripts

Before generating a custom script, check if a built-in script handles the task:

Import Media — import files into project:

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/import-media.jsx" '{"files": ["/path/to/clip.mp4"], "binName": "Footage"}'

Create Sequence — new sequence:

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/create-sequence.jsx" '{"name": "Main Edit"}'
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/create-sequence.jsx" '{"name": "Main Edit", "fromClip": "clip.mp4"}'

Insert Clip — place a clip on the timeline:

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/insert-clip.jsx" '{"clipName": "hero_shot.mp4", "videoTrack": 0, "atSeconds": 0}'
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/insert-clip.jsx" '{"clipName": "b-roll.mp4", "atEnd": true}'
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/insert-clip.jsx" '{"clipName": "intro.mp4", "insertMode": "insert"}'

Set Clip Properties — modify clips on the timeline:

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/set-clip-properties.jsx" '{"clipIndex": 0, "speed": 2.0}'
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/set-clip-properties.jsx" '{"clipName": "hero_shot.mp4", "disabled": true}'

Apply Transition — add transitions between clips (requires QE DOM):

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/apply-transition.jsx" '{"clipIndex": 0, "transition": "Cross Dissolve", "duration": 1.0}'
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/apply-transition.jsx" '{"clipIndex": 1, "transition": "Dip to Black", "position": "start"}'

Apply Effect — add effects to clips (requires QE DOM):

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/apply-effect.jsx" '{"clipIndex": 0, "effect": "Gaussian Blur", "params": {"Blurriness": 25}}'
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/apply-effect.jsx" '{"clipIndex": 0, "effect": "Lumetri Color"}'

Add Markers — add sequence markers:

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/add-markers.jsx" '{"markers": [{"time": 5.0, "name": "Chapter 1", "comments": "Introduction"}]}'

Add Captions — import SRT captions:

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/add-captions.jsx" '{"srtPath": "/path/to/subtitles.srt"}'

Set Audio Levels — adjust volume on clips or tracks:

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/set-audio-levels.jsx" '{"trackIndex": 0, "clipIndex": 0, "volumeDb": -6}'
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/set-audio-levels.jsx" '{"trackIndex": 1, "allClipsVolumeDb": -12}'
bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/set-audio-levels.jsx" '{"trackIndex": 0, "mute": true}'

Create Bin — create bins in the project panel:

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/create-bin.jsx" '{"name": "B-Roll", "parentBin": "Footage"}'

Export Sequence — export via AME or direct (confirm before running):

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/export-sequence.jsx" '{"outputPath": "~/Desktop/final.mp4", "presetPath": "/path/to/preset.epr"}'

Step 6: Execute and read result

bash "$SKILL_SCRIPTS/runner.sh" "$SKILL_SCRIPTS/ppro-action.jsx" '{"arg1": "value1"}'

Read /tmp/ppro-assistant-result.json for the result.

Debugging failures

If a script fails, check these in order:

  1. ~/.ppro-assistant-log — runner.sh logs every execution
  2. /tmp/ppro-assistant-error.txt — JXA-level errors
  3. ~/.ppro-assistant-extendscript.log — ExtendScript-level logs from appendLog()
  4. Premiere Pro Preferences — Ensure scripting is enabled

MUST

  • ALWAYS use 0-based indexing for tracks, clips, project items, and sequences
  • ALWAYS use ticks for time values (254016000000 ticks per second)
  • ALWAYS write action scripts to $SKILL_SCRIPTS/ppro-action.jsx (the resolved real path)
  • ALWAYS use relative #include "lib/json2.jsx" and #include "lib/utils.jsx"
  • ALWAYS wrap in an IIFE to avoid global scope pollution
  • ALWAYS use var, never let or const (ES3)
  • ALWAYS write results to /tmp/ppro-assistant-result.json via writeResult()
  • ALWAYS use getActiveSequence() to get the active sequence (handles null check)
  • ALWAYS use --background flag for query scripts to avoid focus-steal
  • ALWAYS call app.enableQE() before using QE DOM methods

FORBIDDEN

  • NEVER use ES5+ syntax: let, const, arrow functions, template literals, destructuring
  • NEVER use Array.map, Array.filter, Array.reduce, Array.forEach (not in ES3)
  • NEVER use JSON.parse or JSON.stringify without including json2.jsx
  • NEVER write action scripts to /tmp/ — ExtendScript #include can't resolve paths from there
  • NEVER hardcode track or clip indices — use names, iteration, or arguments
  • NEVER run destructive operations without user confirmation
  • NEVER assume a sequence is active without checking
  • NEVER use cat > file << 'SCRIPT' heredocs — use the Write tool instead
  • NEVER use 1-based indexing (this is NOT After Effects)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.