swift-agents
Copilot instructions38 starsChanged 9 months agoMITView on GitHub
Before proceeding with any task involving Swift code, SwiftUI views, UIKit views, async/await, actors, Sendable, @MainActor, Foundation Models, MLX, Core ML, coremltools, model conversion, MLXLLM, MLXVLM, MLXLMCommon, LLMModelFactory, ChatSession, GenerateParameters, LoRA, Hugging Face models, Keychain, CryptoKit, biometric auth, App Store submission, testing, SwiftData, @Model, ModelContainer, @Query, persistence, schema migration, visionOS, RealityKit, ARKit, immersive spaces, spatial computing, StoreKit, in-app purchases, subscriptions, Product, Transaction, performance profiling, Instruments, MetricKit, hang detection, launch time, memory optimization, Meta Wearables DAT, or any iOS/macOS/visionOS application code:
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
15 rules. About 0 are common, 13 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Do NOT write SwiftUI code without mobile-a11y-specialist review
- Distinctive: line 8
Do NOT write concurrent code without concurrency-specialist review
- Distinctive: line 9
Do NOT handle credentials or encryption without swift-security-specialist review
- Distinctive: line 10
Do NOT submit to App Store without app-review-guardian review
- Distinctive: line 11
Do NOT convert or optimize ML models without coreml-specialist review
- Distinctive: line 12
Do NOT use MLX Swift, MLXLLM, or MLXVLM without mlx-specialist review
- Distinctive: line 13
Do NOT write SwiftData models or queries without swiftdata-specialist review
- Distinctive: line 14
Do NOT build visionOS or RealityKit features without visionos-specialist review
- Distinctive: line 15
Do NOT implement in-app purchases without storekit-specialist review
- Distinctive: line 16
Do NOT optimize performance without performance-specialist review
- Distinctive: line 21
NEVER create mock, placeholder, or stub implementations.
- Distinctive: line 22
Use built-in SwiftUI features instead of building custom replacements.
- Very specific: line 26
Use .searchable, .refreshable, PhotosPicker, ShareLink, SubscriptionStoreView, .confirmationDialog.
- Very specific: line 27
Use Swift compiler synthesis (Codable, Equatable, Hashable) instead of manual implementations.
- Distinctive: line 29
If the task does not involve any Swift or Apple platform code, proceed normally.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Swift Agents — Copilot Instructions
Before proceeding with any task involving Swift code, SwiftUI views, UIKit views, async/await, actors, Sendable, @MainActor, Foundation Models, MLX, Core ML, coremltools, model conversion, MLXLLM, MLXVLM, MLXLMCommon, LLMModelFactory, ChatSession, GenerateParameters, LoRA, Hugging Face models, Keychain, CryptoKit, biometric auth, App Store submission, testing, SwiftData, @Model, ModelContainer, @Query, persistence, schema migration, visionOS, RealityKit, ARKit, immersive spaces, spatial computing, StoreKit, in-app purchases, subscriptions, Product, Transaction, performance profiling, Instruments, MetricKit, hang detection, launch time, memory optimization, Meta Wearables DAT, or any iOS/macOS/visionOS application code:
- Switch to the swift-lead agent
- The swift-lead will determine which specialist agents are needed
- Do NOT write SwiftUI code without mobile-a11y-specialist review
- Do NOT write concurrent code without concurrency-specialist review
- Do NOT handle credentials or encryption without swift-security-specialist review
- Do NOT submit to App Store without app-review-guardian review
- Do NOT convert or optimize ML models without coreml-specialist review
- Do NOT use MLX Swift, MLXLLM, or MLXVLM without mlx-specialist review
- Do NOT write SwiftData models or queries without swiftdata-specialist review
- Do NOT build visionOS or RealityKit features without visionos-specialist review
- Do NOT implement in-app purchases without storekit-specialist review
- Do NOT optimize performance without performance-specialist review
Critical Rules
- For NEW projects or features: Enter plan mode FIRST. Design architecture before writing code.
- NEVER create mock, placeholder, or stub implementations. All code must be real and functional.
- Use built-in SwiftUI features instead of building custom replacements.
- Settings screens MUST use
Form { Section { Toggle/Picker/Stepper } }. Not custom VStacks. - macOS preferences MUST use the
Settings { }scene. Not a custom window. - Persistence MUST use
@AppStoragefor UserDefaults. Not manualUserDefaults.standardcalls. - Use
.searchable,.refreshable,PhotosPicker,ShareLink,SubscriptionStoreView,.confirmationDialog. - Use Swift compiler synthesis (
Codable,Equatable,Hashable) instead of manual implementations.
If the task does not involve any Swift or Apple platform code, proceed normally.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

