/creative-media-tooling:adobe-illustrator-scriptingfrom creative-media-tooling
Write, debug, and optimize Adobe Illustrator automation scripts using ExtendScript (JavaScript/JSX). Covers the Illustrator DOM, coordinate system, document/page item APIs, export workflows, and bundled JSX patterns for batch processing and data-driven graphics.
Ships in creative-media-tooling. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Write, debug, and optimize Adobe Illustrator ExtendScript automation by applying the Illustrator DOM, coordinate system, document and page item APIs, export options, and bundled JSX patterns.
Expert guidance for automating Adobe Illustrator through ExtendScript (JavaScript/JSX). This skill covers the Illustrator scripting object model, all major API objects, code patterns, and best practices for writing production-quality .jsx scripts.
references/object-model-quick-reference.md: Use this as a quick lookup for the Illustrator scripting object model, common document and page item types, and related DOM concepts while writing or debugging scripts.scripts/: Contains example Illustrator automation scripts you can use as starting points or implementation patterns for common tasks such as document manipulation, exports, batch processing, and DOM usage. Review and adapt these examples when you need working JSX patterns or want to compare behavior while debugging..jsx or .js files).jsx files| Language | Extension | Platform |
|---|---|---|
| ExtendScript/JavaScript | .jsx, .js | Windows, macOS |
| AppleScript | .scpt | macOS only |
| VBScript | .vbs | Windows only |
This skill focuses on ExtendScript/JavaScript as the cross-platform, most widely used option.
.jsx file#target illustrator when running from ESTK or external tools#targetengine directive: Use #targetengine "session" to persist variables across script executionsExtendScript Toolkit.exe -run script.jsx), or BridgeTalk messages from other Adobe apps. See External Invocation & Argument Passing.activeDocument, pathItems, textFramesapp global references the Application objectdocuments[0] is the frontmost documenttypename property to identify object types at runtimeThe Illustrator DOM follows a strict containment hierarchy:
Application (app)
├── activeDocument / documents[]
│ ├── layers[]
│ │ ├── pageItems[] (all artwork)
│ │ ├── pathItems[]
│ │ ├── compoundPathItems[]
│ │ ├── textFrames[]
│ │ ├── placedItems[]
│ │ ├── rasterItems[]
│ │ ├── meshItems[]
│ │ ├── pluginItems[]
│ │ ├── graphItems[]
│ │ ├── symbolItems[]
│ │ ├── nonNativeItems[]
│ │ ├── legacyTextItems[]
│ │ └── groupItems[]
│ ├── artboards[]
│ ├── views[]
│ ├── selection (array of selected items)
│ ├── swatches[], spots[], gradients[], patterns[]
│ ├── graphicStyles[], brushes[], symbols[]
│ ├── textFonts[] (via app.textFonts)
│ ├── stories[], characterStyles[], paragraphStyles[]
│ ├── variables[], datasets[]
│ └── inkList[], printOptions
├── preferences
├── printerList[]
└── textFonts[]
app): The root object. Provides access to documents, preferences, fonts, and printers. Key properties: activeDocument, documents, textFonts, printerList, userInteractionLevel, version..ai file. Key properties: layers, pageItems, selection, activeLayer, width, height, rulerOrigin, documentColorSpace. Key methods: saveAs(), exportFile(), close(), print().pageItems, pathItems, textFrames, visible, locked, opacity, name, zOrderPosition, color.All scripting API values use points (72 points = 1 inch). Convert other units:
| Unit | Conversion |
|---|---|
| Inches | multiply by 72 |
| Centimeters | multiply by 28.346 |
| Millimeters | multiply by 2.834645 |
| Picas | multiply by 12 |
Kerning, tracking, and aki properties use em units (thousandths of an em, proportional to font size).
(0,0) is at the bottom-left of the artboardposition property of a page item is the top-left corner of its bounding box as [x, y]Every page item has three bounding rectangles:
geometricBounds: Excludes stroke width [left, top, right, bottom]visibleBounds: Includes stroke widthcontrolBounds: Includes control/direction points// Create a new document
var doc = app.documents.add();
// Create with a preset
var preset = new DocumentPreset();
preset.width = 612; // 8.5 inches
preset.height = 792; // 11 inches
preset.colorMode = DocumentColorSpace.CMYK;
var doc = app.documents.addDocument("Print", preset);
// Open an existing file
var fileRef = new File("/path/to/file.ai");
var doc = app.open(fileRef);
// Save as Illustrator format
var saveOpts = new IllustratorSaveOptions();
saveOpts.compatibility = Compatibility.ILLUSTRATOR17; // CC
doc.saveAs(new File("/path/to/output.ai"), saveOpts);
// Export as PDF
var pdfOpts = new PDFSaveOptions();
pdfOpts.compatibility = PDFCompatibility.ACROBAT7;
pdfOpts.preserveEditability = false;
doc.saveAs(new File("/path/to/output.pdf"), pdfOpts);
// Export as PNG
var pngOpts = new ExportOptionsPNG24();
pngOpts.horizontalScale = 300;
pngOpts.verticalScale = 300;
pngOpts.transparency = true;
doc.exportFile(new File("/path/to/output.png"), ExportType.PNG24, pngOpts);
// Export as SVG
var svgOpts = new ExportOptionsSVG();
svgOpts.fontType = SVGFontType.OUTLINEFONT;
doc.exportFile(new File("/path/to/output.svg"), ExportType.SVG, svgOpts);
The pathItems collection provides convenience methods for common shapes:
var doc = app.activeDocument;
var layer = doc.activeLayer;
// Rectangle: rectangle(top, left, width, height)
var rect = layer.pathItems.rectangle(500, 100, 200, 150);
// Rounded rectangle: roundedRectangle(top, left, width, height, hRadius, vRadius)
var rrect = layer.pathItems.roundedRectangle(500, 100, 200, 150, 20, 20);
// Ellipse: ellipse(top, left, width, height)
var oval = layer.pathItems.ellipse(400, 200, 100, 100);
// Polygon: polygon(centerX, centerY, radius, sides)
var hex = layer.pathItems.polygon(300, 300, 50, 6);
// Star: star(centerX, centerY, radius, innerRadius, points)
var star = layer.pathItems.star(300, 300, 50, 25, 5);
Additional detailed guidance was moved to references/extended-guide.md to keep this skill within the progressive-disclosure budget.
references/object-model-quick-reference.md: quick lookup for the Illustrator object model and common DOM types.references/extended-guide.md: extended guidance that was moved out of SKILL.md for progressive disclosure.scripts/: example Illustrator automation scripts for document manipulation, exports, batch processing, and DOM usage.## Illustrator scripting result
**Status:** implemented | reviewed | blocked
**Target:** `{{script_or_document}}`
### Script or patch
```javascript
#target illustrator
{{jsx_code}}
```
### Validation
- `{{execution_path}}`: pass | fail
- DOM objects used: `{{Application}}`, `{{Document}}`, `{{Layer}}`, `{{PathItem}}`, `{{TextFrame}}` as applicable
- Export or save output: `{{file_path_or_none}}`
position semantics.doc.saveAs() or doc.exportFile() method.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin creative-media-tooling11 skills in this plugin
/freecad-scriptsWrite FreeCAD Python scripts, macros, parametric FeaturePython objects, Part/Mesh/Sketcher geometry, PySide GUI tools, Coin3D/Pivy scenegraph code, workbench commands, and CAD automation. Use when asked to create FreeCAD models, automate geometry, convert mesh and solid data, script FEM/Path/TechDraw, or debug FreeCAD Python API tasks./game-engineBuild web-based game engines and games with HTML5 Canvas, WebGL, SVG, CSS, and JavaScript. Use when creating 2D or 3D games, implementing game loops, physics, collision detection, sprites, tilemaps, controls, audio, multiplayer with WebRTC or WebSockets, optimization, or publishing workflows./image-manipulation-image-magickProcess and manipulate images using ImageMagick. Supports resizing, format conversion, batch processing, and retrieving image metadata. Use when working with images, creating thumbnails, resizing wallpapers, or performing batch image operations./latchshot-page-captureCapture public HTTP(S) webpages as local PNG, JPEG, or PDF artifacts through Latchshot. Use when the user needs screenshots, website thumbnails, full-page captures, PDFs, QA reports, archives, or social previews. Do not use for private or authenticated pages, raw HTML extraction, scraping, CAPTCHA bypass, arbitrary browser actions, or local-file capture./nano-banana-pro-openrouterGenerate or edit images through OpenRouter with the `google/gemini-3-pro-image-preview` model. Use when prompt-only image generation, single-image edits, multi-image compositing, 1K/2K/4K output, or troubleshooting `OPENROUTER_API_KEY`, `uv`, and saved MEDIA files is requested./pdftk-serverUse PDFtk Server from the command line to merge, split, rotate, encrypt, decrypt, fill forms, flatten forms, watermark, stamp, extract metadata, burst pages, repair PDFs, attach or extract files, collate scans, and manipulate PDF files. Use when asked for pdftk commands or PDF command-line operations.Other plugins' skills for the same job