Stay in touch with the
Latest iOS dev beans

Get exclusive content, articles and tips submitted by the dev community delivered directly to your inbox. Swift, iOS, macOS, watchOS, SwiftUI, UIKit and more.
Curated by Tiago Henriques and published every two weeks.

No spam, ever. Unsubscribe at any time.
By subscribing you consent to processing of your data
as described in the privacy policy.

Issue #72

A Recipe to Custom Instructions for GitHub Copilot

AI Agentic Coding
GitHub Copilot
May 25, 2026
Sponsored

The #1 Padel Score Tracker Companion

With seamless point counting on your Apple Watch, Padel Time ensures precision and eliminates disputes, leaving you to focus on the game. You just need to raise your arm and click on the winning team on each point, nothing else.

This message is brought to you by a sponsor who helps keep this content free for everyone. If you have a moment, check them out. Your support means a lot!

Welcome to issue #72 of the iOS Coffee Break Newsletter ๐Ÿ“ฌ.

In the last edition of the newsletter, I shared how GitHub Copilot started to earn a place in my iOS daily workflow.

But the more I used it, the more I noticed the same pattern: good results depended heavily on the context I gave it. If I forgot to mention a rule, a convention, or just how I like to work, I often had to repeat myself.

That is what led our team to custom instructions. They are a simple way to give Copilot more stable guidance from the start, so you spend less time correcting and more time refining.

In this edition, I want to show you where to configure them and why they can make your workflow feel much more consistent.

Thank you Sofia for putting together those helpful cheat sheet guides. They have been really useful ๐Ÿ™.

What are custom instructions?

Custom instructions are a text file (or IDE setting) that Copilot reads automatically on every conversation. You write your project conventions, coding standards and guardrails once, and Copilot applies them without you having to repeat yourself in every prompt.

Where to configure?

  • Repository (shared with team): .github/copilot-instructions.md in the repository root
  • Personal (your IDE only): Settings > Copilot > Custom Instructions. If you are using an IDE other than VS Code, check its documentation to see how custom instructions are configured. The overall process is usually similar.

Recommended approach: Use .github/copilot-instructions.md for shared team conventions. Use personal settings for your own preferences (tone, verbosity, etc.).

Repository file (shared)

Create the instructions file.

$ mkdir -p .github
$ touch .github/copilot-instructions.md

Write your instructions.

## Project
- Main language: Swift
- Framework: iOS SDK, SwiftUI
- Minimum test coverage: 70% (unit tests)

## Conventions
- All comments in English
- Function names in camelCase, class names in PascalCase
- Do not use deprecated iOS APIs
- Prefer async/await over completion handlers for asynchronous code

## What NOT to do
- Do not add dependencies without justification in the PR description
- Do not use libraries without checking the licence (ask if unsure)
- Do not generate mock data with real-looking personal information

Commit and push.

$ git add .github/copilot-instructions.md
$ git commit -m "Add Copilot custom instructions"
$ git push

โœ… Everyone using Copilot in this repository will get these instructions automatically.

Personal settings (VS Code)

  1. Open Settings
  2. Search for "copilot instructions"
  3. Click "Edit in settings.json"
  4. Add your personal preferences:
{
  "github.copilot.chat.codeGeneration.instructions": [
    {
      "text": "Always add a brief comment explaining the purpose of new functions. When generating iOS code with TCA, structure features with State, Action, and Reducer, use DependencyValues for dependencies, and keep business logic out of SwiftUI views."
    }
  ]
}

๐Ÿค Wrapping Up

What I like most about custom instructions is that they make the whole experience feel a bit more natural.

Instead of starting from zero every time, you are giving Copilot a better understanding of how you work and what matters to you. That small change can save time, reduce friction, and make the collaboration feel much more consistent.

If you are already using GitHub Copilot regularly, this is definitely a feature worth exploring.

Have a great week ahead ๐ŸคŽ

tiagohenriques avatar

Thank you for reading this issue!

I truly appreciate your support. If you have been enjoying the content and want to stay in touch, feel free to connect with me on your favorite social platform: