- Published on
- 5 min read
> How to Export and Use Xcode 27's Agent Skills in Claude Code
One of the quieter announcements from WWDC 2026 turned out to be one of the more useful ones for anyone doing agentic development. Xcode 27 ships with a set of official agent skills, the same instructions that power its built-in coding assistant, and Apple added a way to export them. That means you can pull Apple's own guidance on SwiftUI, test migration, and security straight into Claude Code, Codex, or Cursor and have your agent follow it.
If you've already wired up Xcode's MCP server, this slots in alongside it nicely. The MCP server gives an external agent access to Xcode's tools. The exported skills give it Apple's playbook for how to write the code in the first place.
What Agent Skills Actually Are
A skill follows Anthropic's Agent Skills format, which is just a folder convention. Each skill is a directory containing a SKILL.md file with a small bit of YAML front matter, a name and a description, followed by markdown instructions. Some skills also bundle helper scripts or reference files. The agent reads only the descriptions up front, decides when a skill is relevant to what you're doing, and loads the full instructions on demand. It's a cheap way to give an agent deep, specialized knowledge without stuffing everything into a system prompt.
Apple wrote a handful of these to encode how it actually wants you to build for its platforms. Until Xcode 27 they were locked inside the editor. Now they're a command away.
The Skills That Ship with Xcode 27
There are seven of them. Most are knowledge focused, a couple lean on Xcode's own tooling:
swiftui-specialist: Apple's authoritative take on idiomatic SwiftUI structure, data flow, environment, modifiers, and animation.swiftui-whats-new-27: the new SwiftUI APIs and deprecations across the 2027 OS releases, with migration notes.test-modernizer: migrates XCTest suites over to Swift Testing.uikit-app-modernization: replaces legacy UIKit APIs so apps behave correctly in multi-window and multi-scene setups.c-bounds-safety: guides adoption and debugging of C's-fbounds-safetybounds-safety extensions.device-interaction: verifies behavior through simulator screenshots, view hierarchy inspection, and simulated touch.audit-xcode-security-settings: audits and hardens an Xcode project's security build settings.
Exporting the Skills
The export lives behind a new agent subcommand you reach through xcrun. There's nothing to install beyond Xcode 27 itself.
Open Terminal.
Run the export, pointing it at a directory your agents read:
Bashxcrun agent skills export ~/.agents/skillsYou'll see a short confirmation listing what landed:
JavaScriptExported 7 skills to /Users/you/.agents/skills ✓ uikit-app-modernization ✓ device-interaction ✓ swiftui-whats-new-27 ✓ swiftui-specialist ✓ test-modernizer ✓ c-bounds-safety ✓ audit-xcode-security-settings
The ~/.agents/skills path is a shared location that several agent tools look in, so it's a reasonable default if you bounce between editors. If you only care about Claude Code, you can skip the shared folder and drop the skills straight into its personal skills directory instead:
xcrun agent skills export ~/.claude/skills
Each skill becomes its own subfolder with a SKILL.md inside, exactly the layout Claude Code expects for personal skills.
Using Them in Claude Code
Claude Code discovers skills at startup, so after exporting you'll want to restart it or run /clear in an active session to pick up the new folders. Once it reloads, the imported skills are available the same way any other skill is. Claude reads the descriptions and pulls in the full instructions when your request matches, so asking it to "modernize these XCTest cases" will surface test-modernizer without you naming it.
You can sanity check that they loaded by asking Claude what skills it has access to, or by listing the directory you exported into. If nothing shows up, a full relaunch usually sorts it out.
Which Skills Travel Well
Not every skill is equally portable, and it's worth being clear about why. The knowledge-driven ones only read and edit your source files, so swiftui-specialist, swiftui-whats-new-27, test-modernizer, uikit-app-modernization, and c-bounds-safety all work anywhere your agent can open a project. Those are the ones I'd reach for first outside of Xcode.
The other two depend on capabilities that live inside Xcode. device-interaction drives the simulator to take screenshots and inspect the view hierarchy, and audit-xcode-security-settings needs to read project build settings. Run them in a bare terminal agent and they won't have the tools they assume are there. You can recover part of that gap by giving your agent access to Xcode through its MCP server, which exposes build and simulator tools over the same protocol. Pairing the exported skills with that connection gets you closest to the in-Xcode experience.
Keeping Them Current
Apple revises these skills as the SDKs change, especially the ones tied to a specific release like swiftui-whats-new-27. The export is a snapshot, not a live link, so the copies sitting in ~/.agents/skills won't update on their own. After you install an Xcode update it's worth re-running the same export command to overwrite them with the latest versions. It's quick, and it keeps your agent working from current guidance rather than whatever shipped months ago.
That's the whole loop. Export once, point it at the directory your agent reads, restart, and you've got Apple's own engineering guidance riding along in whatever tool you already prefer. For more on connecting these tools to your project, the Xcode MCP server walkthrough is a good next step.
// Continue_Learning
Auto-Approve the Xcode MCP Connection Prompt with Claude Code Hooks
The Xcode MCP server connection prompt interrupts your flow every time you restart Claude Code or clear your session. Here's how to automate it away using hooks.
Previewing Partially Generated Content with Foundation Models in SwiftUI
When building UIs that stream AI-generated content using Apple's Foundation Models framework, testing intermediate states in Xcode Previews requires some creative workarounds. Here's how to preview partially generated content without calling the actual model.
Prevent Your Mac from Sleeping While Claude Code Works
Set up Claude Code to automatically keep your Mac awake during long tasks and let it sleep again when finished, using hooks and the caffeinate command.
// Stay Updated
Get notified when I publish new tutorials on Swift, SwiftUI, and iOS development. No spam, unsubscribe anytime.