shortcuts-playground 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +54 -0
  2. package/agents/shortcut-builder.md +172 -0
  3. package/agents/shortcut-remixer.md +239 -0
  4. package/commands/build-shortcut.md +32 -0
  5. package/commands/remix-shortcut.md +34 -0
  6. package/opencode.json +30 -0
  7. package/package.json +47 -0
  8. package/plugin/validator.ts +179 -0
  9. package/skills/shortcuts-playground/ACTIONS.md +713 -0
  10. package/skills/shortcuts-playground/APPINTENTS.md +2760 -0
  11. package/skills/shortcuts-playground/AUTOMATION_TRIGGERS.md +133 -0
  12. package/skills/shortcuts-playground/BEST_PRACTICES.md +357 -0
  13. package/skills/shortcuts-playground/CHANGELOG.md +585 -0
  14. package/skills/shortcuts-playground/CONTROL_FLOW.md +777 -0
  15. package/skills/shortcuts-playground/DATE_TIME.md +75 -0
  16. package/skills/shortcuts-playground/EXAMPLES.md +738 -0
  17. package/skills/shortcuts-playground/FILTERS.md +697 -0
  18. package/skills/shortcuts-playground/HEALTHKIT.md +317 -0
  19. package/skills/shortcuts-playground/ICONS_AND_COLORS.md +89 -0
  20. package/skills/shortcuts-playground/JAVASCRIPT_WEBPAGE.md +51 -0
  21. package/skills/shortcuts-playground/PARAMETER_TYPES.md +1117 -0
  22. package/skills/shortcuts-playground/PLIST_FORMAT.md +296 -0
  23. package/skills/shortcuts-playground/README.md +77 -0
  24. package/skills/shortcuts-playground/SKILL.md +459 -0
  25. package/skills/shortcuts-playground/THIRD_PARTY_ACTIONS.md +77 -0
  26. package/skills/shortcuts-playground/TOOLKIT_SNAPSHOT.md +62 -0
  27. package/skills/shortcuts-playground/URL_SCHEMES.md +59 -0
  28. package/skills/shortcuts-playground/VARIABLES.md +569 -0
  29. package/skills/shortcuts-playground/assets/shortcuts-small.svg +14 -0
  30. package/skills/shortcuts-playground/assets/shortcuts.png +0 -0
  31. package/skills/shortcuts-playground/data/healthkit-ios26.2-reference.json +2603 -0
  32. package/skills/shortcuts-playground/data/macos27-shortpy-grounding.json +4085 -0
  33. package/skills/shortcuts-playground/data/macos27-workflow-trigger-samples.json +1 -0
  34. package/skills/shortcuts-playground/data/shortcuts-glyph-synonyms.json +5102 -0
  35. package/skills/shortcuts-playground/data/shortcuts-icon-colors.json +107 -0
  36. package/skills/shortcuts-playground/data/shortcuts-official-glyph-mapping.json +509 -0
  37. package/skills/shortcuts-playground/data/toolkit-v63-tool-ids.json +1806 -0
  38. package/skills/shortcuts-playground/data/toolkit-v78-first-party-enum-cases.json +1 -0
  39. package/skills/shortcuts-playground/data/toolkit-v78-first-party-parameter-keys.json +1 -0
  40. package/skills/shortcuts-playground/data/toolkit-v78-ios27-tool-ids.json +1222 -0
  41. package/skills/shortcuts-playground/data/toolkit-v78-tool-ids.json +2745 -0
  42. package/skills/shortcuts-playground/data/toolkit-v78-trigger-parameter-keys.json +1051 -0
  43. package/skills/shortcuts-playground/golden-shortcuts/index.jsonl +19 -0
  44. package/skills/shortcuts-playground/golden-shortcuts/xml/1be4dde95b794253bf82438e201b33e7.xml +174 -0
  45. package/skills/shortcuts-playground/golden-shortcuts/xml/2e0fb675e45948aaacee7e534f910492.xml +1016 -0
  46. package/skills/shortcuts-playground/golden-shortcuts/xml/332c12a0060043b388b22b806be7ab58.xml +1924 -0
  47. package/skills/shortcuts-playground/golden-shortcuts/xml/3dd4ee24e43f464f92adaa70a0311eaa.xml +1177 -0
  48. package/skills/shortcuts-playground/golden-shortcuts/xml/4d102301c6e646faa7a8a221f4f4ec98.xml +321 -0
  49. package/skills/shortcuts-playground/golden-shortcuts/xml/51cc4e26d1044893a0c3f2f3630cf2d2.xml +1933 -0
  50. package/skills/shortcuts-playground/golden-shortcuts/xml/623e7f1ca5f948e2bd53811fec63e544.xml +136 -0
  51. package/skills/shortcuts-playground/golden-shortcuts/xml/6a18b76843ac45c384ac3400f3740997.xml +1791 -0
  52. package/skills/shortcuts-playground/golden-shortcuts/xml/71f0cacb0f604b399b76c5dcb7286e7c.xml +2228 -0
  53. package/skills/shortcuts-playground/golden-shortcuts/xml/807525ed9f974829bc8494defac923a8.xml +259 -0
  54. package/skills/shortcuts-playground/golden-shortcuts/xml/8ab0d39826ab4249be58672763caa3ba.xml +420 -0
  55. package/skills/shortcuts-playground/golden-shortcuts/xml/91c45fd3fd3b427897d9ba485efb1227.xml +800 -0
  56. package/skills/shortcuts-playground/golden-shortcuts/xml/97be626bb25c41709d175646a7f6d8f2.xml +424 -0
  57. package/skills/shortcuts-playground/golden-shortcuts/xml/ae59e10d409348f9bd33894f03f9beb4.xml +568 -0
  58. package/skills/shortcuts-playground/golden-shortcuts/xml/afa83b6be811483b9c32189c41eb9312.xml +391 -0
  59. package/skills/shortcuts-playground/golden-shortcuts/xml/cfdb083b857e4ac189629fa386d27cdc.xml +193 -0
  60. package/skills/shortcuts-playground/golden-shortcuts/xml/e01cebe192d64b2fbca80204d03d92ab.xml +111 -0
  61. package/skills/shortcuts-playground/golden-shortcuts/xml/ef669bcf8bad489d9ef4b88bfaf5772f.xml +780 -0
  62. package/skills/shortcuts-playground/golden-shortcuts/xml/f44f5caf5e3e48d4817e73af450c4404.xml +570 -0
  63. package/skills/shortcuts-playground/scripts/generate_healthkit_reference.py +394 -0
  64. package/skills/shortcuts-playground/scripts/lookup_action_grounding.py +1164 -0
  65. package/skills/shortcuts-playground/scripts/select_shortcut_icon_color.py +597 -0
  66. package/skills/shortcuts-playground/scripts/test_random_mixed_shortcuts.py +1067 -0
  67. package/skills/shortcuts-playground/scripts/test_wiring_regressions.py +2247 -0
  68. package/skills/shortcuts-playground/scripts/validate_shortcut.py +4526 -0
@@ -0,0 +1,738 @@
1
+ # Complete Working Examples
2
+
3
+ Copy-paste ready examples that can be signed and imported.
4
+
5
+ ## HealthKit XML Examples
6
+
7
+ HealthKit examples live in [HEALTHKIT.md](HEALTHKIT.md). They are bundled anonymized iOS Shortcuts XML snippets covering Find Health Samples, Log Health Sample quantity/category shapes, Get Details of Health Sample wiring, and Log Workout evidence.
8
+
9
+ ## Missing Actions (Real Syntax)
10
+
11
+ Use these identifiers/keys when generating Measurement + Send Email actions.
12
+
13
+ ```xml
14
+ <!-- Create Measurement (outputs Measurement) -->
15
+ <dict>
16
+ <key>WFWorkflowActionIdentifier</key>
17
+ <string>is.workflow.actions.measurement.create</string>
18
+ <key>WFWorkflowActionParameters</key>
19
+ <dict>
20
+ <key>UUID</key>
21
+ <string>4C78651D-90D9-4ED5-99A3-DE37FEA319C2</string>
22
+ </dict>
23
+ </dict>
24
+
25
+ <!-- Convert Measurement (wire WFInput to Measurement output) -->
26
+ <dict>
27
+ <key>WFWorkflowActionIdentifier</key>
28
+ <string>is.workflow.actions.measurement.convert</string>
29
+ <key>WFWorkflowActionParameters</key>
30
+ <dict>
31
+ <key>UUID</key>
32
+ <string>CC570E80-93E1-4BE6-B9E5-BC192E35E691</string>
33
+ <key>WFInput</key>
34
+ <dict>
35
+ <key>Value</key>
36
+ <dict>
37
+ <key>OutputName</key>
38
+ <string>Measurement</string>
39
+ <key>OutputUUID</key>
40
+ <string>4C78651D-90D9-4ED5-99A3-DE37FEA319C2</string>
41
+ <key>Type</key>
42
+ <string>ActionOutput</string>
43
+ </dict>
44
+ <key>WFSerializationType</key>
45
+ <string>WFTextTokenAttachment</string>
46
+ </dict>
47
+ </dict>
48
+ </dict>
49
+
50
+ <!-- Send Email (attach Text output via WFSendEmailActionInputAttachments) -->
51
+ <dict>
52
+ <key>WFWorkflowActionIdentifier</key>
53
+ <string>is.workflow.actions.sendemail</string>
54
+ <key>WFWorkflowActionParameters</key>
55
+ <dict>
56
+ <key>UUID</key>
57
+ <string>B7FE8569-7458-48BF-B8DA-90EA47CDED1E</string>
58
+ <key>WFSendEmailActionInputAttachments</key>
59
+ <dict>
60
+ <key>Value</key>
61
+ <dict>
62
+ <key>attachmentsByRange</key>
63
+ <dict>
64
+ <key>{0, 1}</key>
65
+ <dict>
66
+ <key>OutputName</key>
67
+ <string>Text</string>
68
+ <key>OutputUUID</key>
69
+ <string>8A6EBE5D-D6C6-41AD-9A94-52A8EAAD5E5D</string>
70
+ <key>Type</key>
71
+ <string>ActionOutput</string>
72
+ </dict>
73
+ </dict>
74
+ <key>string</key>
75
+ <string></string>
76
+ </dict>
77
+ <key>WFSerializationType</key>
78
+ <string>WFTextTokenString</string>
79
+ </dict>
80
+ </dict>
81
+ </dict>
82
+ ```
83
+
84
+ ## Set Name vs Rename File
85
+
86
+ Use **Set Name** (`is.workflow.actions.setitemname`) when the workflow needs a renamed item object for **Save File** or **Share**. Do not use **Rename File** (`is.workflow.actions.file.rename`) for this pattern; Rename File changes the original file in place.
87
+
88
+ ```xml
89
+ <!-- Set Name (creates a renamed item object for downstream Save/Share) -->
90
+ <dict>
91
+ <key>WFWorkflowActionIdentifier</key>
92
+ <string>is.workflow.actions.setitemname</string>
93
+ <key>WFWorkflowActionParameters</key>
94
+ <dict>
95
+ <key>UUID</key>
96
+ <string>C7056602-18BE-4DF6-88DC-099821A06AD2</string>
97
+ <key>WFInput</key>
98
+ <dict>
99
+ <key>Value</key>
100
+ <dict>
101
+ <key>Type</key>
102
+ <string>Variable</string>
103
+ <key>VariableName</key>
104
+ <string>Original File</string>
105
+ </dict>
106
+ <key>WFSerializationType</key>
107
+ <string>WFTextTokenAttachment</string>
108
+ </dict>
109
+ <key>WFName</key>
110
+ <string>Renamed.txt</string>
111
+ </dict>
112
+ </dict>
113
+
114
+ <!-- Save File receives Set Name's Renamed Item output -->
115
+ <dict>
116
+ <key>WFWorkflowActionIdentifier</key>
117
+ <string>is.workflow.actions.documentpicker.save</string>
118
+ <key>WFWorkflowActionParameters</key>
119
+ <dict>
120
+ <key>WFInput</key>
121
+ <dict>
122
+ <key>Value</key>
123
+ <dict>
124
+ <key>OutputName</key>
125
+ <string>Renamed Item</string>
126
+ <key>OutputUUID</key>
127
+ <string>C7056602-18BE-4DF6-88DC-099821A06AD2</string>
128
+ <key>Type</key>
129
+ <string>ActionOutput</string>
130
+ </dict>
131
+ <key>WFSerializationType</key>
132
+ <string>WFTextTokenAttachment</string>
133
+ </dict>
134
+ </dict>
135
+ </dict>
136
+ ```
137
+
138
+ ## Example 1: Hello World
139
+
140
+ The simplest shortcut - displays "Hello World!".
141
+
142
+ ```xml
143
+ <?xml version="1.0" encoding="UTF-8"?>
144
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
145
+ <plist version="1.0">
146
+ <dict>
147
+ <key>WFWorkflowActions</key>
148
+ <array>
149
+ <dict>
150
+ <key>WFWorkflowActionIdentifier</key>
151
+ <string>is.workflow.actions.gettext</string>
152
+ <key>WFWorkflowActionParameters</key>
153
+ <dict>
154
+ <key>UUID</key>
155
+ <string>11111111-1111-1111-1111-111111111111</string>
156
+ <key>WFTextActionText</key>
157
+ <string>Hello World!</string>
158
+ </dict>
159
+ </dict>
160
+ <dict>
161
+ <key>WFWorkflowActionIdentifier</key>
162
+ <string>is.workflow.actions.showresult</string>
163
+ <key>WFWorkflowActionParameters</key>
164
+ <dict>
165
+ <key>Text</key>
166
+ <dict>
167
+ <key>Value</key>
168
+ <dict>
169
+ <key>attachmentsByRange</key>
170
+ <dict>
171
+ <key>{0, 1}</key>
172
+ <dict>
173
+ <key>OutputName</key>
174
+ <string>Text</string>
175
+ <key>OutputUUID</key>
176
+ <string>11111111-1111-1111-1111-111111111111</string>
177
+ <key>Type</key>
178
+ <string>ActionOutput</string>
179
+ </dict>
180
+ </dict>
181
+ <key>string</key>
182
+ <string></string>
183
+ </dict>
184
+ <key>WFSerializationType</key>
185
+ <string>WFTextTokenString</string>
186
+ </dict>
187
+ </dict>
188
+ </dict>
189
+ </array>
190
+ <key>WFWorkflowClientVersion</key>
191
+ <string>2700.0.4</string>
192
+ <key>WFWorkflowHasOutputFallback</key>
193
+ <false/>
194
+ <key>WFWorkflowIcon</key>
195
+ <dict>
196
+ <key>WFWorkflowIconGlyphNumber</key>
197
+ <integer>59511</integer>
198
+ <key>WFWorkflowIconStartColor</key>
199
+ <integer>4282601983</integer>
200
+ </dict>
201
+ <key>WFWorkflowImportQuestions</key>
202
+ <array/>
203
+ <key>WFWorkflowMinimumClientVersion</key>
204
+ <integer>900</integer>
205
+ <key>WFWorkflowMinimumClientVersionString</key>
206
+ <string>900</string>
207
+ <key>WFWorkflowName</key>
208
+ <string>Hello World</string>
209
+ <key>WFWorkflowOutputContentItemClasses</key>
210
+ <array/>
211
+ <key>WFWorkflowTypes</key>
212
+ <array/>
213
+ </dict>
214
+ </plist>
215
+ ```
216
+
217
+ ---
218
+
219
+ ## Example 2: Ask User for Input
220
+
221
+ Asks user for their name and displays a greeting.
222
+
223
+ ```xml
224
+ <?xml version="1.0" encoding="UTF-8"?>
225
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
226
+ <plist version="1.0">
227
+ <dict>
228
+ <key>WFWorkflowActions</key>
229
+ <array>
230
+ <dict>
231
+ <key>WFWorkflowActionIdentifier</key>
232
+ <string>is.workflow.actions.ask</string>
233
+ <key>WFWorkflowActionParameters</key>
234
+ <dict>
235
+ <key>UUID</key>
236
+ <string>AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA</string>
237
+ <key>WFAskActionPrompt</key>
238
+ <string>What is your name?</string>
239
+ <key>WFInputType</key>
240
+ <string>Text</string>
241
+ </dict>
242
+ </dict>
243
+ <dict>
244
+ <key>WFWorkflowActionIdentifier</key>
245
+ <string>is.workflow.actions.showresult</string>
246
+ <key>WFWorkflowActionParameters</key>
247
+ <dict>
248
+ <key>Text</key>
249
+ <dict>
250
+ <key>Value</key>
251
+ <dict>
252
+ <key>attachmentsByRange</key>
253
+ <dict>
254
+ <key>{7, 1}</key>
255
+ <dict>
256
+ <key>OutputName</key>
257
+ <string>Provided Input</string>
258
+ <key>OutputUUID</key>
259
+ <string>AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA</string>
260
+ <key>Type</key>
261
+ <string>ActionOutput</string>
262
+ </dict>
263
+ </dict>
264
+ <key>string</key>
265
+ <string>Hello, !</string>
266
+ </dict>
267
+ <key>WFSerializationType</key>
268
+ <string>WFTextTokenString</string>
269
+ </dict>
270
+ </dict>
271
+ </dict>
272
+ </array>
273
+ <key>WFWorkflowClientVersion</key>
274
+ <string>2700.0.4</string>
275
+ <key>WFWorkflowHasOutputFallback</key>
276
+ <false/>
277
+ <key>WFWorkflowIcon</key>
278
+ <dict>
279
+ <key>WFWorkflowIconGlyphNumber</key>
280
+ <integer>59511</integer>
281
+ <key>WFWorkflowIconStartColor</key>
282
+ <integer>4282601983</integer>
283
+ </dict>
284
+ <key>WFWorkflowImportQuestions</key>
285
+ <array/>
286
+ <key>WFWorkflowMinimumClientVersion</key>
287
+ <integer>900</integer>
288
+ <key>WFWorkflowMinimumClientVersionString</key>
289
+ <string>900</string>
290
+ <key>WFWorkflowName</key>
291
+ <string>Greeting</string>
292
+ <key>WFWorkflowOutputContentItemClasses</key>
293
+ <array/>
294
+ <key>WFWorkflowTypes</key>
295
+ <array/>
296
+ </dict>
297
+ </plist>
298
+ ```
299
+
300
+ ---
301
+
302
+ ## Example 3: AI Query
303
+
304
+ Asks user for a question, sends it to Apple Intelligence, and displays the response.
305
+
306
+ ```xml
307
+ <?xml version="1.0" encoding="UTF-8"?>
308
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
309
+ <plist version="1.0">
310
+ <dict>
311
+ <key>WFWorkflowActions</key>
312
+ <array>
313
+ <dict>
314
+ <key>WFWorkflowActionIdentifier</key>
315
+ <string>is.workflow.actions.ask</string>
316
+ <key>WFWorkflowActionParameters</key>
317
+ <dict>
318
+ <key>UUID</key>
319
+ <string>BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB</string>
320
+ <key>WFAskActionPrompt</key>
321
+ <string>What would you like to ask?</string>
322
+ <key>WFInputType</key>
323
+ <string>Text</string>
324
+ </dict>
325
+ </dict>
326
+ <dict>
327
+ <key>WFWorkflowActionIdentifier</key>
328
+ <string>is.workflow.actions.askllm</string>
329
+ <key>WFWorkflowActionParameters</key>
330
+ <dict>
331
+ <key>UUID</key>
332
+ <string>CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC</string>
333
+ <key>WFLLMModel</key>
334
+ <string>Apple Intelligence</string>
335
+ <key>WFGenerativeResultType</key>
336
+ <string>Text</string>
337
+ <key>WFLLMPrompt</key>
338
+ <dict>
339
+ <key>Value</key>
340
+ <dict>
341
+ <key>attachmentsByRange</key>
342
+ <dict>
343
+ <key>{0, 1}</key>
344
+ <dict>
345
+ <key>OutputName</key>
346
+ <string>Provided Input</string>
347
+ <key>OutputUUID</key>
348
+ <string>BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB</string>
349
+ <key>Type</key>
350
+ <string>ActionOutput</string>
351
+ </dict>
352
+ </dict>
353
+ <key>string</key>
354
+ <string></string>
355
+ </dict>
356
+ <key>WFSerializationType</key>
357
+ <string>WFTextTokenString</string>
358
+ </dict>
359
+ </dict>
360
+ </dict>
361
+ <dict>
362
+ <key>WFWorkflowActionIdentifier</key>
363
+ <string>is.workflow.actions.showresult</string>
364
+ <key>WFWorkflowActionParameters</key>
365
+ <dict>
366
+ <key>Text</key>
367
+ <dict>
368
+ <key>Value</key>
369
+ <dict>
370
+ <key>attachmentsByRange</key>
371
+ <dict>
372
+ <key>{0, 1}</key>
373
+ <dict>
374
+ <key>OutputName</key>
375
+ <string>Response</string>
376
+ <key>OutputUUID</key>
377
+ <string>CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC</string>
378
+ <key>Type</key>
379
+ <string>ActionOutput</string>
380
+ </dict>
381
+ </dict>
382
+ <key>string</key>
383
+ <string></string>
384
+ </dict>
385
+ <key>WFSerializationType</key>
386
+ <string>WFTextTokenString</string>
387
+ </dict>
388
+ </dict>
389
+ </dict>
390
+ </array>
391
+ <key>WFWorkflowClientVersion</key>
392
+ <string>2700.0.4</string>
393
+ <key>WFWorkflowHasOutputFallback</key>
394
+ <false/>
395
+ <key>WFWorkflowIcon</key>
396
+ <dict>
397
+ <key>WFWorkflowIconGlyphNumber</key>
398
+ <integer>59511</integer>
399
+ <key>WFWorkflowIconStartColor</key>
400
+ <integer>4282601983</integer>
401
+ </dict>
402
+ <key>WFWorkflowImportQuestions</key>
403
+ <array/>
404
+ <key>WFWorkflowMinimumClientVersion</key>
405
+ <integer>900</integer>
406
+ <key>WFWorkflowMinimumClientVersionString</key>
407
+ <string>900</string>
408
+ <key>WFWorkflowName</key>
409
+ <string>Ask AI</string>
410
+ <key>WFWorkflowOutputContentItemClasses</key>
411
+ <array/>
412
+ <key>WFWorkflowTypes</key>
413
+ <array/>
414
+ </dict>
415
+ </plist>
416
+ ```
417
+
418
+ ---
419
+
420
+ ## Example 4: Menu Demo
421
+
422
+ Presents a menu with three options, each displaying different text.
423
+
424
+ > **Note:** This example uses bare `<string>` for Show Result `Text` because the values are literal text with no variables. When Show Result displays a **variable**, you MUST use `WFTextTokenString` with a placeholder — see the Critical Variable Wiring Rules in BEST_PRACTICES.md.
425
+
426
+ ```xml
427
+ <?xml version="1.0" encoding="UTF-8"?>
428
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
429
+ <plist version="1.0">
430
+ <dict>
431
+ <key>WFWorkflowActions</key>
432
+ <array>
433
+ <!-- Menu Start -->
434
+ <dict>
435
+ <key>WFWorkflowActionIdentifier</key>
436
+ <string>is.workflow.actions.choosefrommenu</string>
437
+ <key>WFWorkflowActionParameters</key>
438
+ <dict>
439
+ <key>GroupingIdentifier</key>
440
+ <string>DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD</string>
441
+ <key>WFControlFlowMode</key>
442
+ <integer>0</integer>
443
+ <key>WFMenuPrompt</key>
444
+ <string>What would you like to do?</string>
445
+ <key>WFMenuItems</key>
446
+ <array>
447
+ <string>Say Hello</string>
448
+ <string>Say Goodbye</string>
449
+ <string>Tell a Joke</string>
450
+ </array>
451
+ </dict>
452
+ </dict>
453
+ <!-- Case 1 -->
454
+ <dict>
455
+ <key>WFWorkflowActionIdentifier</key>
456
+ <string>is.workflow.actions.choosefrommenu</string>
457
+ <key>WFWorkflowActionParameters</key>
458
+ <dict>
459
+ <key>GroupingIdentifier</key>
460
+ <string>DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD</string>
461
+ <key>WFControlFlowMode</key>
462
+ <integer>1</integer>
463
+ <key>WFMenuItemTitle</key>
464
+ <string>Say Hello</string>
465
+ </dict>
466
+ </dict>
467
+ <dict>
468
+ <key>WFWorkflowActionIdentifier</key>
469
+ <string>is.workflow.actions.showresult</string>
470
+ <key>WFWorkflowActionParameters</key>
471
+ <dict>
472
+ <key>Text</key>
473
+ <string>Hello there! Nice to meet you.</string>
474
+ </dict>
475
+ </dict>
476
+ <!-- Case 2 -->
477
+ <dict>
478
+ <key>WFWorkflowActionIdentifier</key>
479
+ <string>is.workflow.actions.choosefrommenu</string>
480
+ <key>WFWorkflowActionParameters</key>
481
+ <dict>
482
+ <key>GroupingIdentifier</key>
483
+ <string>DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD</string>
484
+ <key>WFControlFlowMode</key>
485
+ <integer>1</integer>
486
+ <key>WFMenuItemTitle</key>
487
+ <string>Say Goodbye</string>
488
+ </dict>
489
+ </dict>
490
+ <dict>
491
+ <key>WFWorkflowActionIdentifier</key>
492
+ <string>is.workflow.actions.showresult</string>
493
+ <key>WFWorkflowActionParameters</key>
494
+ <dict>
495
+ <key>Text</key>
496
+ <string>Goodbye! See you next time.</string>
497
+ </dict>
498
+ </dict>
499
+ <!-- Case 3 -->
500
+ <dict>
501
+ <key>WFWorkflowActionIdentifier</key>
502
+ <string>is.workflow.actions.choosefrommenu</string>
503
+ <key>WFWorkflowActionParameters</key>
504
+ <dict>
505
+ <key>GroupingIdentifier</key>
506
+ <string>DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD</string>
507
+ <key>WFControlFlowMode</key>
508
+ <integer>1</integer>
509
+ <key>WFMenuItemTitle</key>
510
+ <string>Tell a Joke</string>
511
+ </dict>
512
+ </dict>
513
+ <dict>
514
+ <key>WFWorkflowActionIdentifier</key>
515
+ <string>is.workflow.actions.showresult</string>
516
+ <key>WFWorkflowActionParameters</key>
517
+ <dict>
518
+ <key>Text</key>
519
+ <string>Why do programmers prefer dark mode? Because light attracts bugs!</string>
520
+ </dict>
521
+ </dict>
522
+ <!-- Menu End -->
523
+ <dict>
524
+ <key>WFWorkflowActionIdentifier</key>
525
+ <string>is.workflow.actions.choosefrommenu</string>
526
+ <key>WFWorkflowActionParameters</key>
527
+ <dict>
528
+ <key>GroupingIdentifier</key>
529
+ <string>DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD</string>
530
+ <key>WFControlFlowMode</key>
531
+ <integer>2</integer>
532
+ </dict>
533
+ </dict>
534
+ </array>
535
+ <key>WFWorkflowClientVersion</key>
536
+ <string>2700.0.4</string>
537
+ <key>WFWorkflowHasOutputFallback</key>
538
+ <false/>
539
+ <key>WFWorkflowIcon</key>
540
+ <dict>
541
+ <key>WFWorkflowIconGlyphNumber</key>
542
+ <integer>59511</integer>
543
+ <key>WFWorkflowIconStartColor</key>
544
+ <integer>4282601983</integer>
545
+ </dict>
546
+ <key>WFWorkflowImportQuestions</key>
547
+ <array/>
548
+ <key>WFWorkflowMinimumClientVersion</key>
549
+ <integer>900</integer>
550
+ <key>WFWorkflowMinimumClientVersionString</key>
551
+ <string>900</string>
552
+ <key>WFWorkflowName</key>
553
+ <string>Menu Demo</string>
554
+ <key>WFWorkflowOutputContentItemClasses</key>
555
+ <array/>
556
+ <key>WFWorkflowTypes</key>
557
+ <array/>
558
+ </dict>
559
+ </plist>
560
+ ```
561
+
562
+ ---
563
+
564
+ ## Example 5: Weather + AI Report
565
+
566
+ Gets current weather and uses AI to generate a friendly report.
567
+
568
+ ```xml
569
+ <?xml version="1.0" encoding="UTF-8"?>
570
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
571
+ <plist version="1.0">
572
+ <dict>
573
+ <key>WFWorkflowActions</key>
574
+ <array>
575
+ <!-- Get Weather -->
576
+ <dict>
577
+ <key>WFWorkflowActionIdentifier</key>
578
+ <string>is.workflow.actions.weather.currentconditions</string>
579
+ <key>WFWorkflowActionParameters</key>
580
+ <dict>
581
+ <key>UUID</key>
582
+ <string>EEEEEEEE-EEEE-EEEE-EEEE-EEEEEEEEEEEE</string>
583
+ </dict>
584
+ </dict>
585
+ <!-- Build Prompt -->
586
+ <dict>
587
+ <key>WFWorkflowActionIdentifier</key>
588
+ <string>is.workflow.actions.gettext</string>
589
+ <key>WFWorkflowActionParameters</key>
590
+ <dict>
591
+ <key>UUID</key>
592
+ <string>FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF</string>
593
+ <key>WFTextActionText</key>
594
+ <dict>
595
+ <key>Value</key>
596
+ <dict>
597
+ <key>attachmentsByRange</key>
598
+ <dict>
599
+ <key>{56, 1}</key>
600
+ <dict>
601
+ <key>OutputName</key>
602
+ <string>Weather Conditions</string>
603
+ <key>OutputUUID</key>
604
+ <string>EEEEEEEE-EEEE-EEEE-EEEE-EEEEEEEEEEEE</string>
605
+ <key>Type</key>
606
+ <string>ActionOutput</string>
607
+ </dict>
608
+ </dict>
609
+ <key>string</key>
610
+ <string>Generate a friendly weather report based on this data:
611
+
612
+
613
+ Keep it brief and include clothing recommendations.</string>
614
+ </dict>
615
+ <key>WFSerializationType</key>
616
+ <string>WFTextTokenString</string>
617
+ </dict>
618
+ </dict>
619
+ </dict>
620
+ <!-- Ask AI -->
621
+ <dict>
622
+ <key>WFWorkflowActionIdentifier</key>
623
+ <string>is.workflow.actions.askllm</string>
624
+ <key>WFWorkflowActionParameters</key>
625
+ <dict>
626
+ <key>UUID</key>
627
+ <string>GGGGGGGG-GGGG-GGGG-GGGG-GGGGGGGGGGGG</string>
628
+ <key>WFLLMModel</key>
629
+ <string>Apple Intelligence</string>
630
+ <key>WFGenerativeResultType</key>
631
+ <string>Text</string>
632
+ <key>WFLLMPrompt</key>
633
+ <dict>
634
+ <key>Value</key>
635
+ <dict>
636
+ <key>attachmentsByRange</key>
637
+ <dict>
638
+ <key>{0, 1}</key>
639
+ <dict>
640
+ <key>OutputName</key>
641
+ <string>Text</string>
642
+ <key>OutputUUID</key>
643
+ <string>FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF</string>
644
+ <key>Type</key>
645
+ <string>ActionOutput</string>
646
+ </dict>
647
+ </dict>
648
+ <key>string</key>
649
+ <string></string>
650
+ </dict>
651
+ <key>WFSerializationType</key>
652
+ <string>WFTextTokenString</string>
653
+ </dict>
654
+ </dict>
655
+ </dict>
656
+ <!-- Show Result -->
657
+ <dict>
658
+ <key>WFWorkflowActionIdentifier</key>
659
+ <string>is.workflow.actions.showresult</string>
660
+ <key>WFWorkflowActionParameters</key>
661
+ <dict>
662
+ <key>Text</key>
663
+ <dict>
664
+ <key>Value</key>
665
+ <dict>
666
+ <key>attachmentsByRange</key>
667
+ <dict>
668
+ <key>{0, 1}</key>
669
+ <dict>
670
+ <key>OutputName</key>
671
+ <string>Response</string>
672
+ <key>OutputUUID</key>
673
+ <string>GGGGGGGG-GGGG-GGGG-GGGG-GGGGGGGGGGGG</string>
674
+ <key>Type</key>
675
+ <string>ActionOutput</string>
676
+ </dict>
677
+ </dict>
678
+ <key>string</key>
679
+ <string></string>
680
+ </dict>
681
+ <key>WFSerializationType</key>
682
+ <string>WFTextTokenString</string>
683
+ </dict>
684
+ </dict>
685
+ </dict>
686
+ </array>
687
+ <key>WFWorkflowClientVersion</key>
688
+ <string>2700.0.4</string>
689
+ <key>WFWorkflowHasOutputFallback</key>
690
+ <false/>
691
+ <key>WFWorkflowIcon</key>
692
+ <dict>
693
+ <key>WFWorkflowIconGlyphNumber</key>
694
+ <integer>59511</integer>
695
+ <key>WFWorkflowIconStartColor</key>
696
+ <integer>4282601983</integer>
697
+ </dict>
698
+ <key>WFWorkflowImportQuestions</key>
699
+ <array/>
700
+ <key>WFWorkflowMinimumClientVersion</key>
701
+ <integer>900</integer>
702
+ <key>WFWorkflowMinimumClientVersionString</key>
703
+ <string>900</string>
704
+ <key>WFWorkflowName</key>
705
+ <string>Weather Report</string>
706
+ <key>WFWorkflowOutputContentItemClasses</key>
707
+ <array/>
708
+ <key>WFWorkflowTypes</key>
709
+ <array/>
710
+ </dict>
711
+ </plist>
712
+ ```
713
+
714
+ ---
715
+
716
+ ## How to Use These Examples
717
+
718
+ 1. **Copy** the XML content
719
+ 2. **Save** to a file with `.shortcut` extension (e.g., `HelloWorld.shortcut`)
720
+ 3. **Sign** using the shortcuts CLI:
721
+ ```bash
722
+ shortcuts sign --mode anyone --input HelloWorld.shortcut --output HelloWorld.shortcut
723
+ ```
724
+ 4. **Import** by double-clicking the signed file or dragging to Shortcuts.app
725
+
726
+ ---
727
+
728
+ ## Dictionary-Based Configuration Pattern
729
+
730
+ A powerful pattern from the bundled golden shortcuts (EverSafari, Create Calendar Event from Template): build a Dictionary with configuration keys/values, then iterate over it with Repeat Each to process each entry.
731
+
732
+ **Pattern:**
733
+ 1. Create a **Dictionary** action with config keys and values
734
+ 2. Pass the dictionary to **Repeat with Each** (iterates over all keys)
735
+ 3. Inside the loop, `Repeat Item` is the current key
736
+ 4. Use a dictionary value access aggrandizement to get the corresponding value
737
+
738
+ This enables data-driven shortcuts where the "logic" is in the dictionary structure, not in hardcoded action chains. Useful for shortcuts that need to process multiple similar items (e.g., multiple API endpoints, multiple configuration options, multiple file paths).