Xcode Coding Intelligence — Explain Action

Chat Prompt ✦ Curated & attributed Intro

The shortest of Xcode's code-action templates. It supplies the current filename, full file contents, and selected Swift code, then issues the bare instruction 'Explain this to me.' with no output-format constraints.

What makes this prompt notable

  • Minimal prompt: provides full file plus selection context but adds no formatting or length constraints, leaving explanation style open
  • Reuses the same {{filename}}/{{filecontent}}/{{selected}} context-injection scaffold shared across all Xcode actions
40 words · 245 chars
The user is curently inside this file: {{filename}}
The contents are below:
```swift:{{filename}}
{{filecontent}}
```

The user has selected the following code from that file:
```swift
{{selected}}
```

The user has asked:

Explain this to me.

Discussion (0)

Sign in to join the discussion.
Related

More in IDE & Coding Assistants

VSCode Agent
agent prompt

VSCode Agent (GitHub Copilot) — GPT-5 Agent Prompt

The most elaborate Copilot VS Code agent prompt, for GPT-5. It combines the Copilot identity and refusals with a detailed communication-style guide, m…

role definition tool-use protocol structured diff format specification
239 5.6k 3.7k words
KI
Kiro
system prompt

Kiro — Intent Mode Classifier

A lightweight intent-classification prompt that routes a user message into chat/do/spec modes and returns a JSON object of confidence scores summing t…

classification rubric constraint setting few-shot
226 5.3k 600 words
CU
Cursor
agent prompt

Cursor — Agent Prompt v1.0 (Claude Sonnet 4)

An earlier, leaner Cursor agent prompt (Claude Sonnet 4) focused on tool-calling rules, aggressive parallel tool execution, search-and-reading bias to…

role definition tool-use protocol parallel tool-call maximization
225 7.3k 1.5k words