安全扫描
OpenClaw
安全
high confidence这是一个内部一致的仅指令型技能,用于编写和运行 Adobe Illustrator ExtendScript(.jsx),附带良性示例脚本,不请求凭据、安装或外部网络访问。
评估建议
This skill appears coherent and benign, but exercise the normal caution for third-party scripts: (1) review the bundled .jsx files before running them; (2) run scripts on copies or test documents first; (3) do not drop untrusted scripts into Illustrator's Startup Scripts folder (they will run automatically on launch); (4) the skill source/homepage is missing, so prefer authors you trust or inspect code thoroughly for unexpected file I/O or network calls (none are present in the bundled examples)...详细分析 ▾
✓ 用途与能力
Name/description align with the included assets and example scripts: reference doc + three ExtendScript examples (export, create art, find/replace). Nothing requested (no env vars, no binaries, no installs) appears out of scope for Illustrator scripting.
ℹ 指令范围
SKILL.md focuses on Illustrator DOM and running scripts via File > Scripts, ESTK, or the Startup Scripts folder. Instructions are narrowly scoped to creating, debugging, and running .jsx files. Note: the doc explicitly mentions placing scripts in the Startup Scripts folder and using #targetengine to persist state inside Illustrator — those are legitimate Illustrator behaviors but mean a script can run automatically inside the app, so users should review scripts before installing them into startup locations.
✓ 安装机制
No install spec — instruction-only skill. No downloads, package installs, or archives to extract. Example scripts and docs are bundled as files, which is expected for a scripting reference.
✓ 凭证需求
No environment variables, credentials, or config paths are requested. Example scripts use user prompts and Folder.selectDialog for local file selection; no external services or tokens are referenced.
ℹ 持久化与权限
Skill itself does not set always:true nor modify agent settings. However SKILL.md describes Illustrator-side persistence mechanisms (Startup Scripts folder and #targetengine) that can cause scripts to run automatically inside Illustrator — a normal Illustrator capability but worth user attention before installing scripts into those locations.
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv1.0.12026/4/20
- 新增“打包资源”章节,内含 Illustrator 对象模型速查表及脚本目录,附带自动化示例脚本。 - 明确参考资料与示例用法,辅助脚本开发与调试。 - 核心脚本用法及技术指南无变动。
● 无害
安装命令
点击复制官方npx clawhub@latest install adobe-illustrator-scripting
镜像加速npx clawhub@latest install adobe-illustrator-scripting --registry https://cn.longxiaskill.com 镜像可用
技能文档
通过 ExtendScript(JavaScript/JSX)自动化 Adobe Illustrator 的专家指导。本技能涵盖 Illustrator 脚本对象模型、所有主要 API 对象、代码模式及编写生产级 .jsx 脚本的最佳实践。
捆绑资源
references/object-model-quick-reference.md:编写或调试脚本时快速查阅 Illustrator 脚本对象模型、常见文档与页面对象类型及相关 DOM 概念。scripts/:包含示例 Illustrator 自动化脚本,可作为起点或实现模式,用于文档操作、导出、批处理及 DOM 使用等常见任务。需要可用 JSX 模式或调试时对比行为,请查阅并改编这些示例。
何时使用本技能
- 编写新的 Illustrator 自动化脚本(
.jsx或.js文件) - 调试或修复现有 Illustrator ExtendScript 代码
- 以编程方式操作文档、图层、页面对象、路径、文本或颜色
- 批处理 Illustrator 文件或从数据生成图稿
- 将文档导出为多种格式(PDF、SVG、PNG、EPS 等)
- 使用 Illustrator DOM(Application、Document、Layer、PathItem、TextFrame 等)
- 利用变量与数据集创建数据驱动图形
- 通过脚本化打印选项自动化打印工作流
前置条件
- 已安装 Adobe Illustrator CC 或更高版本
- 具备基础 JavaScript 知识(ExtendScript 基于 ES3 并含 Adobe 扩展)
- 脚本可通过“文件 > 脚本 > 其他脚本”、脚本菜单或放入启动脚本文件夹执行
- 可使用 ExtendScript Toolkit(ESTK)或任意文本编辑器编写
.jsx文件
脚本环境
语言与文件扩展名
| 语言 | 扩展名 | 平台 | |---|---|---| | ExtendScript/JavaScript |.jsx, .js | Windows, macOS |
| AppleScript | .scpt | 仅 macOS |
| VBScript | .vbs | 仅 Windows | 本技能专注于 ExtendScript/JavaScript,跨平台且最常用。
执行脚本
- 脚本菜单:文件 > 脚本 列出应用程序脚本文件夹中的脚本
- 其他脚本:文件 > 脚本 > 其他脚本 浏览并运行任意
.jsx文件 - 启动脚本:将脚本放入启动脚本文件夹,Illustrator 启动时自动运行
- target 指令:从 ESTK 或外部工具运行时,脚本开头写
#target illustrator #targetengine指令:使用#targetengine "session"可在多次脚本执行间保持变量
命名约定(JavaScript)
- 对象与属性使用 camelCase:
activeDocument、pathItems、textFrames - 全局
app引用 Application 对象 - 集合索引 从零开始:
documents[0]为最前文档 - 使用
typename属性在运行时识别对象类型
对象模型概览
Illustrator DOM 遵循严格包含层级: ``
Application (app)
├── activeDocument / documents[]
│ ├── layers[]
│ │ ├── pageItems[](所有图稿)
│ │ ├── pathItems[]
│ │ ├── compoundPathItems[]
│ │ ├── textFrames[]
│ │ ├── placedItems[]
│ │ ├── rasterItems[]
│ │ ├── meshItems[]
│ │ ├── pluginItems[]
│ │ ├── graphItems[]
│ │ ├── symbolItems[]
│ │ ├── nonNativeItems[]
│ │ ├── legacyTextItems[]
│ │ └── groupItems[]
│ ├── artboards[]
│ ├── views[]
│ ├── selection(选中对象数组)
│ ├── swatches[], spots[], gradients[], patterns[]
│ ├── graphicStyles[], brushes[], symbols[]
│ ├── textFonts[](通过 app.textFonts)
│ ├── stories[], characterStyles[], paragraphStyles[]
│ ├── variables[], datasets[]
│ └── inkList[], printOptions
├── preferences
├── printerList[]
└── textFonts[]
` 顶级对象
Application (app):根对象,提供对文档、首选项、字体、打印机的访问。关键属性:activeDocument、documents、textFonts、printerList、userInteractionLevel、version。Document:表示打开的.ai文件。关键属性:layers、pageItems、selection、activeLayer、width、height、rulerOrigin、documentColorSpace。关键方法:saveAs()、exportFile()、close()、print()。Layer:绘图图层。关键属性:pageItems、pathItems、textFrames、visible、locked、opacity、name、zOrderPosition、color`。