agentleFS
ArkanjiArkanji/iwork-studio/skill-pack/SKILL.md

iwork-studio

Skill3 starsChanged 20 days agoMITView on GitHub

Create, read, edit, design and export Apple iWork files safely — build designed Keynote decks from an outline (with charts and tables from Numbers data), apply the user's brand kit, review a deck's design, style tables with design kits, in Numbers (.numbers), Keynote (.key), Pages (.pages). Use for any request that mentions a Numbers, Keynote or Pages file; spreadsheet cells, formulas, rows, tables, CSV import, cell formatting or currency; slides (add, duplicate, delete, move, hide), themes, layouts, fonts, transitions, images, presenter notes, slideshows; Pages text, template placeholders or tables; or exporting to PDF, Excel, Word, PowerPoint — including Arabic/RTL content and Arabic requests (كينوت، نمبرز، بيجز، شريحة، عرض تقديمي، جدول، تنسيق). Prefer the iwork-studio MCP tools when available; otherwise use the bundled scripts. Every write is backed up, verified and atomic, and can be undone.

  • Pipes a download into a shell

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write with one tool call per change: Don't retry a failed write with a different trick.

    line 27
  2. Distinctive:

    Write Arabic exactly as given.

    line 93
  3. Very specific:

    Use AppleScript save in <path> on the user's files (the iWork sandbox denies it).

    line 102
  4. Distinctive:

    No Python install needed; uv brings its own.

    line 111
  5. Very specific:

    Run from this skill's folder.

    line 115

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

iWork Studio

Safe reads and edits of Numbers, Keynote and Pages files. Every write is backed up first, applied to a scratch copy, re-read and checked, then swapped in atomically. If anything doesn't match, the user's file is left untouched and you get a typed error. Arabic/RTL text round-trips exactly.

How to work (every request)

  1. Read before you write. iwork_read the file and use what's actually there (real slide numbers, cell refs, exact text to replace).
  2. Confirm destructive or broad changes in one line before doing them (or show a preview: every write takes dry_run=true and returns what would change): deleting slides, pages_set_body (it resets the body's formatting), or a find/replace that hits many places.
  3. Write with one tool call per change. Don't retry a failed write with a different trick; report the error (see the table below).
  4. Tell the user what changed and that a backup exists. After an important change, offer iwork_verify_render (macOS) to confirm it's visibly there.
  5. Mistake? Undo with iwork_list_backups → iwork_restore_backup.

What you can do

TaskMCP toolNeeds
What this machine can doiwork_capabilitiesanywhere — call it first when unsure
Read any iWork file to JSON · find files · metadata · thumbnailiwork_read · iwork_find · iwork_metadata · iwork_thumbnailanywhere (.pages read needs the Mac app)
New Numbers file from data / from a CSVnumbers_create · numbers_import_csvanywhere
New file from Apple's templates / from the user's own fileiwork_list_templates + iwork_create · iwork_create_from_templateMac + the app · anywhere
Set one Numbers cell (ref like B2, optional sheet/table)numbers_edit_cellanywhere
Insert/delete rows or columns · add a table or sheetnumbers_insert · numbers_delete · numbers_add_tableanywhere
Formula in a cell · recalculate formulas · sort a table (or a sorted copy in a new table: to_new_table)numbers_set_formula · numbers_recalculate · numbers_sortMac + Numbers, file closed
See / set Numbers formatting: style · number format · borders · widths/heights · headers · mergenumbers_inspect_format · numbers_set_cell_style · numbers_set_number_format · numbers_set_borders · numbers_set_dimensions · numbers_set_headers · numbers_merge_cellsanywhere
Find/replace text on every slide (literal; regex=true for patterns)keynote_replace_textanywhere
Build a designed deck from an outline (chart / table slides from data or a Numbers table) · fill a slide's title/bulletskeynote_build_deck (with kit=) · keynote_set_slide_textMac + Keynote
Make a deck or table look designediwork_list_design_kits · keynote_apply_design · numbers_apply_designKeynote: Mac · Numbers: anywhere
The user's brand: kit from their file · save · deleteiwork_extract_design_kit · iwork_save_design_kit · iwork_delete_design_kitanywhere (from a .key: Mac + Keynote)
Review a deck as rendered (overflow, off-slide, overlap, small text, crowded) · look at a slidekeynote_review_deck · keynote_slide_imageMac + Keynote
List slides · notes · hide/show · duplicate · delete · move · addkeynote_list_slides · keynote_set_presenter_notes · keynote_skip_slide · keynote_duplicate_slide · keynote_delete_slide · keynote_move_slide · keynote_add_slideMac + Keynote, deck closed
Theme · layout · text font/size/colour · transition · image · chart · tablekeynote_list_themes · keynote_inspect_style · keynote_set_theme · keynote_set_slide_layout · keynote_format_text · keynote_set_transition · keynote_add_image · keynote_add_chart · keynote_add_tableMac + Keynote, deck closed
Present (start/stop/next/previous)keynote_slideshowMac + Keynote
Pages: replace text · replace the whole body · fill template fields · table cellspages_replace_all · pages_set_body · pages_list_placeholders + pages_fill_placeholders · pages_read_tables + pages_set_table_cellsMac + Pages; run pages_preflight first
Export: PDF, xlsx, csv, docx, epub, txt, rtf, pptx, slide images, movieiwork_exportMac + the app
Check the rendered PDF shows a word · uses a font/size/colouriwork_verify_render · iwork_verify_formatMac + the app
Undoiwork_list_backups · iwork_restore_backupanywhere

Formatting tips: inspect first; ranges are A1 or A1:D9; colours are #RRGGBB; only the attributes you pass change. Merges are refused if they'd hide data. Numbers has no scriptable table styles; Pages margins/page setup/paragraph styles and Keynote shape fill/text alignment are not exposed — say so, don't improvise.

Building a spreadsheet: numbers_create (or numbers_import_csv) → format the header with numbers_set_cell_style → numbers_set_number_format for money/% → numbers_set_dimensions → numbers_set_formula for totals (Mac). After no-app edits to a file with formulas (the result says formulas_need_recalc), run numbers_recalculate: Numbers otherwise keeps showing the old totals. New files are never overwritten. In a table with formulas, rows/columns can only be appended headlessly.

Slide numbers are 1-based. keynote_move_slide(slide, to) puts the slide at position to. keynote_add_slide(after=0) adds at the front, no after adds at the end. The last slide can't be deleted.

When a tool says no

ErrorWhat it meansTell the user
DocumentOpenErrorThe deck is open in Keynote"Please save and close it in Keynote, then I'll retry."
ChartRefusalErrorThe file has charts, and this tool works without the app (its rewrite could break chart links)Say so plainly; app-driven tools still work on it. Don't look for a workaround
PagesOutOfScopeErrorPages only supports its text and table-cell operations — or the document is page layout (most letter/flyer templates), which has no body textOffer pages_replace_all / pages_set_body / pages_fill_placeholders if they fit; page-layout documents only take placeholders
StructureError / AppOpError / FormatError / ThemeErrorThe request itself is invalid (exists already, out of range, unknown name)Fix the request from the message; it lists the valid choices
WriteVerificationError / EditVerificationErrorThe result didn't match the request; rolled backNothing changed; report it
PagesUnavailableError / -1712A dialog in Pages is blocking"Please click away the dialog in Pages once." Don't loop
AquaSessionErrorNo Mac GUI hereThe app-driven part can't run on this machine
FileLockedErrorFile locked or openAsk the user to close it
SlideOpVerificationError / SchemaDriftErrorThe app did something other than asked; rolled backNothing changed; report it
CreatorStudioUnverifiedErrorAn unknown Creator Studio app versionReport it; don't set the override yourself
"outside IWORK_STUDIO_ROOTS"The file is outside the folders the user allowedAsk them to move it or widen the fence

Arabic / RTL

  • Write Arabic exactly as given; it round-trips byte-exact.
  • For iwork_verify_render, assert one Arabic word, not a phrase: PDF text layers reorder multi-word RTL text and the check would fail falsely.
  • Numbers keeps values as typed (CSV import too): Arabic-Indic digits (١٢٣) and strings like "$1,234.56" stay text. Pass a real number (e.g. 2500) when the user wants a number.

Never

  • Convert to docx/pptx/xlsx and back (lossy).
  • Use AppleScript save in <path> on the user's files (the iWork sandbox denies it).
  • Edit the files directly or with other tools while bypassing these routes.

Install (if the tools aren't available yet)

  • Claude desktop app (Mac): curl -LsSf https://raw.githubusercontent.com/Arkanji/iwork-studio/main/install.sh | sh, then quit Claude (Cmd-Q) and reopen.
  • Claude Code: claude mcp add iwork-studio -- uvx --from iwork-studio@latest iwork-studio-mcp
  • Other MCP clients: uvx --from iwork-studio@latest iwork-studio-mcp config prints the JSON entry.

No Python install needed; uv brings its own.

No MCP? Use the scripts

Run from this skill's folder. Prefixing with uvx --from iwork-studio@latest needs no prior install (or use a Python 3.12 with the package installed). Output is JSON.

U="uvx --from iwork-studio@latest"
$U python scripts/read.py <file.numbers|.key|.pages>
$U python scripts/edit_numbers.py edit-cell <file> --ref B3 --value "قيمة" [--sheet NAME] [--table NAME]
$U python scripts/edit_key.py replace <file.key> "old text" "new text" [--regex]
$U python scripts/edit_pages.py preflight
$U python scripts/edit_pages.py replace-all <file.pages> "old" "new"
$U python scripts/edit_pages.py set-body <file.pages> "new body"      # or '-' for stdin
$U python scripts/verify_render.py <file> --assert-text "word"

Slide ops and undo from Python (the MCP tools wrap exactly these):

from iwork_studio import keynote_slides as ks, backups
ks.set_presenter_notes("deck.key", 1, "ملاحظات")
ks.duplicate_slide("deck.key", 2); ks.move_slide("deck.key", 3, 1)
ks.add_slide("deck.key", after=0); ks.set_skipped("deck.key", 4, True); ks.delete_slide("deck.key", 5)
backups.restore_backup("deck.key", backups.list_backups("deck.key")[0]["name"])

References

  • references/design-guide.md — how to make decks and tables look designed (read before building a deck)
  • references/capability-matrix.md — what each route supports and refuses
  • references/jxa-traps.md — scripting traps, if you are extending this
  • references/sandbox-trap.md, references/keynote-1700-defect.md, references/tcc-preflight.md — background on specific macOS/iWork behaviour

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.