Automation Developer Tools 1 min read

Stop Writing Shortcuts by Hand! This AI Skill Generates Them Instantly

B
Bright Coding
Author
Share:
Stop Writing Shortcuts by Hand! This AI Skill Generates Them Instantly
Advertisement

Stop Writing Shortcuts by Hand! This AI Skill Generates Them Instantly

Here's a dirty secret Apple doesn't want you to know: building complex Shortcuts on your iPhone is maddening. Dragging tiny blocks around, hunting for the right action, debugging invisible variable flows—it's visual programming hell disguised as "user-friendly" design. But what if you could describe your shortcut in plain English and have AI generate the entire thing? No more finger gymnastics. No more screaming at your screen when a loop breaks for the seventh time.

Enter generate-shortcuts-skill, a Claude Code skill that transforms natural language into valid, signed .shortcut files ready for Apple's ecosystem. Created by developer Drew O'Carrick, this open-source tool exposes the hidden plist architecture of Shortcuts to Claude's reasoning engine—turning your iPhone's most powerful automation platform into a text-driven powerhouse.

The implications are staggering. Power users have spent years reverse-engineering Shortcuts' undocumented format. This skill compresses that expertise into a conversation. Whether you're building productivity automations, prototyping app workflows, or just tired of Apple's visual editor, this changes everything. And it's completely free on GitHub.

What is generate-shortcuts-skill?

generate-shortcuts-skill is a specialized knowledge pack for Claude Code—Anthropic's terminal-based AI coding assistant—that enables AI-generated creation of macOS and iOS Shortcuts. Unlike traditional approaches where you manually construct workflows in Apple's graphical editor, this skill lets you describe what you want in conversational language, then produces machine-readable .shortcut files that bypass the visual interface entirely.

The project emerged from a critical insight: Shortcuts aren't magic—they're structured plist XML files with a predictable (if obscure) schema. Apple's shortcuts CLI tool can sign and validate these files, but generating them requires encyclopedic knowledge of 427+ action identifiers, 728 AppIntents, parameter serialization formats, variable reference systems, and control flow patterns. Drew O'Carrick distilled this arcane knowledge into eight meticulously crafted markdown files that Claude Code consumes as specialized context.

Why is this trending now? Three converging forces: Claude Code's skill system (launched 2024) finally made AI context injection reliable; Apple's Shortcuts platform has matured into a genuine automation powerhouse with deep OS integration; and developers are increasingly rejecting visual programming for text-based workflows that version-control cleanly. The skill sits at this intersection—bridging Apple's consumer-friendly facade with developer-grade automation.

The repository's MIT license and modular documentation architecture have sparked rapid community adoption. Forks are already emerging for specialized domains: home automation shortcuts, developer tooling chains, even CI/CD triggers. This isn't just a utility—it's a gateway to programmatic iOS automation that was previously locked behind Apple's visual editor.

Key Features That Make This Insane

Complete Action Encyclopedia: The skill ships with ACTIONS.md documenting all 427 WF*Action identifiers and their parameters. This isn't a sparse reference—it's the full catalog of what Shortcuts can actually do, from basic file operations to complex media transformations. Claude doesn't guess; it knows the exact API surface.

728 AppIntents Exposed: Modern iOS apps expose functionality through AppIntents, and APPINTENTS.md catalogs 728 of these programmatic hooks. This means your generated shortcuts can interact with third-party apps at native depth, not just Apple's first-party actions.

Parameter Type Safety: PARAMETER_TYPES.md defines serialization formats for every value type Shortcuts accepts—dates, locations, images, dictionaries, URLs with specific encodings. This eliminates the "will this string parse correctly?" anxiety that plagues manual plist construction.

Variable System Mastery: Shortcuts' variable reference mechanism is notoriously opaque. VARIABLES.md demystifies how values flow between actions, how magic variables get resolved, and how to construct proper references without the visual editor's hand-holding.

Control Flow Patterns: Loops, conditionals, and menus in plist format are XML nightmares. CONTROL_FLOW.md provides canonical patterns for Repeat, If, Choose from Menu structures—translating visual block logic into precise hierarchical XML.

Content Filter DSL: FILTERS.md covers the domain-specific language for Find/Filter actions, enabling complex queries against contacts, photos, reminders, and other data stores with proper predicate construction.

Working Examples Library: EXAMPLES.md doesn't just document—it demonstrates. Complete, tested shortcuts show how components compose into functional workflows, serving as both learning material and copy-paste starting points.

Automatic Signing Integration: Generated .shortcut files are automatically signed using macOS's native shortcuts CLI, producing import-ready artifacts. No manual certificate management, no broken imports.

Real-World Use Cases Where This Dominates

Developer Workflow Automation: Imagine a shortcut that grabs your latest screenshot, OCRs any text, formats it as a GitHub issue template, and posts it via API—all triggered from a keyboard command. Building this visually would take an hour of dragging blocks. With the skill: "Create a shortcut that takes the latest screenshot, extracts text with OCR, wraps it in a markdown code block, and copies to clipboard." Done in seconds.

Prototyping App Behaviors: iOS developers testing AppIntents can generate shortcut sequences that exercise their implementations without building full test UIs. Describe the intent flow, get a test harness. This collapses iteration cycles from hours to minutes.

Complex Conditional Logic: Visual editors crumble under nested conditionals. "If battery > 50% AND location is home OR connected to car Bluetooth, then..." becomes unmanageable fast. The skill handles this gracefully—text descriptions map to proper XML control flow without visual spaghetti.

Batch Shortcut Generation: Need 20 similar shortcuts for different contexts? Maybe location-based automations for each team member's device? Manual construction is torture. With Claude Code and this skill, generate the family from a template description, then customize individually.

Version-Controlled Shortcuts: Apple's visual editor produces opaque binary blobs. Skill-generated shortcuts start as text—commit them to git, diff changes, code review automation logic. This brings software engineering discipline to personal automation.

Step-by-Step Installation & Setup Guide

Ready to escape visual programming purgatory? Here's the complete setup:

Prerequisites

  • macOS with the shortcuts CLI tool (included by default on modern macOS)
  • Claude Code CLI installed and authenticated (installation guide)

Installation Commands

Step 1: Create Claude Code's skills directory if it doesn't exist:

mkdir -p ~/.claude/skills

This establishes the canonical location where Claude Code discovers available skills.

Step 2: Clone the repository into the skills directory:

cd ~/.claude/skills
git clone https://github.com/drewocarr/shortcuts-generator.git

Alternatively, download the ZIP from GitHub and extract files manually to ~/.claude/skills/shortcuts-generator/.

Step 3: Verify your directory structure matches this exactly:

~/.claude/
└── skills/
    └── shortcuts-generator/
        ├── SKILL.md          # Required - skill definition and quick start
        ├── ACTIONS.md        # 427 WF*Action identifiers
        ├── APPINTENTS.md     # 728 AppIntent actions
        ├── CONTROL_FLOW.md   # Repeat, Conditional, Menu patterns
        ├── EXAMPLES.md       # Complete working examples
        ├── FILTERS.md        # Content filters for Find/Filter
        ├── PARAMETER_TYPES.md # Value types and serialization
        ├── PLIST_FORMAT.md   # Plist structure specification
        └── VARIABLES.md      # Variable reference system

The SKILL.md file is mandatory—Claude Code uses it to identify and activate the skill. Missing files won't break installation but reduce capability coverage.

Step 4: Restart Claude Code completely. The skill auto-detects on next conversation startup—no manual registration needed.

Verification

Test with a simple request: "Create a shortcut that shows the current weather." Claude should invoke the skill, reference ACTIONS.md for the Get Current Weather action, and produce a signed .shortcut file.

REAL Code Examples from the Repository

Let's examine actual patterns from the skill's documentation and see how they translate to generated output.

Advertisement

Example 1: Basic Skill Invocation Pattern

The SKILL.md defines how Claude recognizes when to activate this capability. Here's the structural pattern:

---
name: shortcuts-generator
description: |
  Use this skill when the user wants to create, build, generate, or modify 
  an iOS/macOS Shortcut. This includes requests for:
  - Creating .shortcut files
  - Generating plist XML for Shortcuts
  - Building automations for iPhone, iPad, or Mac
  - Signing shortcuts for import
allowed-tools: ["Read", "Write", "Bash"]
---

This YAML frontmatter is the activation trigger. When your request matches the description patterns, Claude automatically loads all eight documentation files into context. The allowed-tools restriction ensures Claude uses file operations and shell commands relevant to shortcut generation—not web searches or unrelated APIs. This focused context window is what makes the skill reliable versus generic AI attempts.

Example 2: Directory Setup Verification

From the README, the installation verification uses standard Unix tools:

# Create nested directory structure, -p flag creates parents if missing
mkdir -p ~/.claude/skills

# Change to target directory
cd ~/.claude/skills

# Clone with HTTPS (SSH also works if keys configured)
git clone https://github.com/drewocarr/shortcuts-generator.git

The -p flag in mkdir is defensive programming—it prevents errors if ~/.claude already exists. Using cd before git clone ensures the repository lands in the correct location regardless of your shell's starting directory. These seem trivial, but they're the difference between "it just works" and mysterious "skill not found" failures.

Example 3: Natural Language to Shortcut Generation

The README's usage examples demonstrate the conversational interface:

"Create a shortcut that shows the current weather"
"Build a shortcut that asks for text input and shows it"
"Make a shortcut that opens Safari and navigates to a URL"

Behind the scenes, Claude processes these through this pipeline:

  1. Intent Classification: Matches against SKILL.md description patterns
  2. Action Retrieval: Queries ACTIONS.md for relevant WF*Action identifiers (e.g., WFGetCurrentWeatherConditionsAction)
  3. Parameter Binding: Uses PARAMETER_TYPES.md to serialize values (location coordinates, temperature units)
  4. Structure Assembly: Composes actions into valid plist XML per PLIST_FORMAT.md
  5. Variable Resolution: Injects proper variable references from VARIABLES.md for data flow between actions
  6. File Generation: Writes XML to .shortcut extension
  7. Signing: Executes shortcuts sign via Bash tool to produce importable artifact

This seven-stage pipeline happens automatically—you describe, Claude executes.

Example 4: Documentation-Driven Development

The skill's file organization reveals a sophisticated knowledge architecture:

| File | Description |
|------|-------------|
| `SKILL.md` | Skill definition with quick start guide |
| `ACTIONS.md` | All 427 WF*Action identifiers and parameters |
| `APPINTENTS.md` | All 728 AppIntent actions |
| `PARAMETER_TYPES.md` | Parameter value types and serialization formats |
| `VARIABLES.md` | Variable reference system |
| `CONTROL_FLOW.md` | Repeat, Conditional, Menu patterns |
| `FILTERS.md` | Content filters for Find/Filter actions |
| `EXAMPLES.md` | Complete working examples |

This modular design enables surgical context loading. Claude doesn't need to load 728 AppIntents for a basic weather shortcut—SKILL.md guides selective retrieval. The separation also supports community contributions: add new actions to ACTIONS.md without touching core logic.

Advanced Usage & Best Practices

Compose Complex Workflows Incrementally: Don't ask for 50-action shortcuts in one prompt. Build core functionality first, then layer enhancements: "Add a notification if battery is below 20%" as a follow-up. This mirrors iterative development and produces more reliable results.

Leverage Examples as Templates: EXAMPLES.md contains battle-tested patterns. Reference them explicitly: "Like the morning routine example, but trigger on WiFi connection instead of time." This grounds generation in verified structures.

Version Your Generated Shortcuts: Store .shortcut files in git with descriptive commits. When Apple breaks compatibility, you can diff against working versions and prompt Claude: "This shortcut stopped working in iOS 18—update the plist format."

Combine with Other Claude Code Skills: The Shortcuts skill composes beautifully with file system operations, API integrations, and code generation. Chain them: generate a shortcut that calls a Python script Claude also wrote.

Debug with Plist Inspection: When imports fail, ask Claude to dump the raw XML and walk through validation. The skill's PLIST_FORMAT.md documentation enables precise error diagnosis.

Batch Generate with Variable Substitution: Create template shortcuts with placeholder values, then script generation across parameter sets using Claude's context window.

Comparison with Alternatives

Approach Learning Curve Power Version Control Speed AI Integration
Apple Visual Editor Low Medium ❌ Impossible Slow manual ❌ None
Shortcuts plist XML (manual) Extreme High ✅ Possible Glacial ❌ None
Third-party tools (ScPL, etc.) High Medium-High ✅ Possible Moderate ❌ None
generate-shortcuts-skill Low Maximum ✅ Native Instant Native

Apple's Visual Editor wins for casual users but hits hard limits: no version control, no programmatic generation, painful complex logic. Manual XML is theoretically powerful but requires weeks of reverse-engineering. Third-party converters like ScPL abstract some complexity but introduce their own syntax and lag behind iOS updates.

The Claude Code skill absorbs the complexity while preserving full capability. You get the power of raw plist with the accessibility of conversation. And because it uses Apple's native shortcuts CLI for signing, compatibility is guaranteed—no translation layer lag.

FAQ

Q: Do I need coding experience to use this skill? A: No! If you can describe what you want in English, Claude handles the technical implementation. However, basic understanding of Shortcuts concepts (actions, variables, triggers) helps you craft better prompts.

Q: Will generated shortcuts work on both iOS and macOS? A: Generally yes, but platform-specific actions (like Mac-only shell scripts) require macOS. The skill respects action availability—Claude won't generate iPad-only features for iPhone targets if you specify constraints.

Q: Can I edit generated shortcuts in Apple's visual editor later? A: Absolutely. Signed .shortcut files import cleanly into the Shortcuts app and are fully editable visually. This skill doesn't lock you out—it accelerates creation.

Q: Is this free? What's the catch? A: Completely free under MIT license. You need Claude Code access (which requires Anthropic API credits or subscription), but the skill itself costs nothing.

Q: How current is the action documentation? A: The repository documents 427 actions and 728 AppIntents as of its last update. Community PRs welcome for new iOS releases. The modular structure makes updates straightforward.

Q: Can I use this for App Store shortcuts or distribution? A: Generated shortcuts are standard .shortcut files. Distribution through the Shortcuts app gallery or third-party platforms works normally. No proprietary lock-in.

Q: What if Claude generates a broken shortcut? A: The skill includes validation patterns, and Apple's shortcuts CLI catches many errors during signing. Describe the failure and Claude can iterate—"This import fails with 'invalid parameter'—fix the date format."

Conclusion

The generate-shortcuts-skill represents a paradigm shift: automation that builds automation. It collapses the barrier between imagining a workflow and deploying it across Apple's ecosystem. No more tedious block-dragging, no more reverse-engineering undocumented plist structures, no more choosing between visual simplicity and real power.

For developers, this is a force multiplier—prototype faster, test AppIntents programmatically, version-control your personal automations. For power users, it's liberation from Apple's well-intentioned but limiting visual editor. For the curious, it's a fascinating glimpse into how structured documentation can transform a general AI into a domain specialist.

The skill is mature, well-documented, and actively maintained at github.com/drewocarr/generate-shortcuts-skill. Installation takes under two minutes. Your first working shortcut? Under thirty seconds after that.

Stop wrestling with visual programming. Start describing what you want and letting AI handle the implementation. Your future self—staring at a complex automation that just works—will thank you.

Clone it now. Generate your first shortcut. Never look back.

Advertisement

Comments (0)

No comments yet. Be the first to share your thoughts!

Leave a Comment

Apps & Tools Open Source

Apps & Tools Open Source

Bright Coding Prompt

Bright Coding Prompt

Categories

Advertisement
Advertisement
Advertisement