List a shortcut's external dependencies

I quite often find myself needing to check on a shortcut’s external dependencies such as calls to other shortcuts or use of actions from 3rd party apps.

This is particularly the case when sharing or transferring shortcuts where these dependencies may not exist on the target device.

To help with this I’ve put together a shortcut that will analyse a selected set of shortcuts for these dependencies (or your whole library if you prefer, although this can take a while) and output these in a user friendly format (including simplifying the app identifiers for a number of well known apps).

I thought I’d share this here in case others find it useful.

The shortcut works by taking the XML representation of a shortcut and loading it into a dictionary for further processing. I’d like to credit @RosemaryOrchard for inspiring this approach by mentioning on a recent Automators episode that dictionaries could accept certain XML data (I’d previously only thought to use them for handling JSON).

Also worth noting that the shortcut assembles the dependency information in Markdown format, which could be used for further processing by amending the final steps.