$npx -y skills add aedev-tools/adobe-agent-skills --skill after-effectsAutomate Adobe After Effects via ExtendScript. Use when the user asks to create, modify, or query anything in an After Effects project — layers, keyframes, expressions, effects, compositions, assets, rendering, batch operations. Generates and executes JSX ExtendScript via osascri
| 1 | ## Overview |
| 2 | |
| 3 | This skill automates After Effects by generating ExtendScript (.jsx) and executing it via osascript. It reads project state through query scripts, uses rule files for domain knowledge, and wraps all mutations in undo groups. |
| 4 | |
| 5 | ## First-Time Setup |
| 6 | |
| 7 | 1. Run `scripts/runner.sh` with any query script to detect the AE version |
| 8 | 2. If multiple AE versions are installed, the user must choose one — runner.sh will prompt |
| 9 | 3. Ensure AE Preferences > Scripting & Expressions > "Allow Scripts to Write Files and Access Network" is enabled |
| 10 | |
| 11 | ## Workflow |
| 12 | |
| 13 | For every user request: |
| 14 | |
| 15 | ### Step 1: Gather context (auto-run, no confirmation needed) |
| 16 | |
| 17 | Use `--background` for all query scripts — this skips `ae.activate()` so AE doesn't steal focus: |
| 18 | |
| 19 | ```bash |
| 20 | bash scripts/runner.sh --background scripts/active-state.jsx |
| 21 | ``` |
| 22 | Then read `/tmp/ae-assistant-result.json` for active comp, selected layers, CTI. |
| 23 | |
| 24 | If this is the first interaction or the project context is unknown, also run: |
| 25 | ```bash |
| 26 | bash scripts/runner.sh --background scripts/project-overview.jsx |
| 27 | ``` |
| 28 | This returns a **summary** by default: folder tree with counts, all comps listed, footage grouped by file type. NOT every individual file. |
| 29 | |
| 30 | To drill into a specific folder: |
| 31 | ```bash |
| 32 | bash scripts/runner.sh --background scripts/project-overview.jsx '{"mode": "folder", "folderName": "Images"}' |
| 33 | ``` |
| 34 | |
| 35 | Only use full mode when you actually need every item listed: |
| 36 | ```bash |
| 37 | bash scripts/runner.sh --background scripts/project-overview.jsx '{"mode": "full"}' |
| 38 | ``` |
| 39 | |
| 40 | ### Step 2: Drill down if needed (auto-run) |
| 41 | |
| 42 | If the task targets a specific comp: |
| 43 | ```bash |
| 44 | bash scripts/runner.sh --background scripts/comp-detail.jsx '{"compName": "Comp Name"}' |
| 45 | ``` |
| 46 | |
| 47 | If the task targets specific layers: |
| 48 | ```bash |
| 49 | bash scripts/runner.sh --background scripts/layer-detail.jsx '{"layerNames": ["Layer 1", "Layer 2"]}' |
| 50 | ``` |
| 51 | |
| 52 | Omit `compName` to use the active comp. Omit `layerNames` to use selected layers. |
| 53 | |
| 54 | #### Additional query scripts |
| 55 | |
| 56 | **Expression errors** — scan for broken expressions: |
| 57 | ```bash |
| 58 | bash scripts/runner.sh --background scripts/expression-errors.jsx |
| 59 | bash scripts/runner.sh --background scripts/expression-errors.jsx '{"compName": "Main Comp"}' |
| 60 | ``` |
| 61 | |
| 62 | **Font inventory** — list all fonts used across the project: |
| 63 | ```bash |
| 64 | bash scripts/runner.sh --background scripts/font-inventory.jsx |
| 65 | ``` |
| 66 | |
| 67 | **Project audit** — comprehensive health check (unused footage, missing files, expression errors, duplicate solids, font issues, empty folders): |
| 68 | ```bash |
| 69 | bash scripts/runner.sh --background scripts/project-audit.jsx |
| 70 | bash scripts/runner.sh --background scripts/project-audit.jsx '{"checks": ["unused", "missing", "expressions"]}' |
| 71 | ``` |
| 72 | |
| 73 | ### Step 3: Load domain knowledge |
| 74 | |
| 75 | Read the relevant rule file from `rules/`. Always read `rules/extendscript-fundamentals.md` — it contains ES3 constraints that apply to every generated script. |
| 76 | |
| 77 | | Task involves | Load rule file | |
| 78 | |---|---| |
| 79 | | Layers (create, move, parent, duplicate) | [rules/layer-manipulation.md](rules/layer-manipulation.md) | |
| 80 | | Keyframes, animation, easing | [rules/keyframes-animation.md](rules/keyframes-animation.md) | |
| 81 | | Expressions | [rules/expressions.md](rules/expressions.md) | |
| 82 | | Compositions (create, precompose, nest) | [rules/composition-management.md](rules/composition-management.md) | |
| 83 | | Effects and parameters | [rules/effects.md](rules/effects.md) | |
| 84 | | Import, footage, assets | [rules/assets-footage.md](rules/assets-footage.md) | |
| 85 | | Render queue, export | [rules/rendering.md](rules/rendering.md) | |
| 86 | | Bulk/batch operations | [rules/batch-operations.md](rules/batch-operations.md) | |
| 87 | | Version-specific features | [references/ae-api-versions.md](references/ae-api-versions.md) | |
| 88 | |
| 89 | ### Step 4: Generate the action script |
| 90 | |
| 91 | **CRITICAL: Resolve the skill's real path first** |
| 92 | |
| 93 | Before writing or executing any action script, resolve the skill's real (non-symlinked) path. ExtendScript `#include` cannot follow symlinks, so you MUST use the real filesystem path. |
| 94 | |
| 95 | Run this once at the start of each session: |
| 96 | ```bash |
| 97 | SKILL_SCRIPTS="$(readlink -f ~/.claude/skills/after-effects-assistant/scripts 2>/dev/null || readlink ~/.claude/skills/after-effects-assistant/scripts)" |
| 98 | echo "$SKILL_SCRIPTS" |
| 99 | ``` |
| 100 | |
| 101 | Use the resolved path (`$SKILL_SCRIPTS`) for all subsequent Write and Bash commands in this session. |
| 102 | |
| 103 | **Why this matters:** |
| 104 | - `~/.claude/skills/` is typically a symlink — ExtendScript `#inclu |