How to export Xcode agent skills with xcrun

⋅ 1 min read ⋅ Xcode SwiftUI

Table of Contents

Xcode 27 includes agent skills that help coding agents follow SwiftUI best practices and adopt new APIs.

You can export these skills and use them outside Xcode with a single command:

xcrun agent skills export

Apple demonstrates this in What's new in SwiftUI at WWDC26. The export produces Markdown files that you can bring into your own coding workflow.

Export skills to a specific folder

To choose where the exported skills go, use the --output-dir option:

xcrun agent skills export --output-dir ~/Downloads/xcode-skills

This writes the skill subdirectories into xcode-skills in your Downloads folder. Open that folder to inspect the exported instructions before adding them to your agent.

Exported Xcode agent skill folders in Finder, including swiftui-specialist, swiftui-whats-new-27, and uikit-app-modernization.
Agent skill folders exported from Xcode.

If you export again and want to overwrite existing skill directories, add --replace-existing:

xcrun agent skills export \
--output-dir ~/Downloads/xcode-skills \
--replace-existing

You can check the options available in your installed Xcode with:

xcrun agent skills export --help

You can easily support sarunw.com by checking out this sponsor.

Sponsor sarunw.com and reach thousands of iOS developers.

If xcrun cannot find the agent command

Check which Xcode your command line tools are using:

xcode-select -p

If you have multiple versions installed, make sure the selected developer directory belongs to Xcode 27. You can change this in Xcode > Settings > Locations > Command Line Tools.

You can also choose an Xcode installation for just one command with DEVELOPER_DIR:

DEVELOPER_DIR="/Applications/Xcode-beta.app/Contents/Developer" \
xcrun agent skills export --output-dir ~/Downloads/xcode-skills

Replace Xcode-beta.app with the name of your Xcode 27 installation.


Read more article about Xcode, SwiftUI, or see all available topic

Enjoy the read?

If you enjoy this article, you can subscribe to the weekly newsletter.
Every Friday, you'll get a quick recap of all articles and tips posted on this site. No strings attached. Unsubscribe anytime.

Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.

If you enjoy my writing, please check out my Patreon https://www.patreon.com/sarunw and become my supporter. Sharing the article is also greatly appreciated.

Become a patron Buy me a coffee Tweet Share
Previous
Adapting your app for iPhone Duo

The essentials of adapting your app with size classes, layout margins, and safe area insets.

← Home