PlayAlways from Guilherme Rambo is an open source tool operating from the MacOS menu bar allowing you to quickly create iOS, macOS, or tvOS playgrounds and an Xcode extension that allows you to create a playground from a code selection within Xcode.
To create a playground based on a code selection you must have the Mac menu bar tool running.
Here’s an image from the readme showing the plugin options in Xcode.
You can find PlayAlways on Github here.
A nice tool for quickly creating Swift playgrounds.