automating-pages

automating-pages is a skill for Claude Code, Codex from SpillwaveSolutions/automating-mac-apps-plugin. It costs 68 tokens per session (1,105 once invoked), scanned A, original, MIT.

A guide for controlling Apple Pages on macOS with JavaScript for Automation (JXA), Apple's scripting system. It covers documents, templates, text, styles, tables, images, and exporting to PDF.

In plain words
What is it for?
Use it to create and edit Pages documents, apply formatting, work with tables and images, and export documents programmatically.
Why use it?
It helps replace repetitive Pages editing and export steps with scripts. It also shows how to discover Pages commands before translating them into JavaScript.

Skill for Claude CodeCodex

Part of the automating-mac-apps plugin — 16 skills, 10 commands, 9 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/spillwavesolutions/automating-mac-apps-plugin/automating-pages
Any agent
npx skills add SpillwaveSolutions/automating-mac-apps-plugin --skill automating-pages
Clone the repo
git clone --depth 1 https://github.com/SpillwaveSolutions/automating-mac-apps-plugin

Made for: Claude Code, Codex.

Or install automating-mac-apps, the plugin that ships this one along with the rest of its 16 skills, 10 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for automating-pages

README.md
[![agentmods](https://agentmods.dev/badge/skills/spillwavesolutions/automating-mac-apps-plugin/automating-pages.svg)](https://agentmods.dev/skills/spillwavesolutions/automating-mac-apps-plugin/automating-pages)
Your own site
<a href="https://agentmods.dev/skills/spillwavesolutions/automating-mac-apps-plugin/automating-pages"><img src="https://agentmods.dev/badge/skills/spillwavesolutions/automating-mac-apps-plugin/automating-pages.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00068 $0.01105
Opus 5 $0.00034 $0.00553
Sonnet 5 $0.00014 $0.00221
Haiku 4.5 $0.00007 $0.00111

Measured 5d ago against content hash 07c75f384b4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

automating-pages scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/insert_images.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/automating-mac-apps-plugin/skills/automating-pages/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Automating Pages (JXA-first, AppleScript discovery)

Relationship to the macOS automation skill

  • Standalone for Pages, aligned with automating-mac-apps patterns.
  • Use automating-mac-apps for permissions, shell, and UI scripting guidance.
  • PyXA Installation: To use PyXA examples in this skill, see the installation instructions in automating-mac-apps skill (PyXA Installation section).

Core framing

  • Pages dictionary is AppleScript-first; discover there.
  • JXA provides the logic and data handling.
  • Objects are specifiers: References to Pages elements that require methods for reads (e.g., doc.body.text()) and assignments for writes (e.g., doc.body.text = 'new text').

Example: Create Document

const pages = Application('Pages');
const doc = pages.Document({templateName: 'Blank'});
pages.documents.push(doc);
doc.body.text = "Hello World";

Workflow (default)

  1. Discover: Open Script Editor > File > Open Dictionary > Pages.
  2. Prototype: Write minimal AppleScript to verify the command works.
  3. Port to JXA: Convert AppleScript syntax to JXA objects.
    • Example: make new document becomes pages.documents.push(pages.Document()).
    • Add error handling (try/catch blocks).
  4. Optimize: Use batch text operations when possible to avoid performance penalties.
  5. Fallback: Use AppleScript bridge or UI scripting for dictionary gaps (e.g., specific layout changes).

Image Insertion (Critical Difference from Keynote)

IMPORTANT: Pages does NOT support direct image insertion like Keynote does:

// THIS WORKS IN KEYNOTE:
Keynote.Image({ file: Path("/path/to/image.png"), position: {x: 100, y: 100} });

// THIS DOES NOT WORK IN PAGES!
Pages.Image({ file: Path("/path/to/image.png") }); // ❌ Will fail

Solution: Use ObjC Pasteboard bridging (see pages-advanced.md for details):

ObjC.import('AppKit');
const nsImage = $.NSImage.alloc.initWithContentsOfFile("/path/to/image.png");
const pb = $.NSPasteboard.generalPasteboard;
pb.clearContents;
pb.setDataForType(nsImage.TIFFRepresentation, $.NSPasteboardTypeTIFF);
// Then use System Events to paste (Cmd+V)

Read the full file on GitHub · 99 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 99 lines · 68 tokens per session scan A 07c75f384b4a

Subscribe to this mod's changes

automating-pages is a skill published in the GitHub repository SpillwaveSolutions/automating-mac-apps-plugin (40 stars, last pushed 14d ago), licensed MIT. It adds 68 tokens to every session and 1,105 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

lark-workflow-meeting-summary

会议纪要整理工作流:汇总指定时间范围内的会议纪要并生成结构化报告。当用户需要整理会议纪要、生成会议周报、回顾一段时间内的会议内容时使用。.

DropFan/claude-code-plugins · 55 tokens

lark-drive

飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base…

DropFan/claude-code-plugins · 208 tokens

lark-minutes

飞书妙记:搜索妙记、查看妙记基础信息、下载/上传音视频、读取或编辑妙记的产物内容、改标题、替换说话人/关键词、申请妙记查看/编辑权限。当给出minutetoken、本地音视频文件,要查/改/转妙记产物,或用户明确要主动申请妙记权限时使用;本地音视频转纪要/逐字稿优先走本 skill,不要用 ffmpeg/whisper 本地转写。不负责:获取会议关联妙记,或仅按自然语言标题定位纪要.

DropFan/claude-code-plugins · 133 tokens

lark-vc

飞书视频会议:搜索历史会议记录、查询会议纪要(总结/待办/章节/逐字稿)、查询参会人快照。当用户查询已结束的会议、获取会议产物(纪要/妙记)、查看参会人时使用;查询未来日程走 lark-calendar。不负责:Agent 真实入会/离会、会中实时事件(走 lark-vc-agent)。.

DropFan/claude-code-plugins · 95 tokens

sheet-music-publisher

Converts mastered audio to sheet music and creates printable songbooks. Use after mastering when the user wants sheet music or a songbook for their album.

bitwize-music-studio/claude-ai-music-skills · 36 tokens

import-audio

Moves audio files to the correct album location with proper path structure. Use when the user has downloaded WAV files from Suno or other sources that need to be organized.

bitwize-music-studio/claude-ai-music-skills · 37 tokens