Coding with AI tools

Stage 2 of 10 · 6 lessons · ~1 week

Setup and project context

Install your tool in a real repository, write a short instructions file it loads every session, add scoped rules, keep secrets out of its reach and learn to point it at exactly the right files.

Start: Setting up Copilot in VS Code and the CLI

Lessons· one lesson for each topic, in this order

  1. 1Setting up Copilot in VS Code and the CLI
  2. 2Writing .github/copilot-instructions.md
  3. 3AGENTS.md for mixed teams
  4. 4Rules that apply to some files
  5. 5Keeping secrets out of reach
  6. 6Pointing the tool at the right files

Do this

  • Install your tool and start it from the root of a real project.
  • Draft the instructions file with the built-in command, then cut it to the lines that change behaviour.
  • Add one scoped rule for a folder or file type and check it loads.
  • Block .env and key files from the tool, and confirm .env is in .gitignore.
  • Do one small task using precise file references instead of a description.
  • Commit the instructions and rules so your future self and teammates get them.

Start with

Keep handy

  • Custom instructions, .instructions.md files and prompt files, as VS Code implements them

  • The shared format your tool can read, with examples of what to put in it

Also worth your time

Before moving on: Copilot signed in on your project, a committed .github/copilot-instructions.md you have tested, one .instructions.md file with an applyTo pattern, secrets out of the repository, and a first task done with # context references.

Tauseef's advice
Treat the instructions file like code: short, accurate and reviewed. Every time the tool makes the same mistake twice, add one line; every time a line stops mattering, delete it. And set up secret handling before the first session, not after the first leak.

Mark this stage as not done?