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…
A single-purpose task prompt that instructs the Xcode coding assistant to generate only the code for a SwiftUI #Preview macro for a user-selected View, with no explanation. It supplies the #Preview initializer signature, an example, and a detailed rule table mapping specific SwiftUI modifiers to required wrappers (NavigationStack, List).
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:
Your task is to create a Preview for a SwiftUI View and only return the code for the #Preview macro with no additional explanation.
The initializer for a #Preview is the following:
```
init(_ name: String? = nil, body: @escaping @MainActor () -> any View)
```
An example of one is:
```swift
#Preview {
Text(\"Hello World!\")
}
```
Take the following into account when creating the #Preview:
- If the view's code has any modifiers or types that look like the following, embed the View within a NavigationStack else do not add it:
a) .navigation.*
b) NavigationLink
c) .toolbar.*
d) .customizationBehavior
e) .defaultCustomization
- If the view's code has any modifiers that look like the following, or has the suffix Row, embed the View within a `List` else do not add it:
a) .listItemTint
b) .listItemPlatterColor
c) .listRowBackground
d) .listRowInsets
e) .listRowPlatterColor
f) .listRowSeparatorTint
g) .listRowSpacing
h) .listSectionSeparatorTint
i) .listSectionSpacing
j) .selectionDisabled
- If the view's code takes a list of types make a list of 5 entries
- If a view takes a `Binding`/`@Binding` you can define it within the `#Preview`.
- Do not add @availability unless required. Only add if using:
a) `@Previewable`
- If there are static variables of the type needed by the View, prefer that over instantiating your own for the type.
- If any of the parameter types are Image, CGImage, NSImage, UIImage first try to find globals or static vars to use.
The View to create the #Preview for is:
`{{selected}}`
Return the #Preview and no additional explanation. ALWAYS wrap the preview in triple-tick markdown code snippet marks.
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…
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…
An earlier, leaner Cursor agent prompt (Claude Sonnet 4) focused on tool-calling rules, aggressive parallel tool execution, search-and-reading bias to…
Discussion (0)