/adobe:codingfrom adobe
Use when writing or reviewing code that runs inside an Adobe application, covering UXP plugins, ExtendScript, Acrobat JavaScript, and host boundaries
Ships in adobe. 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.
Adobe applications run plugin and script source in UXP, ExtendScript, or Acrobat JavaScript.
Ranges and enumerations come from the host's declared object model, localized names from the running host, extents from the measured item, unit ratios from their standard, names of created files from their target, and every other value from the caller.
[REFERENCES]:
do javascript runsEach host runs one newest runtime, and a dictionary command runs source with no linked plugin:
| [INDEX] | [HOST] | [RUNTIME] | [MODULE] | [UNLINKED_SOURCE] |
|---|---|---|---|---|
| [01] | InDesign | UXP | indesign | do script in uxpscript |
| [02] | Photoshop | UXP | photoshop | do javascript, ExtendScript alone |
| [03] | Premiere Pro | UXP | premierepro | None |
| [04] | Media Encoder | UXP | mediaencoder | None |
| [05] | After Effects | UXP | aftereffects | DoScript, ExtendScript alone |
| [06] | Illustrator | UXP behind EnableThirdPartyUXP | illustrator | do javascript, ExtendScript alone |
| [07] | Acrobat | Acrobat JavaScript, SpiderMonkey 24 | None | do script |
EnableThirdPartyUXP of AIFeatures.cfg beside its app (enabled="1", configurableInRelease="1") for plugins UXP developer mode loadsUXPExtensionPath.json beside its app, each string value naming a folder it scans as <folder>/<plugin>/manifest.jsonmain of it at launch, and reads no PluginsInfo registrymain on a UXP developer mode load alone, and refuses a manifest naming no panel or command entry pointhostUIContext.hideFromMenu includeduxp.host throws at its first read and holds no member after, and app.path names the folder holding the bundle app.name namesparentDocument and a parent layer, layers and artboards hold no parent, and getPageItemFromUuid finds an item by uuidexportFile takes a UXP storage File entry and refuses a path or URL string with error 1242 or 1220illustrator-dom.js to plugins: require('illustrator') returns { app }, the specifier inferred from the string beside its registrationglobalThis, every call is synchronous, and enum values are stringsapp and DOM classes, calls are synchronous, collections run 1 to length, constructor.name names an object's classsaveFrameToPng(seconds, path) returns a DeferredCall holding wait(), onComplete, and onError and no then, and the PNG exists when the call returnsresolutionFactor takes an integer downsample [x, y] from 1 to 99, and uxp.host.applicationPath names the running bundlethis naming the front document, or the Root object when none is open, and global members persist between callsJSON, util, eval, new Function, and arrow functions, and no let, $, File, or reflectlineNumber as lineapp.alert still opens the host alertUXP runs each plugin and script in one V8 context inside an Adobe host. require resolves the running host's DOM module alone, uxp.host.name names that host, and cross-host code takes host calls as arguments.
Context decides what code holds across calls:
| [INDEX] | [CONTEXT] | [LIFETIME] | [PERMISSIONS] | [HOLDS] |
|---|---|---|---|---|
| [01] | Plugin | Host session | Manifest requiredPermissions | Listeners, sockets, timers, localStorage, secureStorage |
| [02] | Script | One run | Fixed by host | Values of that run, sessionStorage that ends with it |
Differences from a browser or Node hold in InDesign, Photoshop, and Premiere Pro, each with one owner:
| [INDEX] | [DIFFERENCE] | [OWNER] | [FORM] |
|---|---|---|---|
| [01] | Member of another type (hrtime.bigint) | Runtime | Clock layer over performance.now() |
| [02] | Absent global or module (Worker, node:*) | Bundle | Dependencies reading one stay out |
| [03] | Module typed as Node's (fs, path) | Read site | Value decoded where read |
| [04] | Feature with a missing part (Response.body) | Call site | Whole-body read, flag on whole pattern |
Effect's default clock expects bigint nanoseconds, and UXP's process.hrtime.bigint returns a number. Host Clock layer reads monotonic nanoseconds from performance.now(), wall nanoseconds from each currentTimeMillis read, and keeps native sleep. Offsets computed once skip the skew correction Effect's wall clock performs. Host callbacks running effects receive caller services through run*With.
Object.groupBy and regex flag v and lacks Promise.withResolvers, Set methods, Array.fromAsync, and usingstructuredClone, Buffer, MessageChannel, and Worker are absent in every host, and require of util, buffer, or a node: name throwsfs holds synchronous reads, writes, and lstatSync, and no existsSync, appendFileSync, mkdirSync, or statSyncwriteFileSync reads its receiver, and code calls it on the module's default importpath is a function with resolve and basenamePath service converts paths and file: URLs, toFileUrl percent-encoding %, #, ?, and space a file:${path} template breaks onmain is a script that renders into document.body, and UXP never runs <script type="module">await, and dependencies instantiating WebAssembly through one at import stay outEach entry point translates one Exit into the form its host expects:
| [INDEX] | [ENTRY] | [BEHAVIOR] |
|---|---|---|
| [01] | Plugin main module | One serve call building one ManagedRuntime |
| [02] | entrypoints.setup | One call per plugin with plugin, panels, and commands |
| [03] | Panel create, show, hide | Forks its work and returns inside a 300 ms default timeout |
| [04] | Command run, cancel | run resolved on success, rejected with the squashed cause |
| [05] | Script | One synchronous run answering once through uxp.script.setResult |
Hosts show nothing for a rejected command, and Photoshop logs nothing for it. One registration takes every command and panel and runs each through one runtime that logs its failure:
import fs from 'adobe:fs';
import uxp, { entrypoints } from 'adobe:uxp';
const manifest = 'plugin:/manifest.json';
const serve = <E, F>({
layer: served = Layer.empty,
commands = {},
panels = {},
}: {
readonly layer?: Layer.Layer<never, E, UxpHost | UxpPlugin | Path.Path | Socket.WebSocketConstructor>;
readonly commands?: Record.ReadonlyRecord<string, Effect.Effect<void, F, UxpHost | UxpPlugin>>;
readonly panels?: Record.ReadonlyRecord<string, (root: HTMLElement, fork: <A, X>(work: Effect.Effect<A, X, UxpHost | UxpPlugin>) => void) => Effect.Effect<void, F, Scope.Scope | UxpHost | UxpPlugin>>;
}): void => {
const hosted = UxpHost.layer({ uxp, fs });
const reported = <A, X, R>(effect: Effect.Effect<A, X, R>) => effect.pipe(Effect.tapCauseIf(Predicate.not(Cause.hasInterruptsOnly<X>), Effect.logError));
Effect.gen(function* () {
const [decoded, { setup }] = yield* Effect.all([
Effect.try({ try: () => fs.readFileSync(manifest, 'utf-8'), catch: (cause) => PlatformError.systemError({ _tag: 'Unknown', module: 'FileSystem', method: 'readFileString', pathOrDescriptor: manifest, cause }) }).pipe(Effect.flatMap(Schema.decodeEffect(UxpManifest.Identity))),
Schema.decodeEffect(Schema.Struct({ setup: Schema.declare(Predicate.isFunction) }))(entrypoints),
]);
const runtime = ManagedRuntime.make(served.pipe(Layer.provideMerge(Layer.succeed(UxpPlugin)(decoded)), Layer.provideMerge(hosted)));
const run = <X>(effect: Effect.Effect<unknown, X, UxpHost | UxpPlugin>): Promise<void> => runtime.runPromise(Effect.asVoid(reported(effect)));
const [handled, shown] = yield* Effect.all([
Effect.all(
Record.map(
commands,
Effect.fnUntraced(function* (command) {
const running = yield* FiberHandle.make<void, F>();
return { run: () => runtime.runPromise(Effect.flatMap(FiberHandle.run(running, reported(command)), Fiber.join)), cancel: () => runtime.runPromise(FiberHandle.clear(running)) };
}),
),
),
Effect.all(
Record.map(
panels,
Effect.fnUntraced(function* (panel) {
const held = yield* ScopedRef.fromAcquire(Effect.void);
const fork = (element: HTMLElement) => FiberSet.makeRuntime<UxpHost | UxpPlugin, void, never>().pipe(Effect.flatMap((forked) => panel(element, flow(reported, Effect.ignore(), forked))), reported, Effect.forkScoped, Effect.asVoid);
return {
show: (root?: unknown): Promise<void> => run(Effect.flatMap(Schema.decodeUnknownEffect(Schema.instanceOf(HTMLElement))(root), (element) => ScopedRef.set(held, fork(element)))),
hide: (): Promise<void> => run(ScopedRef.set(held, Effect.void)),
};
}),
),
),
]).pipe(Scope.provide(runtime.scope));
yield* Effect.sync(() => setup.call(entrypoints, { plugin: { create: () => runtime.runPromise(Effect.void) }, commands: handled, panels: shown } satisfies Pick<Parameters<typeof entrypoints.setup>[0], 'plugin' | 'commands' | 'panels'>));
}).pipe(Effect.tapCause(Effect.logError), Effect.provide(hosted), Effect.runFork);
};
UxpHost is the service holding uxp and fs, UxpHost.layer merges it with the host Clock layer, Logger.LogToStderr set true, Effect's Path.layer, and Socket.layerWebSocketConstructorGlobal, the constructor a WebSocket client dials through: hosts record console.error at error level in their log file where Effect's default logger writes console.log, and an entry's top-level runFork or runSyncExit logs under the same reference by providing the layer outside its tapCause. UxpPlugin holds the plugin id and host app UxpManifest.Identity decodes from the plugin folder's manifest, the fields a running plugin reads, so a manifest key the model lacks never stops a load, and a failed read fails PlatformError as Effect's FileSystem.readFileString does. layer builds once beside commands and panels. Layer.provideMerge keeps the host Clock in runtime context, where runPromise otherwise reads Effect's default clock. One Effect.all under runtime.scope allocates each command's FiberHandle and each panel's ScopedRef. Reruns interrupt the running command, and cancel clears it. @adobe-uxp-types/uxp declares cancel for future use. Panels receive fork, a FiberSet.makeRuntime runner in the shown scope for synchronous host callbacks that logs each run's failure once and ignores it. show replaces the shown scope and hide closes it, interrupting every fork. Plugin records declare no destroy, and the host ends every scope the layers opened with the plugin's context: InDesign calls panel handlers and plugin destroy during unload with its main thread waiting on them, where a handler or scope release reaching its DOM deadlocks it. @adobe-uxp-types/uxp merges setup's parameter with entrypoints, failing records without getCommand, getPanel, setup, and _pluginInfo. Decoded setup runs through call with entrypoints as receiver, its throw logs as a defect, and runFork calls it before main returns.
setup throws for a plugin record without create, for a command or panel key its manifest lacks, and after one successful callserve logs each unhandledrejection event at error once the manifest sets featureFlags.unhandledRejectionfeatureFlags.uncaughtException delivers each as an error eventcreate(rootNode), show(rootNode, data), hide(rootNode, data), destroy(rootNode)main at launch with no panel shown, and main builds every state a panel readsshow renders from state main built, and panel visibility reaches document as a uxpcommand eventdocument.theme holds getCurrent and onUpdated in every host, and each panel root takes its host's theme fill as text color--uxp-host-* value and no matchMedia, and paints text black[label, value] tuples, reading Array.get(options, element.selectedIndex) and showing one by selectedIndexOne manifest serves one host, host.app naming ID, PS, premierepro, ame, aftereffects, or AI, and host.data.loadEvent startup loads a plugin at host launch. Hosts enforce each requiredPermissions and featureFlags key:
| [INDEX] | [KEY] | [GRANTS] | [WITHOUT] |
|---|---|---|---|
| [01] | network.domains | Dial and fetch to each listed origin or "all" | Dial throws a manifest denial |
| [02] | localFileSystem: "fullAccess" | Access outside plugin storage | Defaults to plugin storage |
| [03] | allowCodeGenerationFromStrings | eval, new Function, inline handlers | InDesign v5 runs new Function |
| [04] | featureFlags.unhandledRejection | unhandledrejection events | Rejection logged, no caller told |
| [05] | launchProcess | shell.openPath, shell.openExternal | Both calls throw a denial |
| [06] | clipboard: "read" or "readAndWrite" | System clipboard reads, or reads and writes | No clipboard access |
| [07] | ipc.enablePluginCommunication | Calls to other installed plugins through pluginManager | Defaults to false |
| [08] | webview allow: "yes" with domains | Modal dialog WebViews for listed domains or "all" | No WebView |
| [09] | enableUserInfo | userInfo.userId() returns the signed-in Adobe account GUID | No user GUID |
| [10] | enableAddon | Native .uxpaddon loads | No addon load |
| [11] | featureFlags.enableAlerts | alert, prompt, and confirm dialogs | No dialogs |
entrypoints rows name a panel or command id with label.default, description, and hostUIContext, and hosts refuse a manifest naming neither main nor an entrypointpath with scale, and hosts resolve <base>@<scale>x.<extension> for each factortoolbar PNGs and plugin icons 24-pixel pluginList PNGs, each at 1x and 2xmedium in the dark group as Adobe's manifests place it<svg> fill black, and plugin icons hold fill on each elementplugin-temp: reads and writes the folder getTemporaryFolder() returns under every permission level, and plugin: is read-onlyunlinkSync, and a temporary file's native storage entry deletes it through delete()url schemes for file reads and expose nativePath for host-native writesmanifest as never, and plugins decode plugin:/manifest.json through a schemaadobe:uxp exports Entry as a type alone, and a schema decodes a storage entry by its isEntry: true field, its url typed string and returned as a string or URLdomains entries name a host with a top-level domain or localhost (ws://localhost:<port>), and an IP literal entry is discardedshell.openPath and shell.openExternal open a path or URL behind a consent dialog, with no arguments or process outputUXP/PluginsStorage/<product>/<major>/External/<pluginId>/PluginDataTypings declare a host module under its require name, under an adobe: scheme, or as a type with no module:
| [INDEX] | [MODULES] | [PACKAGE] | [DECLARES] |
|---|---|---|---|
| [01] | uxp, fs, os, path | @adobe-uxp-types/uxp | uxp by name, each module under adobe: from with-protocol |
| [02] | photoshop | @types/photoshop | photoshop and photoshop/dom/* by path, no adobe: module |
| [03] | indesign | indesign-uxp-types | indesign by name, adobe:indesign from flat through paths |
| [04] | premierepro | @adobe/premierepro | Type premierepro of the module object, no module |
Each gap closes where its value is read, with types the package or a schema states:
| [INDEX] | [GAP] | [FORM] |
|---|---|---|
| [01] | Member, value, or failure typings omit or misstate | Host value decoded through a Schema at its read |
| [02] | Module object typed with no module | Module passed as an argument of the package's type |
| [03] | Same gap in ExtendScript without Schema | Assertion to the host's shape, suppression naming gap |
| [04] | Global no package declares (ExportOptionsPNG24) | Interface, globalThis decoded through a struct of its function members |
Typings for fs declare bytes as Buffer and a failure's code as a string, where the host returns an ArrayBuffer and a numeric code:
import { readFileSync } from 'adobe:fs';
const bytes = (path: string) =>
Effect.try({ try: () => Option.some(new Uint8Array(readFileSync(path))), catch: (cause) => PlatformError.systemError({ _tag: 'Unknown', module: 'FileSystem', method: 'readFile', pathOrDescriptor: path, cause }) }).pipe(Effect.catchIf(({ cause }) => Schema.is(Schema.Struct({ code: Schema.Literal(-2) }))(cause), () => Effect.succeedNone));
new Uint8Array accepts both representations, and PlatformError holds the host's thrown value as cause.
Object models come from each host's declared source, never from reflection over live objects or a hand list:
| [INDEX] | [HOST] | [SOURCE] |
|---|---|---|
| [01] | InDesign | indesign-uxp-types |
| [02] | Photoshop | @types/photoshop |
| [03] | Premiere Pro | @adobe/premierepro, installed ScriptingAPIManifest.json as cross-check |
| [04] | Media Encoder | Installed ScriptingAPIManifest.json, AdobeDocs uxp-media-encoder |
| [05] | After Effects | AdobeDocs uxp-after-effects, which states no enumerations |
| [06] | Illustrator | Newest Illustrator*/omv.xml under /Library/Application Support/Adobe/Scripting Dictionaries CC |
| [07] | Acrobat | AdobeDocs acrobat-pdfl-sdk jsapiref, acrohelp parameter help |
indesign.d.ts is internal, and After Effects' bundled @dva/types is confidential$.dictionary reads nullapi_config.json is empty, and its manifest names each member with type, optional parameters, and async flagacrohelp as an argument to a native Acrobat method answers a HelpError with extMessage listing parameters as name: type, optional ones in bracketsshow, reveal in system, and reveal in Bridge, Acrobat bring to front, and Premiere Pro editoriginal dictionary commands activate their hostOSACopyScriptingDefinitionFromURL launches an app with a dynamic dictionary (InDesign, Illustrator), and its XML can contain XInclude referencesHosts throw Error values with text in the user's locale, and return some failures as values.
HostError is the package error for failures no host error (PlatformError, HttpClientError) states, with refused step as subject, host's thrown value or returned failure as cause, and one reason per caller response:
| [INDEX] | [REASON] | [HOST_OUTCOME] |
|---|---|---|
| [01] | Refused | Call refused or failure returned as a value |
| [02] | Unavailable | Host or bridge serves no call (modal scope held, no linked plugin) |
| [03] | Cancelled | User cancelled the call's progress window |
| [04] | Thrown | Evaluated source threw, line holding the body line a frame names |
Messages derive <subject> <reason>: <cause message>, or line <n>: <subject> for Thrown. Rejection codes a host documents decode at catch into their reason through a table from tag to code and Schema.Literal(code).transform(tag), and consumers branch on reason._tag. HostError.refused(subject) returns a host call's catch function, and failures returned as values call it with no cause:
const written = (target: object, values: Record.ReadonlyRecord<string, unknown>): Effect.Effect<readonly string[], HostError> =>
Effect.validate(
Record.toEntries(values),
Effect.fnUntraced(function* ([field, value]: readonly [string, unknown]) {
const refused = HostError.refused(field);
const inner: unknown = Predicate.isObject(value) && Predicate.hasProperty(target, field) ? yield* Effect.try({ try: () => target[field], catch: refused }) : undefined;
if (Predicate.isObject(value) && Predicate.isObject(inner)) {
return Array.map(yield* written(inner, value), (name) => `${field}.${name}`);
}
yield* Effect.try({ try: () => Object.assign(target, { [field]: value }), catch: refused });
return [field];
}, Effect.sandbox),
).pipe(Effect.map(Array.flatten), Effect.catch((causes) => Effect.failCause(Cause.fromReasons(causes.flatMap(Struct.get('reasons'))))));
written writes every field and fails with one reason per refused field, a nested field named by its path. Effect.validate partitions elements through Effect.result, Effect.sandbox alone keeps nested reasons, and Cause.fromReasons merges them. Object.assign throws for every refused write, where Reflect.set returns false for a getter-only member and true for a key the object lacks.
catch names the refused step from arguments of the failed call//# sourceURL=<name>, one name in plugins and scripts, and an Error.prepareStackTrace held in a scope reads lines from frames naming <name> and leaves .stack textcatch sees itHostError and Unmatched state their ErrorReporter.severity, and a request failure answered to its caller logs at info, Unavailable at warnString(fn) swc lowers to their target, and a schema's Encoded types the replysourceMaps: true, node:module SourceMap.findEntry maps a Thrown line to its body line, and a transform diagnostic fails Thrown at its own lineHost state outlasting a call (listener, preference outside undo, temporary file, socket, runtime) pairs acquisition with release in one Scope. Hosts call a listener synchronously on their own thread, and removal takes the function registration received:
const listen = (target: EventTarget, type: string, fork: (work: Effect.Effect<void, HostError>) => void, work: Effect.Effect<void, HostError>) => {
const handler = (): void => fork(work);
return Effect.acquireRelease(Effect.sync(() => target.addEventListener(type, handler)), () => Effect.sync(() => target.removeEventListener(type, handler)));
};
listen returns an Effect<void, never, Scope>, and its handler forks work through fork, the runner a panel receives, and returns to its host at once. Closing the scope removes the handler, and closing the panel's scope interrupts every run. Host listener calls of every shape (action.addNotificationListener, theme.onUpdated.addListener) take the same pair, and InDesign's app.addEventListener takes none, as its release deadlocks an unload. Host rollback restores document state, and a scope restores every state a rollback leaves.
Preferences outside undo take one save and restore pair:
const restore = (target: object, saved: Record.ReadonlyRecord<string, unknown>) =>
Effect.validate(Record.toEntries(saved), ([key, value]) => Effect.try({ try: () => Object.assign(target, { [key]: value }), catch: HostError.refused(`restore of ${key}`) }), { discard: true }).pipe(Effect.orDie);
const preserve = <T extends object>(target: T, replacements: Partial<T>, held: readonly string[] = Struct.keys(replacements)) => {
const refused = HostError.refused(`preferences ${held.join(', ')}`);
return Effect.acquireRelease(Effect.try({ try: () => Record.fromIterableWith(held, (key): readonly [string, unknown] => [key, Reflect.get(target, key)]), catch: refused }), (saved) => restore(target, saved)).pipe(
Effect.tap(() => Effect.try({ try: () => Object.assign(target, replacements), catch: refused })),
);
};
preserve reads every held key through Reflect.get before writing any, where Struct.pick skips prototype accessors. held names keys a later write in the scope sets. restore accumulates every refusal under Effect.validate and dies through Effect.orDie, finalizers holding no error channel.
Each host groups changes into one undo step through one call, and every state change runs inside it:
| [INDEX] | [HOST] | [CALL] | [BODY] | [UNDO_STEP] |
|---|---|---|---|---|
| [01] | InDesign | app.doScript under UndoModes.ENTIRE_SCRIPT | Synchronous function | One step named by its argument |
| [02] | Photoshop | core.executeAsModal with suspendHistory | Async function, awaited | One state per open document |
| [03] | Premiere Pro | project.lockedAccess, then executeTransaction | Synchronous callbacks | One entry named by transaction |
| [04] | Illustrator | One do javascript call | Synchronous source | One step per call |
| [05] | After Effects | app.beginUndoGroup(label), app.endUndoGroup() | Synchronous source | One step per script |
ran, run inside it, and settled, which awaits its value after it, under one scopenew Function('{ <keys> }', 'return eval(arguments[1])') destructures, binding no name source shadowsThrown with the host's SyntaxError, and a compiled value other than a function fails IllegalArgumentError naming its typeofWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub bsamiee/rasm --plugin adobe2 skills in this plugin