Skip to content
Agentmart
Submit a tool

siri-shortcut-editing

Edit macOS Siri Shortcuts (.shortcut files) programmatically — decode to XML, modify, and re-sign.

Skill by Jansen611

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/jansen611-siri-shortcut-editing

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Edit macOS Siri Shortcuts (.shortcut files) programmatically — decode to XML, modify, and re-sign. Handles AEA1 Apple Encrypted Archives, CMS signing, and bplist conversion. Triggers when user mentions: - "shortcut" or "shortcuts" or ".shortcut file" - "edit a shortcut" or "modify a shortcut" - "Siri shortcut" - wants to programmatically modify a signed .shortcut file

Use cases: writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/siri-shortcut-editing

Tools it pre-approves 4

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash,
  • Read,
  • Write,
  • Edit

What's inside

Skill name
siri-shortcut-editing
Description
Edit macOS Siri Shortcuts (.shortcut files) programmatically — decode to XML, modify, and re-sign. Handles AEA1 Apple Encrypted Archives, CMS signing, and bplist conversion. Triggers when user mentions: - "shortcut" or "shortcuts" or ".shortcut file" - "edit a shortcut" or "modify a shortcut" - "Siri shortcut" - wants to programmatically modify a signed .shortcut file
License
MIT
Allowed tools
Bash,, Read,, Write,, Edit
Instructions
165 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Pre-approves some shell commands

Files (4)

  • SKILL.md
  • action-identifiers.md · references/
  • dictionary-actions.md · references/
  • decode_shortcut.py · scripts/

SKILL.md (first lines)

# Siri Shortcut Editing Skill

Edit signed macOS Siri Shortcuts (`.shortcut` files) by decoding them to XML, making changes, and re-signing.

## File Format

A `.shortcut` file is a **signed Apple Encrypted Archive (AEA1)** containing:

```
[0-3]     "AEA1" magic
[4-7]     zeros (reserved)
[8-11]    plist length (uint32 LE)
[12-...]  auth plist (bplist) — signing certificate chain
[after]   CMS signature + encrypted payload (Apple Archive)
```

The actual shortcut workflow is a bplist inside the Apple Archive, named `Shortcut.wflow`.

## Prerequisites

- macOS with `aea`, `aa`, `shortcuts` CLI tools (all built-in)
- `plutil` (built-in)
- Python 3 with `plistlib` (built-in)

Verify:
```bash
which aea aa shortcuts plutil python3
```

---

## Workflow: Decode .shortcut → XML

Use the bundled `scripts/decode_shortcut.py`:

```bash
python3 scripts/decode_shortcut.py INPUT.shortcut OUTPUT.xml
```

This script performs all three steps automatically:
1. Extracts the signing certificate's public key from the AEA1 auth plist
2. Decrypts the Apple Archive via `aea decrypt -profile 0`
3. Locates the embedded bplist inside the decoded archive and converts to XML

If doing it manually, the steps are:

### Step 1: Extract signing certificate public key

The first 12 bytes of a `.shortcut` file are the AEA1 header (magic + zeros + plist length as uint32 LE). The auth plist starts at byte 12. Parse it, grab the leaf certificate from `SigningCertificateChain`, derive the public key with `openssl x509`.

### Step 2: Decrypt the Apple Archive

```bash
aea decrypt -profile 0 -sign-pub /tmp/signing_pub.pem \
  -i INPUT.shortcut -o /tmp/decoded.bin
```

### Step 3: Extract bplist → XML

The decoded archive starts with `AA01` metadata; the actual workflow bplist is embedded further in. Find the `bplist` marker and parse from there with `plistlib`.

---

## Workflow: Edit & Re-sign XML → .shortcut

> **⚠️ `shortcuts sign` requires the input file to use a `.wflow` extension, otherwise it fails.**

### Step 1: Convert XML back to bplist

```bash
plutil -convert binary1 -o /tmp/workflow.wflow OUTPUT.xml
```

### Step 2: Sign the shortcut

```bash
shortcuts sign -m anyone \
  -i /tmp/workflow.wflow \
  -o OUTPUT.shortcut
```

`shortcuts sign` accepts a bare bplist (old-format shortcut) and automatically wraps it in the AEA1 Apple Archive format with a new CMS signature.

Signing modes:
- `-m anyone` — anyone can import the shortcut
- `-m people-who-know-me` — only your contacts (default)

---

## XML Structure Overview

Key keys in the shortcut plist:

| Key | Description |
|-----|-------------|
| `WFWorkflowActions` | Array of action dicts — the core logic |
| `WFWorkflowActionIdentifier` | Action type, e.g. `is.workflow.actions.gettext` |
| `WFWorkflowActionParameters` | Per-action parameters |
| `WFWorkflowTypes` | Where shortcut appears (e.g. `WFWorkflowTypeShowInSearch`) |
| `WFWorkflowInputContentItemClasses` | Accepted input types |
| `WFWorkflowOutputContentItemClasses` | Output types |
| `WFWorkflowMinimumClientVersion` | Minimum iOS/macOS version |
| `WFWorkflowIcon` | Icon glyph & color |

### Variable References

There are **two distinct ways** to reference a value from earlier in the workflow. They use different fields and are NOT interchangeable:

| Reference Type | `Type` value | Required fields | When to use |
|---|---|---|---|
| **Action Output** | `ActionOutput` | `OutputUUID` + `OutputName` | Source action has a named output (CustomOutputName + UUID) |
| **Named Variable** | `Variable` | `VariableName` | Source is a `SetVariable` action (which has NO UUID on its output) |

Both types use `WFSerializationType=WFTextTokenAttachment`. This applies both in `WFInput` fields and in inline `attachmentsByRange` within `WFTextTokenString` strings.

Literal strings use `WFTextTokenString` with `string` field.

---

From Jansen611/Agent-Skills, MIT.

More from Jansen611/Agent-Skills

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
May 24, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Jansen611

Cite this page

siri-shortcut-editing skill. Agent Mart. https://agentmart.dev/skills/jansen611-siri-shortcut-editing (last updated 2026-10-24)