Skip to content
GitHub Copilot Train-the-Trainer
Overview

Session M1-03: Prompt engineering fundamentals

Module: Copilot Fundamentals

Difficulty: Beginner

Prerequisites: Sessions M1-01 to M1-02

Duration: 3 hours (1 hour trainer content, 2 hours lab)

Overview

Build one todo API by improving prompts as the project grows. Use intent, context, constraints, and examples to implement a store and two Express routes. Then add priority filtering and note how context changed the suggestion.

A good prompt is only the start. The result still has to pass the tests and API checks.

Learning outcomes

  • Write prompts that state the task, context, boundaries, and examples.
  • Refine a useful result without mixing unrelated concerns.
  • Use CLI /refine (check /help in your version) and check that its rewrite keeps your intent.
  • Use comments and neighboring files as context.
  • Recognize vague, overloaded, and untrusted instructions.
  • Turn a successful prompt into a reusable pattern.

You need

GitHub Copilot Chat, inline suggestions, the standalone CLI with /refine, Node.js 22 or later, and the declared npm dependency. Install the CLI before the session. M2-01 is not a prerequisite.

Materials

Resource Location
Trainer guide trainer-content/
Slides slides.md
Lab lab/
Starter project lab/starter/api-starter/
Reference result lab/solution/api-complete/