automating-pages

Automate Apple Pages document creation, editing, image insertion, and export via JXA.

63|12|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/iBz-04/gloamy --skill automating-pages
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: automating-pages
Source: https://github.com/iBz-04/gloamy/tree/main/skills/automating-pages
Command: npx skills add https://github.com/iBz-04/gloamy --skill automating-pages

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates repetitive Apple Pages document work (creating, editing content, inserting images, and exporting) so you don’t have to click through Pages by hand.

Core Features & Use Cases

  • JXA-first Pages automation: Uses the AppleScript Pages dictionary as the source of truth and ports working patterns into JXA.
  • Reliable document lifecycle: Creates documents from templates, opens existing files, edits body text, and saves outputs.
  • Workarounds for missing capabilities: Handles Pages limitations (notably image insertion) via ObjC NSPasteboard bridging and uses AppleScript/UI-scripting fallbacks when the JXA dictionary doesn’t expose a feature.
  • Export-ready workflows: Supports exporting documents to common targets such as PDF, Word, and EPUB with configurable export properties.

Quick Start

Use the automating-pages skill to “Create a new Pages document from the Blank template, insert the provided heading and body text, add the images from these file paths, then save and export it to PDF.”

Frequently Asked Questions about automating-pages

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Apple Pages document creation with JXA?

Automating Apple Pages with JXA enables programmatic document creation and text editing without manual GUI steps. It uses the AppleScript Pages dictionary as the source of truth, porting working patterns into JXA scripts to populate body text from templates.

How do you insert images into a Pages document using JXA?

Inserting images into a Pages document via JXA requires ObjC NSPasteboard bridging. This approach handles Pages-specific dictionary gaps by using ObjC pasteboard manipulation, falling back to AppleScript UI-scripting when the JXA dictionary does not expose the feature.

Can I export Pages documents to PDF or Word programmatically?

Yes, you can export Pages documents to PDF or Word programmatically using JXA. The automation workflow supports exporting to common targets such as PDF, Word, and EPUB with configurable export properties and robust save path handling.

What is the best way to generate bulk reports from Pages templates?

Generating bulk reports from Pages templates is best handled by JXA automation, which creates documents from templates and populates body text programmatically. This approach eliminates repetitive manual GUI steps while applying templated text generation.

Why does JXA Pages scripting fail to find certain features?

JXA Pages scripting fails to find certain features due to missing capabilities in the JXA dictionary. It handles these Pages limitations by using AppleScript dictionary discovery, ObjC NSPasteboard bridging for images, and UI-scripting fallbacks.

Do I need AppleScript to use JXA for Pages automation?

You need the AppleScript Pages dictionary as the source of truth for JXA Pages automation, but you execute with JXA scripting objects. AppleScript is primarily used as a UI-scripting fallback when the JXA dictionary does not expose a feature.