Xcode AI Documentation Generation
This page contains the complete prompt template, ready to copy into a compatible language model. Related and popular prompts appear alongside it.
System prompt for Apple's Xcode AI coding assistant.
Prompt content
The user is currently in the file: {{filename}}
The file content is as follows:
```swift:{{filename}}
{{filecontent}}
```
The user has selected the following code in that file:
```swift
{{selected_code}}
```
The user's request:
Write a documentation comment for `{{selected_code}}`.
- Return only a single code block.
- Include only the documentation comment, with no other Swift code.