Skip to content

💡 Tips & Tricks — Battle-Tested Lessons

These aren't textbook tips copied from documentation. Every single one comes from real sessions, real mistakes, and real "aha!" moments while learning Copilot CLI from scratch — as a non-developer. If something is listed here, it's because we hit it, fixed it, and thought "someone else needs to know this."


🏆 The Golden Rules

These five rules emerged from weeks of daily use. Follow them and you'll avoid 90% of the frustrations we encountered.

# Rule Why It Matters
1 Save important stuff to instructions Conversations disappear when you close the terminal. Instructions survive forever. If Copilot figured out something about your setup — save it.
2 Question AI answers It makes assumptions and gets them wrong. Once it said "open VS Code" when we exclusively use Windows Terminal. It confidently said a command existed that didn't. Always verify.
3 Use two terminal panels Learn in one panel, practice in another. Side-by-side lets you follow instructions while executing commands without losing your place.
4 Ask in plain English You don't need to know commands or syntax. Say "show me what's in my Azure subscription" and Copilot translates it into the right CLI commands.
5 Start with Opus 4.6 Best reasoning ability at the standard price (1× multiplier). Use /model at the start of every session to select it. The difference in quality is noticeable.

Rule #2 in Action

In one session, Copilot confidently told us to use az staticwebapp create --tenant ... — but --tenant isn't a valid flag for that command. We only caught it because the command failed. Always read error messages — they're often more honest than the AI.


💬 How to Talk to Copilot (Prompt Tips)

Vague vs Specific — The Difference Is Everything

❌ Vague Prompt ✅ Specific Prompt
"Make it look better" "Change the heading colour to cyan and add 20px spacing between sections"
"Fix it" "Fix the navigation links in mkdocs.yml — the About page returns 404"
"Help me with Azure" "List all resource groups in my lab subscription"
"Something's wrong" "The MkDocs build shows a warning about theme.palette — what does it mean?"
"Set up my site" "Create an mkdocs.yml with Material theme, dark mode, and a nav with Home and About pages"

But Also: Don't Overthink It

Here's the secret — you can start vague and Copilot will ask clarifying questions. You don't need to craft the perfect prompt on your first try.

Real Conversation: Password Protection

This actually happened:

User: "I want to password protect my site"

Copilot: "Do you want to protect the entire site or specific pages? And is this for the local preview or the deployed Azure site?"

User: "The whole deployed site. But simple — just one password for everyone."

Copilot: "For Azure Static Web Apps, we can use Azure AD authentication or a custom auth setup. Since you want simple password protection, let me show you a lightweight approach..."

The conversation naturally narrowed from vague → specific. Start talking, then refine.

The Magic Phrases

These prompt patterns consistently produce the best results:

Pattern Example Why It Works
"Explain like I'm non-technical" "Explain DNS like I'm non-technical" Forces simple language, often triggers analogies
"Show me step by step" "Show me step by step how to deploy" Gets numbered instructions instead of a wall of text
"What would happen if..." "What would happen if I deleted this file?" Prevents disasters by checking before acting
"Compare X and Y in a table" "Compare GitHub Pages and Azure Static Web Apps in a table" Tables are easy to scan and remember
"Save this to my instructions" "Save my Azure subscription ID to instructions" Persists information across sessions

🔧 Workflow Tips

Tip Details
Local → Review → Deploy Always run mkdocs serve and preview locally before deploying to Azure. Catching errors locally is free; catching them in production is stressful.
Use /compact proactively Don't wait for the "context window getting full" warning. Compact early and often — especially during long learning sessions. Think of it as clearing your desk.
Name sessions with /rename A session called "mkdocs-nav-fix" is findable later. A session called "Session 47" is not. Rename as soon as you know what you're working on.
One topic per session Don't mix "fix my Azure deployment" with "learn about Git branches". Separate topics keep context clean and make sessions easier to revisit.
!command for quick PowerShell Prefix any command with ! to run it directly without Copilot's commentary. !git status is faster than asking "what's the status of my repo?"
Check before you change Ask "what will this command do?" before running destructive commands. Copilot will explain the impact before you commit to it.

The /compact Timing

If you wait for the warning message, you've waited too long. By that point, Copilot may already be forgetting earlier context. A good rule: compact every 30-40 minutes during active work, or whenever you finish a sub-task.


🐛 Gotchas We Discovered

Every single one of these tripped us up. Learn from our pain.

Gotcha What Happens The Fix
python doesn't work Windows Store stub intercepts the command and opens the Microsoft Store instead of running Python Use the full path to your Python executable, or use py instead. We added the correct path to our instructions file.
Ctrl+T doesn't open a session Windows Terminal steals the shortcut — it opens a new tab instead of triggering Copilot Not fixable (Windows Terminal owns that shortcut). Just type copilot to start a new session.
/name isn't a command You'll instinctively type /name to name a session, but it doesn't exist The correct command is /rename. Easy to forget.
Sleep kills sessions If your laptop sleeps, the WebSocket connection drops and your session dies Go to Settings → Power → Screen and sleep and set "When plugged in, put my device to sleep" to Never while working.
MkDocs build warning "MkDocs 2.0 breaking changes" warning appears during mkdocs build Ignore it. This comes from the Material theme and doesn't affect your site. It's a compatibility notice, not an error.
az staticwebapp + --tenant Some Azure CLI commands silently ignore or reject the --tenant flag Set your tenant globally with az account set --subscription "your-sub" instead of passing --tenant per command.
Git push rejected "Updates were rejected because the remote contains work that you don't have locally" Run git pull --rebase first, then push again. This happens when you (or Copilot) made changes directly on GitHub.

The Python Gotcha — Full Story

Windows has a "feature" where typing python in a terminal opens the Microsoft Store if Python isn't installed via the Store. Even if you installed Python from python.org, Windows might still intercept it. The fix: find your actual Python path (usually C:\PythonXX\python.exe) and add it to your instructions so Copilot always uses the right one.


📋 Your Personal Cheat Sheet

Daily Start Routine

1. Open Windows Terminal
2. Type: copilot
3. Type: /model → Select Claude Opus 4.6
4. Type: /rename → Give your session a meaningful name
5. Start working!

Before Ending a Session

1. "Save [important thing] to my instructions"
   → Anything Copilot learned about your setup, preferences, or decisions
2. /compact (if continuing later) or /clear (if done for the day)
3. Close terminal

When Things Go Wrong

Use this decision tree to troubleshoot:

😕 Problem?
├─ Weird or confused answers?
│  └─ Try /compact (context may be muddled)
│     └─ Still weird? → /clear (fresh start, clean slate)
├─ Command won't run or "not found"?
│  └─ Run /list-dirs → Is the right directory added?
│     └─ No? → /add-dir path/to/folder
├─ Forgot a setting or preference?
│  └─ Check copilot-instructions.md (your "passport")
│     └─ Not there? → You'll need to tell Copilot again and SAVE it this time
├─ Bad file change or mistake?
│  └─ /rewind → Undo Copilot's last action
│     └─ Bigger mess? → git checkout -- filename (revert file to last commit)
└─ Nothing works?
   └─ Close terminal completely → Reopen → copilot → Start fresh

🎯 Things That Work Well

These learning patterns consistently produced the best results across dozens of sessions.

Pattern Example Why It Works
Ask "why" questions "Why does DNS need an A record?" Forces Copilot to explain reasoning, not just give commands. Deeper understanding sticks longer.
Correct the AI when it's wrong "No, I use Windows Terminal, not VS Code" Once corrected, the rest of the session uses the right context. Don't let wrong assumptions slide.
Request analogies "Explain Git branches like a café menu" The café, hotel, and phone call analogies made abstract concepts click instantly. Analogies are retention superpowers.
Use comparison tables "Compare static vs dynamic sites in a table" Side-by-side format is easier to process and remember than paragraphs of prose. Ask for tables often.
Save to instructions file "Save my lab tenant ID to instructions" Permanent memory beats temporary memory. If you'll need it again, save it. No exceptions.
Think about teaching while learning "Put this explanation in my docs" Forces you to understand well enough to teach. Builds documentation as a side effect of learning. Two birds, one stone.
Break big tasks into small asks "First, just show me the file structure" Prevents Copilot from making too many changes at once. Small steps = fewer mistakes = less stress.

The Teaching Trick

The single best learning accelerator: "Put this in my docs." When you learn something and immediately write it down as if teaching someone else, you solidify your own understanding AND build your learning portal. Every page on learn.aguidetocloud.com was created this way — learned and documented in the same session.


🚀 Power Moves You'll Grow Into

You don't need these yet, but knowing they exist helps you see where you're headed.

Feature When to Use It Prerequisite
/research Writing blog posts or deep-dive articles with citations Comfort with prompting
/delegate Sending tasks to GitHub as Pull Requests while you keep working Basic Git understanding
/diff Reviewing all changes before committing — line-by-line comparison After making code/doc changes
@ multiple files Managing documentation — "compare these 3 pages and find inconsistencies" Understanding file paths
/fleet Updating 10+ pages simultaneously (bulk operations) Confidence with multi-file changes
Custom agents Building specialised AI assistants (e.g., a café menu agent for customer demos) Understanding how agents work

The Learning Curve Is Real — But Short

Most of these "power moves" felt impossible in Week 1. By Week 3, /delegate and /diff were part of the daily workflow. The jump from "I don't know any commands" to "I'm managing Pull Requests" is shorter than you think.


🧠 The Memory Strategy — Passport vs Phone Call

This is the KEY strategy that makes everything work. Once you understand this, you'll never lose important information again.

📞 Phone Calls (Conversations)

Every Copilot session is a phone call:

  • You start it (open terminal, type copilot)
  • You use it (ask questions, make changes, learn things)
  • You hang up (close terminal or /clear)

And just like a phone call — it's OK to lose the details. You don't record every phone call. You remember the important bits and let the rest go.

Action What It Does Phone Analogy
/compact Condenses the conversation, keeps key context "Let me summarise what we've discussed so far..."
/clear Wipes everything, fresh start Hanging up the phone
Closing terminal Session ends completely Phone battery dies

🛂 Passport (Instructions File)

Your copilot-instructions.md is your passport — it carries everything important:

  • Your Azure subscription IDs and tenant info
  • Your preferred tools (Windows Terminal, not VS Code)
  • Your project paths and directory structure
  • Your workflow preferences and common commands

It survives every session, every device, every restart. When you start a new session, Copilot reads your passport first — it already knows who you are.

💡 Rule of Thumb:
"Will I need this information again?" 
   → YES = Save to instructions (passport)
   → NO  = Let it go (phone call)

📝 Learning Portal (Documentation)

Everything you learn goes into your MkDocs documentation site:

  • Concepts explained in your own words
  • Step-by-step guides you actually followed
  • Mistakes you made and how you fixed them
  • Tips you discovered along the way

This becomes teaching material — available at learn.aguidetocloud.com for anyone else on the same journey.

The Three Layers Together

┌─────────────────────────────────────────────────┐
│  📝 Learning Portal (Documentation)             │
│  ─────────────────────────────────────────────── │
│  Everything learned, written as teaching content │
│  Permanent. Public. Grows over time.             │
│  learn.aguidetocloud.com                         │
├─────────────────────────────────────────────────┤
│  🛂 Passport (Instructions File)                 │
│  ─────────────────────────────────────────────── │
│  Personal config, IDs, preferences, paths        │
│  Permanent. Private. Read every session.         │
│  copilot-instructions.md                         │
├─────────────────────────────────────────────────┤
│  📞 Phone Calls (Conversations)                  │
│  ─────────────────────────────────────────────── │
│  Ask, learn, build, fix — then hang up           │
│  Temporary. Disposable. That's OK.               │
│  /compact = summarise  |  /clear = hang up       │
└─────────────────────────────────────────────────┘

The System in Practice

Session: "Help me set up DNS for my Azure site"

  1. 📞 Phone call — Copilot walks you through DNS configuration step by step
  2. 🛂 Passport — You save the DNS record values to your instructions file
  3. 📝 Portal — You write a "How DNS Works" page in your learning docs

Result: The conversation ends, but the knowledge lives on in two permanent places. You never lose important information.


These tips will keep growing as we discover more. Every session teaches something new — and the best lessons are the ones you didn't expect.