Interactive Challenge

Copilot Bingo

Try each technique during the workshop. Click to mark them off. Get a line of five — horizontal, vertical, or diagonal — to win!

B
I
N
G
O
Use /explain on unfamiliar code
Ask Copilot to write a unit test
Create a Mermaid diagram
Use @workspace for project Q&A
Try agent mode on a multi-file task
Apply the 4S framework to a prompt
Use #file to focus on a specific file
Write a .github/copilot-instructions.md
Ask Copilot to rate its own response
Use /fix on a real bug
Use Ctrl+I for inline chat
Ask "who would I ask about this?"
FREE SPACE
Create a .github/prompts/ file
Use selective amnesia in a fresh chat
Connect an MCP server
Use /doc to document a function
Ask for references to support a claim
Run a Playwright test an agent wrote
Use #codebase for broad search
Create a custom skill (SKILL.md)
Use the Code Quality Loop
Write a Source Pack for a task
Label output EXTRACTED vs INFERRED
Assign a GitHub issue to Copilot
1 / 25 completed
🎉 BINGO! You've completed a line! Keep going for a full blackout!

How to play: Click a square when you've tried that technique during the workshop. The free space is already marked. Get five in a row (horizontal, vertical, or diagonal) to call Bingo. For the ultimate challenge, try to fill the whole card.

← Back to AI-SDLC main site
Cheat Sheet 1 of 7

The 4S Framework

Single, Specific, Short, Surround — the foundation for every good Copilot prompt.

01 Single

One well-defined task per prompt. Decompose complex requests into atomic tasks.

Bad

"Add OAuth, write tests, update README"

Good

"Add OAuth2 login using passport for Express"

02 Specific

Name exact libraries, versions, and patterns. Explicit constraints drive precision.

Bad

"Connect to the database"

Good

"Create a PostgreSQL 16 pool via pg-pool, SSL on"

03 Short

Bullet points over paragraphs. Concise input = focused output. Protect the context window.

Bad

"I need a function that filters users by age, sorts by name, limits..."

Good

"Filter users: age > 25, sort name, limit 10"

04 Surround

Copilot reads your active file + open tabs. Open relevant files, close irrelevant ones.

Bad

Only target file open — Copilot guesses types

Good

types.ts + config.ts + target.ts all open

Five Patterns to Know

PatternDescription
Zero-shotNo examples — rely on the model's training data
One-shotOne example to guide output format and style
Few-shotMultiple examples for maximum precision
Role promptAssign an expert persona: "Act as a Senior Security Engineer"
Chain of thoughtAsk for step-by-step reasoning before the answer

Quick Wins

Context Tips

  • Open relevant files, close irrelevant ones
  • Use #file, #selection to focus Copilot
  • Start new threads for new tasks
  • Delete unhelpful messages from history
  • Write unit tests first as examples

Workflow Tips

  • Use Ctrl+I for inline chat while coding
  • Use /explain before modifying unfamiliar code
  • Write comment-first — Copilot reads them
  • Use meaningful function/variable names
  • Use /compact to trim noisy context

Safety Reminders

  • Never paste credentials or secrets
  • Always review AI output before merging
  • Run tests on generated code
  • Check for security vulnerabilities
  • Enable duplicate-code detection policy
Cheat Sheet 2 of 7

Slash Commands & Chat Syntax

Every command, participant, and context variable at your fingertips.

CommandDescription
/explainExplain how selected code works
/fixGet suggested fixes for problems in code
/testsGenerate unit tests for the current code
/docAdd documentation comments to code
/newScaffold a new project or file
/clearWipe chat context and start fresh
/helpShow available commands and tips
/compactTrim noisy context from the conversation
/runExecute terminal commands directly
ParticipantContext Provided
@workspaceFull project context — files, structure, dependencies
@vscodeVS Code commands, settings, and features
@terminalTerminal shell context, recent output
@githubSearch repos, query GHAS alerts, PR context
VariableWhat It Includes
#fileInclude a specific file's content
#selectionCurrently selected text in editor
#blockCurrent code block around cursor
#functionCurrent function or method
#codebaseBroad codebase search across project
#gitGit history and recent changes
#editorVisible editor content
#fetchRemote URL or repo content
@workspace /fix #selection        — Fix selected code with full project context
@terminal  How can I test these changes?
/doc       #function                — Document the current function
/tests     #file                    — Generate tests for a specific file

Tip: Type / or # or @ to see all available options. Ctrl+Enter auto-inserts @workspace. Slash commands are clearer than natural language for intent.

FlagPurpose
--yes / -ySkip confirmation prompts for automation
--json <fields>Machine-readable JSON output
--jq <expr>Filter JSON output with jq syntax
gh variable setSet non-sensitive configuration variables
gh attestation verifySupply chain verification of artifacts
Cheat Sheet 3 of 7

Keyboard Shortcuts

Muscle memory for speed. Organised by IDE.

Chat

Ctrl+Alt+IOpen Chat view
Ctrl+IInline Chat (in editor)
Ctrl+NNew chat session
Ctrl+LClear chat
Ctrl+Shift+IToggle Copilot panel

Inline Suggestions

TabAccept suggestion
EscDismiss suggestion
Alt+]Next suggestion
Alt+[Previous suggestion
Ctrl+Accept word-by-word
Ctrl+EnterOpen completions panel

JetBrains

  • Tab — Accept suggestion
  • Esc — Dismiss
  • Alt+\ — Trigger manually
  • Chat in sidebar panel
  • Agent mode GA (Mar 2026)

Visual Studio

  • Tab — Accept suggestion
  • Esc — Dismiss
  • Alt+. — Next suggestion
  • Alt+, — Previous suggestion
  • Agent mode GA in 17.14+

Vim / Neovim

  • Tab — Accept suggestion
  • Ctrl+] — Dismiss
  • Alt+] — Next suggestion
  • Rebindable via :map commands

Agent Mode

  • Ctrl+Shift+P — Command Palette
  • Select "Agent" in Chat panel dropdown
  • Use checkpoints to rewind changes
  • Review file diffs before accepting

Quick Actions

  • Click lightbulb for Copilot Code Actions
  • Right-click → Copilot context menu
  • Sparkle icon → Explain with Copilot
  • Switch models via dropdown or /model

Next Edit Suggestions predicts your next likely edit location and jumps you there. Press Tab to accept and continue the flow. Available in VS Code and Visual Studio. Think of it as Copilot anticipating where you need to go next, not just what to type.

Cheat Sheet 4 of 7

The .github Folder

The brain of your repo. Stores configs for automation, project management, and how Copilot behaves in your codebase.

.github folder anatomy
.github/
├── copilot-instructions.md   ← Global AI rules for the whole repo
├── prompts/                   ← Reusable prompt files (.prompt.md)
│   ├── refactor-to-ts.prompt.md
│   └── add-tests.prompt.md
├── skills/                    ← Operational AI workflows (DevOps, SRE)
│   └── deploy-checker/
│       └── SKILL.md
├── workflows/                 ← CI/CD pipelines (.yml)
│   ├── ci.yml
│   └── deploy.yml
├── ISSUE_TEMPLATE/            ← Structured issue forms
├── PULL_REQUEST_TEMPLATE.md   ← PR checklist template
└── agents/                    ← Specialised autonomous AI entities
TypePurposeWhen It RunsUse Case
InstructionsStandardise AI behaviourAlways active (passive)Naming conventions, coding style
PromptsReusable AI scriptsOn demand (invoked)Specific refactoring tasks
SkillsOperational AI workflowsOn demand (complex)DevOps, infrastructure management
WorkflowsCI/CD automationOn events (push, PR)Testing, building, deploying
AgentsAutonomous task executionAssigned or triggeredComplex problem-solving
TemplatesStandardise contributionsOn create (issue/PR)Consistent issue/PR structure

Start here: The single most impactful file is .github/copilot-instructions.md. It influences every Copilot suggestion without running anything. Add your coding standards, architecture constraints, and naming conventions. See the AI-SDLC site for a starter template.

Cheat Sheet 5 of 7

Agent Mode & MCP

Autonomous AI pair programming and the Model Context Protocol.

What is Agent Mode?

  • Autonomous AI pair programmer
  • Plans, implements, and verifies changes
  • Multi-file edits across your codebase
  • Runs terminal commands automatically
  • Self-heals — detects and fixes errors
  • Iterates based on feedback and results

What is MCP?

  • Model Context Protocol — open standard
  • Connects AI models to external tools/data
  • Standardized interface for integrations
  • Works across VS Code, JetBrains, CLI, GitHub
  • Built-in: GitHub, Playwright
  • Community: Postgres, Sentry, Redis, Supabase...
.vscode/mcp.json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["@github/mcp"],
      "type": "stdio"
    },
    "postgres": {
      "command": "npx",
      "args": [
        "@modelcontextprotocol/server-postgres",
        "${input:pg_url}"
      ],
      "type": "stdio"
    },
    "sentry": {
      "command": "npx",
      "args": ["@sentry/mcp"],
      "type": "stdio"
    }
  }
}
🔍
Understand
📋
Plan
Execute
Verify
🔄
Iterate
SurfaceAgent ModeMCPStatus
VS CodeGA
JetBrainsGA
Visual StudioGA (17.14+)
XcodePreview
CLIGA
GitHub.comCoding AgentBuilt-inGA

Best practices: Use OAuth over PATs for MCP connections. Limit server permissions (least privilege). Audit connected servers regularly. Push protection blocks secret leaks.

Cheat Sheet 6 of 7

GitHub Actions

Expression syntax, triggers, secrets, and workflow templates.

ExpressionPurpose
${{ secrets.NAME }}Repo or environment secrets
${{ env.VAR }}Workflow-level env vars
${{ vars.CONFIG }}Repository config variables
${{ github.event_name }}Trigger context
TriggerWhen
push:On push to branches/tags
pull_request:PR events (open, sync)
workflow_dispatch:Manual trigger
schedule:Cron-based scheduling
release:On published release
workflow_call:Reusable workflow invocation
ci.yml
on: [push, pull_request]
permissions:
  contents: read
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
    - uses: actions/checkout@v4
    - run: npm ci
    - run: npm test
contains()String/array match
startsWith()Prefix check
format()String interpolation
toJSON()Debug context objects
hashFiles()Cache key generation
success() failure()Status checks
  • Never echo secrets in logs
  • Pin actions to commit SHA, not tag
  • Use permissions: to restrict GITHUB_TOKEN
  • Enable Dependabot for action updates
  • Rotate secrets on a schedule
  • Env secrets override repo secrets of same name
Cheat Sheet 7 of 7

Markdown Reference

GitHub Flavored Markdown essentials, from basics to Mermaid diagrams.

# ## ###Headings (H1, H2, H3)
**bold** *italic*Text emphasis
[text](url)Hyperlink
![alt](img.png)Image
`code`Inline code
```lang```Fenced code block
- itemUnordered list
1. itemOrdered list
> quoteBlockquote
---Horizontal rule
- [x] / - [ ]Task lists (checkboxes)
| H1 | H2 |Tables with pipe syntax
#123Auto-links to issues
@usernameMentions
:emoji:Emoji shortcodes
~~strike~~Strikethrough
```mermaidMermaid diagrams
$e=mc^2$LaTeX math (inline)
> [!NOTE]       — Informational callout
> [!TIP]        — Helpful suggestion
> [!IMPORTANT]  — Key information
> [!WARNING]    — Potential issue
> [!CAUTION]    — Dangerous action

Common Issues

  • Line breaks need 2 trailing spaces or <br>
  • Blank line needed before lists and code blocks
  • Escape special chars with backslash: \* \# \_
  • Nested lists: indent 2-4 spaces consistently
  • Images not loading? Check relative path from .md file

Tips & Tricks

  • <details> for collapsible sections
  • [Go](#section-name) for anchor links
  • text[^1] + [^1]: note for footnotes
  • ```diff for red/green change highlighting
  • gh markdown-toc for auto-generated TOC