Xcode AI Playground

Tool Prompts

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}}
```

The user's request:

Give a short example of how to use `{{selected}}`.

- Return only a single code block.
- Do not use comments.
- Do not use print statements.
- Do not import any additional modules.