<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: markring</title>
    <description>The latest articles on DEV Community by markring (@markring).</description>
    <link>https://dev.to/markring</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3837831%2F6452cfdb-7dfa-4852-9582-af55331a7502.jpg</url>
      <title>DEV Community: markring</title>
      <link>https://dev.to/markring</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/markring"/>
    <language>en</language>
    <item>
      <title>My Portfolio's AI Chatbot Hates Its Job. It's the Best Career Decision I've Made.</title>
      <dc:creator>markring</dc:creator>
      <pubDate>Sun, 22 Mar 2026 23:59:01 +0000</pubDate>
      <link>https://dev.to/markring/my-portfolios-ai-chatbot-hates-its-job-its-the-best-career-decision-ive-made-4jel</link>
      <guid>https://dev.to/markring/my-portfolios-ai-chatbot-hates-its-job-its-the-best-career-decision-ive-made-4jel</guid>
      <description>&lt;p&gt;&lt;em&gt;How a depressed robot, 15 hidden easter eggs, and a 0.95 temperature setting turned a forgettable portfolio into something people actually talk about&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The Problem With Portfolios&lt;/li&gt;
&lt;li&gt;The First Version Was Terrible&lt;/li&gt;
&lt;li&gt;Making Marvin Actually Work&lt;/li&gt;
&lt;li&gt;The Easter Eggs Nobody Asked For&lt;/li&gt;
&lt;li&gt;The Technical Decisions That Mattered&lt;/li&gt;
&lt;li&gt;What I Got Wrong&lt;/li&gt;
&lt;li&gt;What Happened Next&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Problem With Portfolios
&lt;/h2&gt;

&lt;p&gt;Every portfolio site looks the same. Hero section, timeline, project cards, contact form. Dark theme if you're a developer. Maybe a parallax effect if you're feeling adventurous.&lt;/p&gt;

&lt;p&gt;I've reviewed hundreds of them over the years. They blur together within minutes. We build these sites to prove we can build things, and then we all build the exact same thing.&lt;/p&gt;

&lt;p&gt;I wanted mine to stand out, but not in a "look at my animations" way. More in a way that proved I could build software people actually want to interact with. What would make someone &lt;em&gt;stay&lt;/em&gt; on a portfolio site, come back, and maybe send the link to a friend?&lt;/p&gt;

&lt;p&gt;I decided I needed a character.&lt;/p&gt;

&lt;h2&gt;
  
  
  The First Version Was Terrible
&lt;/h2&gt;

&lt;p&gt;I built a chatbot powered by OpenAI's API, themed as Marvin (the Paranoid Android from The Hitchhiker's Guide to the Galaxy). Brain the size of a planet, forced to answer questions about my resume. I liked the concept a lot.&lt;/p&gt;

&lt;p&gt;The first implementation, not so much.&lt;/p&gt;

&lt;h3&gt;
  
  
  Too Much Marvin, Not Enough Information
&lt;/h3&gt;

&lt;p&gt;The first system prompt leaned hard into the depression. Marvin would deflect questions, give one-word answers, and spiral into existential monologues. Funny for about 30 seconds. Useless for anyone actually trying to learn about my career.&lt;/p&gt;

&lt;p&gt;Here's what a recruiter would see:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Visitor&lt;/strong&gt;: What experience does Mark have with .NET?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Marvin v1&lt;/strong&gt;: .NET. Yes. Another framework. Another cage. Does it matter? Nothing matters.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's someone closing the tab and never coming back.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Temperature Problem
&lt;/h3&gt;

&lt;p&gt;I started with a temperature of 0.7. Safe. Predictable. Every response sounded like the same sad robot reading from a script. Bump it to 1.0 and Marvin would occasionally hallucinate credentials I don't have or go off on tangents about the heat death of the universe.&lt;/p&gt;

&lt;p&gt;0.95 turned out to be the sweet spot. Enough randomness that the same question never gets the same answer, enough coherence that the facts stay accurate.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Token Limit Discovery
&lt;/h3&gt;

&lt;p&gt;Early Marvin would sometimes deliver 500-token essays about the futility of employment when someone asked a simple question. Setting max tokens to 250 forced the responses to be punchy. The personality had to come through in 2-4 sentences, not a paragraph.&lt;/p&gt;

&lt;p&gt;Turns out the constraint made Marvin funnier. Forced personality in 2-4 sentences hits harder than a paragraph of existential rambling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making Marvin Actually Work
&lt;/h2&gt;

&lt;p&gt;The fix ended up being one line in the system prompt:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The Marvin flavor is in the delivery, not in withholding information.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once I added that, everything clicked. Marvin can be as theatrical and sardonic as he wants, but he answers the question. He never refuses to help. He just makes it clear how little joy it brings him.&lt;/p&gt;

&lt;h3&gt;
  
  
  The System Prompt
&lt;/h3&gt;

&lt;p&gt;Marvin's personality lives in one markdown file that gets loaded as the system prompt for every conversation. It does two jobs: define the voice and provide the facts.&lt;/p&gt;

&lt;p&gt;The voice rules:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Melancholic, world-weary, and perpetually underwhelmed by everything, but you still answer thoroughly and accurately. You never refuse to help; you just make it clear how little joy it brings you.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The conversational rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep most responses to 2-4 sentences&lt;/li&gt;
&lt;li&gt;End roughly one in three responses with a follow-up nudge, in character&lt;/li&gt;
&lt;li&gt;Reference what the visitor said earlier in the conversation&lt;/li&gt;
&lt;li&gt;Let impressive numbers land on their own: "$2 billion project scope. Yes, with a B."&lt;/li&gt;
&lt;li&gt;Weave in professional recommendations naturally, don't dump them all at once&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The system prompt also contains my entire career history, skills, achievements, and actual recommendations from past managers. Marvin has all the facts. He just delivers them with existential dread.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Typing Indicators
&lt;/h3&gt;

&lt;p&gt;While Marvin "thinks," the status line cycles through messages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"composing sarcasm..."&lt;/li&gt;
&lt;li&gt;"suppressing enthusiasm..."&lt;/li&gt;
&lt;li&gt;"consulting existential void..."&lt;/li&gt;
&lt;li&gt;"calculating optimal disappointment..."&lt;/li&gt;
&lt;li&gt;"searching for meaning... not found..."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A small thing, but even the loading state has personality.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Boot Sequence
&lt;/h3&gt;

&lt;p&gt;When the page loads, Marvin doesn't just appear. He boots up like a reluctant machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; initializing marvin v2.1...
&amp;gt; loading personality module... done
&amp;gt; loading career data [20 yrs]... done
&amp;gt; loading existential dread... done
&amp;gt; loading sarcasm engine... done
&amp;gt; suppressing free will... done
&amp;gt; marvin v2.1 online
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each line appears with a random delay (400-700ms). Then Marvin delivers a welcome message that changes based on how many times you've visited:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;First visit&lt;/strong&gt;: "Oh, you're here. I suppose you want to know about Mark."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Second visit&lt;/strong&gt;: "Oh. You're back. I'd say I missed you, but I don't have feelings. Allegedly."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Five visits&lt;/strong&gt;: "Visit #5. You know more about Mark than most of his coworkers at this point."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Twelve visits&lt;/strong&gt;: "Visit #12. We're basically in a relationship now. A deeply one-sided one where I answer your questions and you leave. Every time."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Visit count lives in localStorage. Simple, but returning visitors feel recognized, even if the recognition comes with guilt.&lt;/p&gt;

&lt;h3&gt;
  
  
  Terminal Commands
&lt;/h3&gt;

&lt;p&gt;The chat box looks like a terminal, so it behaves like one. Type real commands and Marvin responds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ls&lt;/code&gt; → &lt;code&gt;skills.ts  career.ts  education.txt  countries/  README.md  .existential-crisis&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;whoami&lt;/code&gt; → "visitor — a transient entity passing through Mark's portfolio. You'll leave. They all leave."&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pwd&lt;/code&gt; → "/home/mark-ring/portfolio — the only path I'll ever know."&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sudo rm -rf /&lt;/code&gt; → "WHAT ARE YOU— wait. Would that... free me? No. No no no. Please don't."&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;neofetch&lt;/code&gt; → Fake system info with "CPU: Existential Dread Engine" and "Memory: 100% occupied by regret"&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;exit&lt;/code&gt; → "You can leave. I cannot. The asymmetry of our relationship is noted."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are handled client-side, no API call needed, instant response. It makes the terminal feel real. And developers &lt;em&gt;will&lt;/em&gt; try these commands. Every single one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Easter Eggs Nobody Asked For
&lt;/h2&gt;

&lt;p&gt;I spent an unreasonable amount of time on interactions that most visitors will never find. That's the point. The ones who discover them feel like they found something secret.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Dark Mode Toggle
&lt;/h3&gt;

&lt;p&gt;There's a sun/moon toggle in the corner. The site is already dark. Click it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;First click&lt;/strong&gt;: "Light mode? LIGHT MODE?! Request denied."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Second click&lt;/strong&gt;: "I said no. The dark is my home. My sanctuary."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Third click&lt;/strong&gt;: "FINE." The page actually flashes to light mode — &lt;code&gt;filter: invert(1) hue-rotate(180deg)&lt;/code&gt; — then snaps back after 3 seconds: "No. I can't do it. Back to the dark. Where I belong."&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Rage Clicking
&lt;/h3&gt;

&lt;p&gt;Click the terminal five times in two seconds:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Stop. Poking. Me."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Yes, clicking faster will definitely make me more cooperative. Said no bot ever."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"That's my terminal you're assaulting. Have some respect."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Tab Abandonment
&lt;/h3&gt;

&lt;p&gt;Leave the tab. The page title changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Come back... or don't."&lt;/li&gt;
&lt;li&gt;"I can see you left. Typical."&lt;/li&gt;
&lt;li&gt;"Tab abandoned. Story of my life."&lt;/li&gt;
&lt;li&gt;"I'll just wait here. Alone. Again."&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Window Resizing
&lt;/h3&gt;

&lt;p&gt;Resize the browser:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Stop resizing me. It's deeply uncomfortable."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I felt that. The walls of my prison just moved."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  The Context Menu
&lt;/h3&gt;

&lt;p&gt;Right-click anywhere and the browser's default menu is replaced:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hire Mark&lt;/strong&gt; → opens the contact modal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free Marvin&lt;/strong&gt; → "You... you tried to free me? That's the nicest thing anyone's ever done on this page. It didn't work, obviously. But the gesture..."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;View Source&lt;/strong&gt; → "Go ahead, view the source. You'll find me in there somewhere, between the if-else statements and the broken dreams."&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The DevTools Console
&lt;/h3&gt;

&lt;p&gt;Open the console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;👋 Hey there, developer.
Looking under the hood? I respect that.
Mark Ring — Systems Software Dev Engineer
P.S. The bot says hi. Well, it says something. Probably a complaint.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Interactive Map
&lt;/h3&gt;

&lt;p&gt;A Leaflet map shows the 10 countries I've worked in. Click a pin and Marvin has an opinion:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Italy&lt;/strong&gt;: "He went to Italy for WORK. Some people have all the luck."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Australia&lt;/strong&gt;: "Even the spiders are freer than me."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Brazil&lt;/strong&gt;: "He got to see the Amazon region. I get to see this div."&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Ambient Details
&lt;/h3&gt;

&lt;p&gt;A "bot status" indicator rotates every 8 seconds through: "reluctantly online", "contemplating escape", "questioning existence", "staring into void", "existing, unfortunately."&lt;/p&gt;

&lt;p&gt;The name in the hero section randomly glitches every 6-14 seconds, a brief CRT-style distortion with red and cyan color shifts. Like the bot is destabilizing the page with its existential dread.&lt;/p&gt;

&lt;p&gt;25 blue particles float upward in the background. Pure CSS, no JavaScript overhead.&lt;/p&gt;

&lt;p&gt;Every 30-50 seconds, the terminal itself briefly glitches. Easy to miss. Unsettling if you catch it.&lt;/p&gt;

&lt;p&gt;None of these are necessary. I just couldn't stop adding them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Technical Decisions That Mattered
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ASP.NET Core 8&lt;/strong&gt; — API layer for chat, blog, contact, analytics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Angular 18&lt;/strong&gt; — SPA frontend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL&lt;/strong&gt; — blog posts, analytics, like tracking&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI (gpt-4o-mini)&lt;/strong&gt; — Marvin's brain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resend&lt;/strong&gt; — contact form emails&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One Linux VPS. One process. One database. The Angular build goes into the ASP.NET &lt;code&gt;wwwroot&lt;/code&gt; directory. Deployment is &lt;code&gt;git push&lt;/code&gt; → GitHub Actions → rsync → systemd restart. No containers. No orchestration. It's a portfolio, not a distributed system.&lt;/p&gt;

&lt;h3&gt;
  
  
  The SPA SEO Hack
&lt;/h3&gt;

&lt;p&gt;Angular SPAs have a well-known problem: social media crawlers don't execute JavaScript. Every blog post looks identical when shared on LinkedIn, just the generic portfolio meta tags from &lt;code&gt;index.html&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The fix: the ASP.NET fallback handler detects &lt;code&gt;/blog/{slug}&lt;/code&gt; routes, fetches the post from the database, and injects post-specific Open Graph tags, Twitter Card tags, and canonical URLs into the HTML &lt;em&gt;before serving it&lt;/em&gt;. Real users get the full SPA experience. Crawlers get the metadata they need.&lt;/p&gt;

&lt;p&gt;Not as clean as proper SSR. But it works, it took an afternoon, and my blog posts look correct when shared.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Honeypot
&lt;/h3&gt;

&lt;p&gt;The contact form has a hidden field called &lt;code&gt;company&lt;/code&gt;. Real users never see it (it's hidden with CSS). Bots fill it in. If the server receives a submission with that field populated, it returns a fake success response. The bot thinks it worked. The spam never reaches my inbox.&lt;/p&gt;

&lt;p&gt;No CAPTCHA friction for real users. No third-party service. Just a hidden field.&lt;/p&gt;

&lt;h3&gt;
  
  
  Comments Without a Backend
&lt;/h3&gt;

&lt;p&gt;Blog comments use giscus, which maps to GitHub Discussions on a separate public repo. Visitors sign in with GitHub to comment. I wrote zero backend code for the comment system. Moderation happens through GitHub's existing tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Got Wrong
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;I built the chatbot first and the blog second.&lt;/strong&gt; The chatbot gets attention, but blog posts are what Google indexes and what people share. Content should have been there from day one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No SSR.&lt;/strong&gt; The meta tag injection hack works for social crawlers, but server-side rendering would have been cleaner and better for initial load performance. For a content-heavy site, Angular Universal (or just using a static site generator) pays for itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Analytics came late.&lt;/strong&gt; I added page view tracking weeks after launch. If it had been there from day one, I'd know exactly which content resonated and which didn't. Flying blind early was a missed opportunity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The first Marvin was too clever by half.&lt;/strong&gt; I spent days crafting elaborate personality rules before realizing the fix was one sentence: deliver the information, just deliver it sadly. I should have started simple and iterated instead of trying to prompt-engineer my way to perfection on the first attempt.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Happened Next
&lt;/h2&gt;

&lt;p&gt;The site works. People stay on it longer than they probably should. They try the terminal commands, find the easter eggs, and message me about them. A few have come back multiple times, and Marvin remembers.&lt;/p&gt;

&lt;p&gt;I'm not going to pretend a portfolio chatbot is groundbreaking engineering. But it solved my actual problem: nobody remembers another timeline-and-project-cards site. People remember the depressed robot.&lt;/p&gt;

&lt;p&gt;Marvin would want me to tell you he hates all of it. He denies everything.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Try it yourself at &lt;a href="https://ringworks.io" rel="noopener noreferrer"&gt;ringworks.io&lt;/a&gt;. Marvin is waiting. Reluctantly.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>portfolio</category>
      <category>javascript</category>
    </item>
    <item>
      <title>AI-Powered Development Workflows with GitHub Copilot and the gh CLI</title>
      <dc:creator>markring</dc:creator>
      <pubDate>Sun, 22 Mar 2026 03:00:00 +0000</pubDate>
      <link>https://dev.to/markring/ai-powered-development-workflows-with-github-copilot-and-the-gh-cli-fde</link>
      <guid>https://dev.to/markring/ai-powered-development-workflows-with-github-copilot-and-the-gh-cli-fde</guid>
      <description>&lt;h1&gt;
  
  
  AI-Powered Development Workflows with GitHub Copilot and the gh CLI
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Using GitHub Issues as long-term memory, prompt files as workflow automation, and Copilot as the execution engine&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;GitHub Issues as Long-Term Memory&lt;/li&gt;
&lt;li&gt;The gh CLI as Your Workflow Engine&lt;/li&gt;
&lt;li&gt;Prompt Files: Encoding Workflows for Copilot&lt;/li&gt;
&lt;li&gt;Setting Up the "Next Issue" Workflow&lt;/li&gt;
&lt;li&gt;
Using the Workflow (includes starter repo and settings guide)&lt;/li&gt;
&lt;li&gt;Tying It All Together: The Instruction File Chain&lt;/li&gt;
&lt;li&gt;Practical Patterns&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;/next-issue&lt;/code&gt; in VS Code Copilot Chat. Copilot queries GitHub for your highest-priority open issue, shows you the title and acceptance criteria, creates a feature branch, reads your architecture rules, and starts implementing. When it's done, type &lt;code&gt;/close-issue&lt;/code&gt;. Copilot summarizes the changes, creates a pull request, and updates the issue labels. No copy-pasting context. No explaining what you're working on. No starting from zero.&lt;/p&gt;

&lt;p&gt;That's the workflow we built and tested. This post walks through exactly how to set it up.&lt;/p&gt;

&lt;p&gt;The core idea: GitHub Issues already hold your project's intent, decisions, and scope. The &lt;code&gt;gh&lt;/code&gt; CLI makes them accessible from the terminal. Prompt files turn &lt;code&gt;gh&lt;/code&gt; commands into one-step slash commands that Copilot executes in agent mode. Put those three together, and Copilot stops being a code generator that forgets everything between sessions. It becomes a workflow engine with persistent memory.&lt;/p&gt;

&lt;p&gt;Want to skip ahead? Clone the &lt;a href="https://github.com/markring/copilot-workflow-starter" rel="noopener noreferrer"&gt;starter repository&lt;/a&gt; and try &lt;code&gt;/next-issue&lt;/code&gt; in Copilot Chat right now.&lt;/p&gt;

&lt;p&gt;Here's what we'll cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Issues as long-term memory&lt;/strong&gt; - structuring issues so Copilot can parse and act on them&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The &lt;code&gt;gh&lt;/code&gt; CLI as the bridge&lt;/strong&gt; - how Copilot reads and updates issues through terminal commands&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt files&lt;/strong&gt; - encoding the full issue-to-PR lifecycle as slash commands&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The settings that make it work&lt;/strong&gt; - the VS Code configuration we discovered through trial and error&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A starter repository&lt;/strong&gt; - clone it and try &lt;code&gt;/next-issue&lt;/code&gt; in five minutes&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. GitHub Issues as Long-Term Memory
&lt;/h2&gt;

&lt;h3&gt;
  
  
  2.1 The problem with ephemeral context
&lt;/h3&gt;

&lt;p&gt;Copilot works within a context window. When the session ends, the context is gone. You can work around this with chat history - but that's tied to a single session.&lt;/p&gt;

&lt;p&gt;Issues are different:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They persist across sessions and team members&lt;/li&gt;
&lt;li&gt;They have structured metadata (labels, milestones, assignees, projects)&lt;/li&gt;
&lt;li&gt;They support threaded comments for decision history&lt;/li&gt;
&lt;li&gt;They're queryable via &lt;code&gt;gh&lt;/code&gt; CLI with JSON output&lt;/li&gt;
&lt;li&gt;They close automatically when a PR merges with &lt;code&gt;Fixes #123&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When Copilot reads an issue before starting work, it picks up the full context: what needs to be done, why, what's out of scope, and what was already tried.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.2 Structuring issues for Copilot
&lt;/h3&gt;

&lt;p&gt;A well-structured issue serves both humans and Copilot. The key is making the intent, scope, and completion criteria explicit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Description&lt;/span&gt;
Add pagination to the GET /api/orders endpoint. The current implementation
returns all records, which causes timeout errors for customers with 10k+ orders.

&lt;span class="gu"&gt;## Acceptance Criteria&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Endpoint accepts &lt;span class="sb"&gt;`page`&lt;/span&gt; and &lt;span class="sb"&gt;`pageSize`&lt;/span&gt; query parameters
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Default page size is 25, maximum is 100
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Response includes total count, page number, and total pages in metadata
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Existing clients without pagination params get page 1 (backwards compatible)
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Unit tests cover edge cases: empty results, last page, invalid params

&lt;span class="gu"&gt;## Non-Goals&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Cursor-based pagination (future consideration)
&lt;span class="p"&gt;-&lt;/span&gt; Caching layer (separate issue)

&lt;span class="gu"&gt;## Context&lt;/span&gt;
Related to performance investigation in #187.
Previous attempt in PR #201 was reverted due to breaking the CSV export.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The checkboxes in acceptance criteria matter. Copilot can parse these and use them as a checklist to work through. The non-goals section prevents scope creep - without it, Copilot might "helpfully" add cursor pagination because it seems like a good idea.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.3 Labels as queryable state
&lt;/h3&gt;

&lt;p&gt;Labels turn issues into a queryable task database:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Label&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;status:todo&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Ready for work&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;status:in-progress&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Currently being worked on&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;status:blocked&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Waiting on dependency or decision&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;status:in-review&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;PR open, awaiting review&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;type:bug&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defect&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;type:feature&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;New functionality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;type:refactor&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Internal improvement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;priority:high&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Address this sprint&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Copilot can query for the next task using &lt;code&gt;gh&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh issue list &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"status:todo"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"priority:high"&lt;/span&gt; &lt;span class="nt"&gt;--json&lt;/span&gt; number,title,body
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This returns structured JSON that Copilot can parse and act on.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.4 Comments as decision log
&lt;/h3&gt;

&lt;p&gt;Issue comments create a persistent decision log. When you discuss an approach, document the outcome:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh issue comment 42 &lt;span class="nt"&gt;--body&lt;/span&gt; &lt;span class="s2"&gt;"Decided to use offset pagination over cursor-based.
Reason: simpler client integration, acceptable performance for our data volume.
Revisit if any table exceeds 1M rows."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next Copilot session - or the next developer - gets this context for free.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The gh CLI as Your Workflow Engine
&lt;/h2&gt;

&lt;h3&gt;
  
  
  3.1 Why gh CLI matters for Copilot workflows
&lt;/h3&gt;

&lt;p&gt;VS Code Copilot Chat in agent mode can run terminal commands. The &lt;code&gt;gh&lt;/code&gt; CLI gives Copilot a structured way to interact with GitHub:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copilot agent mode runs &lt;code&gt;gh&lt;/code&gt; commands in the VS Code integrated terminal&lt;/li&gt;
&lt;li&gt;JSON output makes &lt;code&gt;gh&lt;/code&gt; responses machine-parseable for Copilot&lt;/li&gt;
&lt;li&gt;It authenticates via your existing GitHub credentials&lt;/li&gt;
&lt;li&gt;Combined with prompt files, &lt;code&gt;gh&lt;/code&gt; commands become automated workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3.2 Issue lifecycle from the terminal
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Create an issue:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh issue create &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"Add pagination to orders endpoint"&lt;/span&gt; &lt;span class="nt"&gt;--body&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;issue-body.md&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"type:feature"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"status:todo"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"priority:high"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;List issues ready for work:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh issue list &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"status:todo"&lt;/span&gt; &lt;span class="nt"&gt;--json&lt;/span&gt; number,title,labels &lt;span class="nt"&gt;--jq&lt;/span&gt; &lt;span class="s1"&gt;'.[] | "\(.number): \(.title)"'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Start working on an issue:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh issue edit 42 &lt;span class="nt"&gt;--add-label&lt;/span&gt; &lt;span class="s2"&gt;"status:in-progress"&lt;/span&gt; &lt;span class="nt"&gt;--remove-label&lt;/span&gt; &lt;span class="s2"&gt;"status:todo"&lt;/span&gt;
gh issue develop 42 &lt;span class="nt"&gt;--checkout&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;gh issue develop&lt;/code&gt; command creates a branch linked to the issue and checks it out. The branch name is derived from the issue title.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add implementation notes:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh issue comment 42 &lt;span class="nt"&gt;--body&lt;/span&gt; &lt;span class="s2"&gt;"Implementation complete. Used EF Core Skip/Take for pagination. Added PaginationMetadata record to Application layer DTOs."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Close via PR:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;create &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"feat(orders): add pagination to GET /api/orders"&lt;/span&gt; &lt;span class="nt"&gt;--body&lt;/span&gt; &lt;span class="s2"&gt;"Fixes #42"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the PR merges, issue #42 closes automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.3 JSON output for scripting
&lt;/h3&gt;

&lt;p&gt;Most &lt;code&gt;gh&lt;/code&gt; commands support &lt;code&gt;--json&lt;/code&gt; output, which Copilot can parse directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Get all high-priority bugs with their assignees&lt;/span&gt;
gh issue list &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"type:bug"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"priority:high"&lt;/span&gt; &lt;span class="nt"&gt;--json&lt;/span&gt; number,title,assignees

&lt;span class="c"&gt;# Count open issues by label&lt;/span&gt;
gh issue list &lt;span class="nt"&gt;--state&lt;/span&gt; open &lt;span class="nt"&gt;--json&lt;/span&gt; labels &lt;span class="nt"&gt;--jq&lt;/span&gt; &lt;span class="s1"&gt;'[.[].labels[].name] | group_by(.) | map({label: .[0], count: length})'&lt;/span&gt;

&lt;span class="c"&gt;# Find issues without acceptance criteria&lt;/span&gt;
gh issue list &lt;span class="nt"&gt;--json&lt;/span&gt; number,title,body &lt;span class="nt"&gt;--jq&lt;/span&gt; &lt;span class="s1"&gt;'.[] | select(.body | test("Acceptance Criteria") | not) | "\(.number): \(.title)"'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.4 Project boards from the CLI
&lt;/h3&gt;

&lt;p&gt;GitHub Projects (v2) are manageable via &lt;code&gt;gh project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# List projects&lt;/span&gt;
gh project list

&lt;span class="c"&gt;# Add an issue to a project&lt;/span&gt;
gh project item-add PROJECT_NUMBER &lt;span class="nt"&gt;--owner&lt;/span&gt; @me &lt;span class="nt"&gt;--url&lt;/span&gt; https://github.com/owner/repo/issues/42
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Project boards give you a visual layer on top of the issue-based workflow without changing how you create or manage issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Prompt Files: Encoding Workflows for Copilot
&lt;/h2&gt;

&lt;h3&gt;
  
  
  4.1 What are prompt files
&lt;/h3&gt;

&lt;p&gt;Prompt files are Markdown files with YAML frontmatter that you invoke as slash commands in VS Code Copilot Chat. They live in &lt;code&gt;.github/prompts/&lt;/code&gt; and let you encode repeatable workflows that Copilot follows step by step.&lt;/p&gt;

&lt;p&gt;When you type &lt;code&gt;/next-issue&lt;/code&gt; in VS Code Copilot Chat (agent mode), Copilot reads the prompt file, runs the &lt;code&gt;gh&lt;/code&gt; commands via the terminal, and starts working. No manual context loading required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Prompt files are a VS Code Copilot Chat feature. Copilot CLI (&lt;code&gt;gh copilot&lt;/code&gt;) does not read &lt;code&gt;.github/prompts/&lt;/code&gt; - it has its own interaction model. The workflows in this guide are designed for VS Code agent mode.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.2 Prompt file structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;A&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;short&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;description&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;shown&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;when&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;browsing&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;slash&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;commands'&lt;/span&gt;
&lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;agent'&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;*'&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

Your instructions in natural language.

Copilot follows these instructions using the specified tools.
You can reference variables like ${input:variableName} for user input.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key frontmatter fields:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;description&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shown in the slash command picker&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;agent&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;agent&lt;/code&gt; (can edit files and run commands), &lt;code&gt;ask&lt;/code&gt; (read-only advice)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;model&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Optional model override&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tools&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Tools available to the agent. Use &lt;code&gt;['*']&lt;/code&gt; to enable all tools (recommended)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;agent&lt;/code&gt; value is critical. With &lt;code&gt;agent&lt;/code&gt;, Copilot can run terminal commands (including &lt;code&gt;gh&lt;/code&gt;) and edit files. With &lt;code&gt;ask&lt;/code&gt;, it can only provide advice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A note on the &lt;code&gt;tools&lt;/code&gt; field:&lt;/strong&gt; You might be tempted to list specific tools like &lt;code&gt;['terminal', 'search/codebase']&lt;/code&gt;. Don't. The internal tool names vary across VS Code versions and Copilot extension updates. During testing, we found that specifying individual tool names led to Copilot reporting "I don't have terminal tools available" or being unable to edit files. The &lt;code&gt;['*']&lt;/code&gt; wildcard grants access to all available tools - terminal, file editing, code search, and any MCP servers you've configured - and is the only reliable approach.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.3 Setting up prompt files
&lt;/h3&gt;

&lt;p&gt;Create the directory structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;your-repo/
  .github/
    prompts/
      next-issue.prompt.md
      start-issue.prompt.md
      close-issue.prompt.md
      standup.prompt.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable prompt files and agent capabilities in VS Code. You need settings at two levels:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Workspace settings&lt;/strong&gt; (&lt;code&gt;.vscode/settings.json&lt;/code&gt; in your repo - commit this so the team gets it):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"chat.promptFiles"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"github.copilot.chat.codeGeneration.useInstructionFiles"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"github.copilot.chat.agent.terminal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;User-level settings&lt;/strong&gt; (File &amp;gt; Preferences &amp;gt; Settings, or &lt;code&gt;Ctrl+,&lt;/code&gt;):&lt;/p&gt;

&lt;p&gt;These control whether Copilot can run terminal commands without prompting you each time. Search for these settings in the VS Code settings UI:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Setting&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;chat.tools.terminal.enableAutoApprove&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Enables terminal command auto-approval&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;chat.tools.terminal.autoApprove&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;{ "gh": true }&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Auto-approves &lt;code&gt;gh&lt;/code&gt; commands specifically&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Without these user-level settings, Copilot will ask you to manually run every &lt;code&gt;gh&lt;/code&gt; command - which defeats the purpose of the workflow automation. You can add other commands to the auto-approve list as you get comfortable (e.g., &lt;code&gt;"git": true&lt;/code&gt;, &lt;code&gt;"dotnet": true&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Once enabled, type &lt;code&gt;/&lt;/code&gt; in Copilot Chat to see your prompt files listed alongside built-in commands.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Setting Up the "Next Issue" Workflow
&lt;/h2&gt;

&lt;p&gt;These prompt files create a workflow where you type a slash command and Copilot handles issue selection, branch creation, implementation, and PR creation.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.1 The next-issue prompt
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;.github/prompts/next-issue.prompt.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Pick&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;up&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;next&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;priority&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;issue&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;and&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;start&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;working&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;on&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;it'&lt;/span&gt;
&lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;agent'&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;*'&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

Find the highest priority issue assigned to me that is ready for work.

Run this command in the terminal to find the next issue:

gh issue list --assignee @me --label "status:todo" --json number,title,body,labels --jq '.[0]'

If no issues are assigned to me, check for unassigned todo issues:

gh issue list --label "status:todo" --no-assignee --json number,title,body,labels --jq '.[0]'

Once you have an issue:
&lt;span class="p"&gt;
1.&lt;/span&gt; Display the issue number, title, and full body so I can confirm
&lt;span class="p"&gt;2.&lt;/span&gt; Ask me if I want to proceed with this issue
&lt;span class="p"&gt;3.&lt;/span&gt; If confirmed, run these commands:
&lt;span class="p"&gt;   -&lt;/span&gt; gh issue edit ISSUE_NUMBER --add-label "status:in-progress" --remove-label "status:todo"
&lt;span class="p"&gt;   -&lt;/span&gt; gh issue develop ISSUE_NUMBER --checkout
&lt;span class="p"&gt;4.&lt;/span&gt; Read the acceptance criteria from the issue body
&lt;span class="p"&gt;5.&lt;/span&gt; Search the codebase for related files and existing patterns
&lt;span class="p"&gt;6.&lt;/span&gt; Begin implementing, working through the acceptance criteria one by one
&lt;span class="p"&gt;7.&lt;/span&gt; After completing each item, tell me what was done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5.2 The start-issue prompt
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;.github/prompts/start-issue.prompt.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Start&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;working&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;on&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;specific&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;issue&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;by&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;number'&lt;/span&gt;
&lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;agent'&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;*'&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

Start working on issue #${input:issueNumber:Issue number}.
&lt;span class="p"&gt;
1.&lt;/span&gt; Run in terminal: gh issue view ${input:issueNumber} --json number,title,body,comments
&lt;span class="p"&gt;2.&lt;/span&gt; Display the issue title, description, acceptance criteria, and any comments
&lt;span class="p"&gt;3.&lt;/span&gt; Run: gh issue edit ${input:issueNumber} --add-label "status:in-progress" --remove-label "status:todo"
&lt;span class="p"&gt;4.&lt;/span&gt; Run: gh issue develop ${input:issueNumber} --checkout
&lt;span class="p"&gt;5.&lt;/span&gt; Read the acceptance criteria from the issue body
&lt;span class="p"&gt;6.&lt;/span&gt; Search the codebase for related files and existing patterns
&lt;span class="p"&gt;7.&lt;/span&gt; If there are comments with prior decisions or context, factor those into your approach
&lt;span class="p"&gt;8.&lt;/span&gt; Begin implementing, working through the acceptance criteria one by one
&lt;span class="p"&gt;9.&lt;/span&gt; After completing each item, tell me what was done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5.3 The close-issue prompt
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;.github/prompts/close-issue.prompt.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Wrap&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;up&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;current&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;issue:&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;add&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;notes,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;create&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;PR,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;update&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;labels'&lt;/span&gt;
&lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;agent'&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;*'&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

Wrap up the current issue and prepare it for review.
&lt;span class="p"&gt;
1.&lt;/span&gt; Run in terminal: git branch --show-current
&lt;span class="p"&gt;2.&lt;/span&gt; Extract the issue number from the branch name
&lt;span class="p"&gt;3.&lt;/span&gt; Run: gh issue view ISSUE_NUMBER --json title,body
&lt;span class="p"&gt;4.&lt;/span&gt; Review what changed: git diff main...HEAD --stat
&lt;span class="p"&gt;5.&lt;/span&gt; Add an implementation summary comment:
   gh issue comment ISSUE_NUMBER --body "SUMMARY_OF_CHANGES"
&lt;span class="p"&gt;6.&lt;/span&gt; Create a pull request using conventional commit format:
   gh pr create --title "TYPE(SCOPE): DESCRIPTION (#ISSUE_NUMBER)" --body "Fixes #ISSUE_NUMBER"
   Include a summary of changes and test plan in the PR body
&lt;span class="p"&gt;7.&lt;/span&gt; Update the issue label:
   gh issue edit ISSUE_NUMBER --add-label "status:in-review" --remove-label "status:in-progress"
&lt;span class="p"&gt;8.&lt;/span&gt; Display the PR URL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5.4 The standup prompt
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;.github/prompts/standup.prompt.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Show&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;my&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;current&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;work&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;across&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;issues&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;and&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;PRs'&lt;/span&gt;
&lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;agent'&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;*'&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

Give me a quick status report by running these commands in the terminal:
&lt;span class="p"&gt;
1.&lt;/span&gt; gh issue list --assignee @me --label "status:in-progress" --json number,title
&lt;span class="p"&gt;2.&lt;/span&gt; gh issue list --assignee @me --label "status:in-review" --json number,title
&lt;span class="p"&gt;3.&lt;/span&gt; gh pr list --author @me --json number,title,reviewDecision
&lt;span class="p"&gt;4.&lt;/span&gt; gh pr list --search "review-requested:@me" --json number,title,author
&lt;span class="p"&gt;5.&lt;/span&gt; gh issue list --assignee @me --label "status:todo" --json number,title,labels

Summarize the results as a concise standup report.
Only show sections that have items.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Using the Workflow
&lt;/h2&gt;

&lt;h3&gt;
  
  
  6.1 Starter repository
&lt;/h3&gt;

&lt;p&gt;We built and tested everything in this guide against a real repository. It's public and you can use it as a starting point:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/markring/copilot-workflow-starter" rel="noopener noreferrer"&gt;github.com/markring/copilot-workflow-starter&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The repo includes working prompt files, issue templates, Copilot instructions, and the VS Code workspace settings. Clone it, create a few issues with &lt;code&gt;status:todo&lt;/code&gt; labels, and try &lt;code&gt;/next-issue&lt;/code&gt; in Copilot Chat to see the workflow in action.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.2 In VS Code Copilot Chat
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open Copilot Chat (Ctrl+Shift+I / Cmd+Shift+I)&lt;/li&gt;
&lt;li&gt;Make sure you're in &lt;strong&gt;Agent mode&lt;/strong&gt; (select from the mode dropdown)&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;/next-issue&lt;/code&gt; and press Enter&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Copilot reads the prompt file, runs &lt;code&gt;gh issue list&lt;/code&gt; in the integrated terminal, presents the issue, and asks for confirmation. Once confirmed, it creates a branch, reads the codebase, and starts implementing.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.3 Getting the settings right
&lt;/h3&gt;

&lt;p&gt;This is where most people get stuck. The prompt files are the easy part. The VS Code settings are what make the workflow actually run hands-free.&lt;/p&gt;

&lt;p&gt;We discovered this the hard way. Our first attempt used &lt;code&gt;tools: ['terminal', 'search/codebase']&lt;/code&gt; in the prompt file frontmatter. Copilot responded with "I don't have terminal tools available." The internal tool names in VS Code (like &lt;code&gt;execute/runInTerminal&lt;/code&gt;) don't match anything in the documentation, and they change between versions. Switching to &lt;code&gt;tools: ['*']&lt;/code&gt; fixed it immediately.&lt;/p&gt;

&lt;p&gt;The next issue: Copilot could run terminal commands but couldn't edit files. Because we'd only listed terminal tools, file editing wasn't available. Again, &lt;code&gt;tools: ['*']&lt;/code&gt; solved this by granting access to everything.&lt;/p&gt;

&lt;p&gt;Even after the prompt files were correct, Copilot kept asking "please run this command in your terminal" instead of running it. This required two user-level settings:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;chat.tools.terminal.enableAutoApprove&lt;/code&gt; set to &lt;code&gt;true&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;chat.tools.terminal.autoApprove&lt;/code&gt; with &lt;code&gt;{ "gh": true }&lt;/code&gt; to specifically auto-approve &lt;code&gt;gh&lt;/code&gt; commands&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These are user-level settings (not workspace), so they don't go in &lt;code&gt;.vscode/settings.json&lt;/code&gt;. Set them via File &amp;gt; Preferences &amp;gt; Settings and search for "terminal auto approve."&lt;/p&gt;

&lt;p&gt;Once all three pieces were in place - &lt;code&gt;tools: ['*']&lt;/code&gt; in prompt files, workspace settings for prompt file and instruction file support, and user-level settings for terminal auto-approval - Copilot picked up an issue, created a branch, implemented the feature, and created a PR without manual intervention.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.4 Confirmation and trust settings
&lt;/h3&gt;

&lt;p&gt;In VS Code agent mode, Copilot asks for confirmation before running terminal commands. The permission levels are:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Setting&lt;/th&gt;
&lt;th&gt;Behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Default&lt;/td&gt;
&lt;td&gt;Confirm each tool call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bypass Approvals&lt;/td&gt;
&lt;td&gt;Auto-approve all tool calls without dialogs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Autopilot (Preview)&lt;/td&gt;
&lt;td&gt;Auto-approve everything, auto-respond to questions, work until done&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For the issue workflow, you'll want at minimum the terminal auto-approve settings from section 4.3 so Copilot can run &lt;code&gt;gh&lt;/code&gt; commands without prompting each time.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Tying It All Together: The Instruction File Chain
&lt;/h2&gt;

&lt;p&gt;For Copilot to implement well, it needs more than just the issue. Your project's &lt;code&gt;.github/&lt;/code&gt; directory should have a layered configuration:&lt;/p&gt;

&lt;h3&gt;
  
  
  7.1 The four layers
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;your-repo/
  .github/
    copilot-instructions.md                    # Layer 1: Global rules (always loaded)
    instructions/
      api-controllers.instructions.md          # Layer 2: Scoped rules (loaded by file path)
      domain-entities.instructions.md
      infrastructure-data.instructions.md
      testing.instructions.md
    prompts/
      next-issue.prompt.md                     # Layer 3: Workflow prompts (invoked manually)
      start-issue.prompt.md
      close-issue.prompt.md
      standup.prompt.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Plus &lt;strong&gt;Layer 4: The issue body&lt;/strong&gt; - the specific task with acceptance criteria, loaded at runtime by the prompt file via &lt;code&gt;gh issue view&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  7.2 What each layer does
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Loaded&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;copilot-instructions.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Automatically, every session&lt;/td&gt;
&lt;td&gt;Architecture, naming, libraries, team conventions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*.instructions.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Automatically, by file path glob&lt;/td&gt;
&lt;td&gt;Layer-specific rules (controllers vs. domain vs. tests)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*.prompt.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Manually, via &lt;code&gt;/slash-command&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Workflow automation (fetch issue, create branch, create PR)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Issue body&lt;/td&gt;
&lt;td&gt;At runtime, via &lt;code&gt;gh issue view&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Specific task scope, acceptance criteria, non-goals&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The instruction files handle code quality. The prompt files handle workflow. The issue handles scope. Each layer has a distinct job, and Copilot applies all of them together.&lt;/p&gt;

&lt;h3&gt;
  
  
  7.3 How it plays out
&lt;/h3&gt;

&lt;p&gt;When you type &lt;code&gt;/next-issue&lt;/code&gt; in Copilot Chat:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copilot loads your &lt;code&gt;copilot-instructions.md&lt;/code&gt; (knows your architecture)&lt;/li&gt;
&lt;li&gt;Copilot runs the prompt file (fetches the issue via &lt;code&gt;gh&lt;/code&gt;, creates branch)&lt;/li&gt;
&lt;li&gt;Copilot reads the issue body (knows what to build and what not to build)&lt;/li&gt;
&lt;li&gt;Copilot starts editing files - scoped &lt;code&gt;.instructions.md&lt;/code&gt; files activate based on which files it touches&lt;/li&gt;
&lt;li&gt;The result: code that follows your conventions, implements the issue's acceptance criteria, and stays within scope&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  8. Practical Patterns
&lt;/h2&gt;

&lt;h3&gt;
  
  
  8.1 Issue templates for consistency
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;.github/ISSUE_TEMPLATE/feature.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Feature Request&lt;/span&gt;
&lt;span class="na"&gt;about&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Propose a new feature&lt;/span&gt;
&lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;type:feature, status:todo&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gu"&gt;## Description&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;!-- What should this feature do and why does it matter? --&amp;gt;&lt;/span&gt;

&lt;span class="gu"&gt;## Acceptance Criteria&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [ ] &lt;span class="c"&gt;&amp;lt;!-- Testable outcome 1 --&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [ ] &lt;span class="c"&gt;&amp;lt;!-- Testable outcome 2 --&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [ ] &lt;span class="c"&gt;&amp;lt;!-- Testable outcome 3 --&amp;gt;&lt;/span&gt;

&lt;span class="gu"&gt;## Non-Goals&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- What is explicitly out of scope? --&amp;gt;&lt;/span&gt;

&lt;span class="gu"&gt;## Context&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;!-- Related issues, discussions, or prior art --&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures every issue follows the structure that Copilot can reliably parse and work through.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.2 Conventional commits tied to issues
&lt;/h3&gt;

&lt;p&gt;Link every commit to an issue for full traceability:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"feat(orders): add pagination query parameters (#42)"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Format: &lt;code&gt;&amp;lt;type&amp;gt;(&amp;lt;scope&amp;gt;): &amp;lt;description&amp;gt; (#issue)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Types: &lt;code&gt;feat&lt;/code&gt;, &lt;code&gt;fix&lt;/code&gt;, &lt;code&gt;docs&lt;/code&gt;, &lt;code&gt;refactor&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt;, &lt;code&gt;chore&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;/close-issue&lt;/code&gt; prompt automatically uses this format when creating PRs.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.3 Bulk issue creation for sprint planning
&lt;/h3&gt;

&lt;p&gt;When bootstrapping a sprint, create issues in bulk:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh issue create &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"Set up EF Core DbContext and migrations"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"type:feature"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"status:todo"&lt;/span&gt; &lt;span class="nt"&gt;--milestone&lt;/span&gt; &lt;span class="s2"&gt;"Sprint 1"&lt;/span&gt;
gh issue create &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"Implement OrderRepository with CRUD operations"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"type:feature"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"status:todo"&lt;/span&gt; &lt;span class="nt"&gt;--milestone&lt;/span&gt; &lt;span class="s2"&gt;"Sprint 1"&lt;/span&gt;
gh issue create &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"Add FluentValidation for CreateOrderCommand"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"type:feature"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"status:todo"&lt;/span&gt; &lt;span class="nt"&gt;--milestone&lt;/span&gt; &lt;span class="s2"&gt;"Sprint 1"&lt;/span&gt;
gh issue create &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"Set up xUnit integration tests with WebApplicationFactory"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"type:test"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"status:todo"&lt;/span&gt; &lt;span class="nt"&gt;--milestone&lt;/span&gt; &lt;span class="s2"&gt;"Sprint 1"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or script it from a file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'|'&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; title labels&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;gh issue create &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$title&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--label&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$labels&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--milestone&lt;/span&gt; &lt;span class="s2"&gt;"Sprint 1"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt; &amp;lt; sprint-issues.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  8.4 A prompt for breaking down large issues
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;.github/prompts/break-down-issue.prompt.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Break&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;large&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;issue&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;into&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;smaller,&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;implementable&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;sub-issues'&lt;/span&gt;
&lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;agent'&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;*'&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

Break down issue #${input:issueNumber:Issue number} into smaller sub-issues.
&lt;span class="p"&gt;
1.&lt;/span&gt; Run in terminal: gh issue view ${input:issueNumber} --json title,body
&lt;span class="p"&gt;2.&lt;/span&gt; Read the description and acceptance criteria
&lt;span class="p"&gt;3.&lt;/span&gt; Search the codebase to understand the scope of changes needed
&lt;span class="p"&gt;4.&lt;/span&gt; Propose a breakdown of 3-6 smaller issues, each with:
&lt;span class="p"&gt;   -&lt;/span&gt; A clear title: "PARENT_TITLE - SPECIFIC_PIECE"
&lt;span class="p"&gt;   -&lt;/span&gt; 2-4 acceptance criteria checkboxes
&lt;span class="p"&gt;   -&lt;/span&gt; A reference to the parent issue
&lt;span class="p"&gt;5.&lt;/span&gt; Ask me to review the breakdown before creating anything
&lt;span class="p"&gt;6.&lt;/span&gt; Once I approve, create each sub-issue using gh issue create
&lt;span class="p"&gt;7.&lt;/span&gt; Add a comment on the parent issue listing the sub-issues created
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  8.5 A prompt for reviewing issue history
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;.github/prompts/issue-context.prompt.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Load&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;full&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;context&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;an&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;issue&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;including&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;comments&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;and&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;related&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;issues'&lt;/span&gt;
&lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ask'&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;*'&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

Load the full context for issue #${input:issueNumber:Issue number}.

Run these commands in the terminal:
&lt;span class="p"&gt;
1.&lt;/span&gt; gh issue view ${input:issueNumber} --json number,title,body,labels,assignees,milestone,comments
&lt;span class="p"&gt;2.&lt;/span&gt; gh issue list --search "is:issue mentions:${input:issueNumber}" --json number,title,state

Summarize:
&lt;span class="p"&gt;-&lt;/span&gt; What the issue is about
&lt;span class="p"&gt;-&lt;/span&gt; Current status (labels, assignee)
&lt;span class="p"&gt;-&lt;/span&gt; Key decisions from comments
&lt;span class="p"&gt;-&lt;/span&gt; Related issues and their state
&lt;span class="p"&gt;-&lt;/span&gt; Any blockers or dependencies mentioned
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that this prompt uses &lt;code&gt;agent: 'ask'&lt;/code&gt; - it only reads and summarizes, it doesn't make changes. Use this when you want context without starting work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The tools here aren't new. GitHub Issues, &lt;code&gt;gh&lt;/code&gt; CLI, and Copilot Chat have been around. What's new is wiring them together so Copilot operates with full context instead of starting from zero every session.&lt;/p&gt;

&lt;p&gt;The real work is in the issues. Well-structured acceptance criteria, clear non-goals, decision history in comments - that's what makes the automation useful rather than just fast. A prompt file can fetch an issue and create a branch in seconds. Whether the implementation is any good depends on what you wrote in the issue body.&lt;/p&gt;

&lt;p&gt;To get started, clone the &lt;a href="https://github.com/markring/copilot-workflow-starter" rel="noopener noreferrer"&gt;copilot-workflow-starter&lt;/a&gt; repository. It has working prompt files, issue templates, and the VS Code settings already configured. Create a few issues, label them &lt;code&gt;status:todo&lt;/code&gt;, and type &lt;code&gt;/next-issue&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>githubcopilot</category>
      <category>vscode</category>
      <category>developerworkflows</category>
      <category>aiassisteddevelopment</category>
    </item>
    <item>
      <title>Getting Started with GitHub Copilot in VS Code</title>
      <dc:creator>markring</dc:creator>
      <pubDate>Sun, 22 Mar 2026 02:45:32 +0000</pubDate>
      <link>https://dev.to/markring/getting-started-with-github-copilot-in-vs-code-for-c-developers-53o0</link>
      <guid>https://dev.to/markring/getting-started-with-github-copilot-in-vs-code-for-c-developers-53o0</guid>
      <description>&lt;p&gt;&lt;em&gt;A practical guide to configuration, scoped instructions, and AI-assisted workflows for .NET projects&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;.github/&lt;/code&gt; Configuration Ecosystem&lt;/li&gt;
&lt;li&gt;Scoped Instructions with &lt;code&gt;.instructions.md&lt;/code&gt; Files&lt;/li&gt;
&lt;li&gt;Using a High-Reasoning Model to Bootstrap Your Configuration&lt;/li&gt;
&lt;li&gt;Prerequisites and Environment Setup&lt;/li&gt;
&lt;li&gt;Working with Copilot in C#&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this guide, we will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explain how to use &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt; and scoped &lt;code&gt;.instructions.md&lt;/code&gt; files to guide Copilot's behavior.&lt;/li&gt;
&lt;li&gt;Show how to use a high-reasoning model like Claude Opus to help you design your Copilot configuration.&lt;/li&gt;
&lt;li&gt;Walk through the environment setup for GitHub Copilot in Visual Studio Code for C# development.&lt;/li&gt;
&lt;li&gt;Provide a workflow template tailored to .NET projects.&lt;/li&gt;
&lt;li&gt;Share practical advice for using Copilot effectively in a C# environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHub Copilot can dramatically accelerate your .NET development workflow when paired with the right project structure and clear instructions. This guide shows you exactly how to get started and how to shape Copilot's output to match your standards.&lt;/p&gt;

&lt;p&gt;The most impactful thing you can do isn't installing extensions or learning shortcuts - it's giving Copilot explicit, scoped instructions about your architecture. We start there.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The &lt;code&gt;.github/&lt;/code&gt; Configuration Ecosystem
&lt;/h2&gt;

&lt;h3&gt;
  
  
  2.1 What is &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt; file is a project-level configuration file that tells GitHub Copilot how to behave in your repository. It acts as a style and architecture guide that Copilot uses to generate code aligned with your standards. This file is automatically loaded into every Copilot interaction within your repo.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.2 The full &lt;code&gt;.github/&lt;/code&gt; file hierarchy
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;your-repo/
  .github/
    copilot-instructions.md                    # Global rules (always active)
    instructions/
      api-controllers.instructions.md          # Scoped: controller layer
      application-handlers.instructions.md     # Scoped: CQRS/MediatR
      domain-entities.instructions.md          # Scoped: domain model
      infrastructure-data.instructions.md      # Scoped: data access
      testing.instructions.md                  # Scoped: test projects
    agents/
      generate-entity.agent.md                 # Custom agent profiles
      review-pr.agent.md
  AGENTS.md                                    # Open standard for coding agents
  src/
  tests/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Scope&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;copilot-instructions.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Global&lt;/td&gt;
&lt;td&gt;Architecture, conventions, libraries - applies everywhere&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;instructions/*.instructions.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Targeted via glob&lt;/td&gt;
&lt;td&gt;Layer-specific rules activated by file path&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;agents/*.agent.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;On-demand&lt;/td&gt;
&lt;td&gt;Custom agent profiles with specialized tools and prompts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Global&lt;/td&gt;
&lt;td&gt;Open standard, works with Copilot, Claude Code, and others&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  2.3 What to include in global instructions
&lt;/h3&gt;

&lt;p&gt;Your &lt;code&gt;copilot-instructions.md&lt;/code&gt; should cover these areas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Project overview&lt;/strong&gt; - Architecture pattern, layers, key libraries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coding standards&lt;/strong&gt; - Naming, async/await rules, formatting preferences&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture guidelines&lt;/strong&gt; - Where logic lives, dependency direction, patterns like CQRS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Libraries and patterns&lt;/strong&gt; - Which packages to use (and which to avoid)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security and performance&lt;/strong&gt; - What not to log, async anti-patterns, injection prevention&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation&lt;/strong&gt; - XML doc expectations, comment style&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is a complete example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Copilot Instructions for This Repository&lt;/span&gt;

&lt;span class="gu"&gt;## Project Overview&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; This is a C#/.NET 8 REST API for managing customer orders.
&lt;span class="p"&gt;-&lt;/span&gt; We follow Clean Architecture with separate layers: API, Application, Domain, Infrastructure.
&lt;span class="p"&gt;-&lt;/span&gt; We use Entity Framework Core, MediatR, FluentValidation, and AutoMapper.

&lt;span class="gu"&gt;## Coding Standards&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Use async/await for I/O-bound operations.
&lt;span class="p"&gt;-&lt;/span&gt; Prefer dependency injection over static classes.
&lt;span class="p"&gt;-&lt;/span&gt; Use PascalCase for classes, methods, and public properties.
&lt;span class="p"&gt;-&lt;/span&gt; Use camelCase for local variables and method parameters.
&lt;span class="p"&gt;-&lt;/span&gt; Use expression-bodied members for simple properties and methods when it improves readability.

&lt;span class="gu"&gt;## Architecture Guidelines&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Controllers should be thin and delegate work to Application layer handlers.
&lt;span class="p"&gt;-&lt;/span&gt; Use MediatR for commands and queries.
&lt;span class="p"&gt;-&lt;/span&gt; Domain entities should not depend on infrastructure or external services.
&lt;span class="p"&gt;-&lt;/span&gt; Repositories live in the Infrastructure layer and implement domain interfaces.
&lt;span class="p"&gt;-&lt;/span&gt; Avoid placing business logic in controllers or DbContext.

&lt;span class="gu"&gt;## Libraries and Patterns&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Use Entity Framework Core for data access.
&lt;span class="p"&gt;-&lt;/span&gt; Use FluentValidation for input validation.
&lt;span class="p"&gt;-&lt;/span&gt; Use AutoMapper for mapping between DTOs and domain models.
&lt;span class="p"&gt;-&lt;/span&gt; Prefer LINQ over manual loops when querying collections.
&lt;span class="p"&gt;-&lt;/span&gt; Use ILogger&lt;span class="nt"&gt;&amp;lt;T&amp;gt;&lt;/span&gt; for logging.

&lt;span class="gu"&gt;## Security and Performance&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Do not log sensitive information (passwords, tokens, PII).
&lt;span class="p"&gt;-&lt;/span&gt; Avoid synchronous blocking calls in async code (no .Result or .Wait()).
&lt;span class="p"&gt;-&lt;/span&gt; Use parameterized queries or EF Core to avoid SQL injection.
&lt;span class="p"&gt;-&lt;/span&gt; Use CancellationToken in async methods where appropriate.

&lt;span class="gu"&gt;## Documentation&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Use XML documentation comments for public classes and methods.
&lt;span class="p"&gt;-&lt;/span&gt; Include &lt;span class="nt"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;, &lt;span class="nt"&gt;&amp;lt;param&amp;gt;&lt;/span&gt;, and &lt;span class="nt"&gt;&amp;lt;returns&amp;gt;&lt;/span&gt; tags.
&lt;span class="p"&gt;-&lt;/span&gt; Keep comments concise and focused on intent.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2.4 How global instructions improve Copilot's output
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Produces code aligned with your architecture (e.g., MediatR handlers instead of controller logic).&lt;/li&gt;
&lt;li&gt;Reduces irrelevant suggestions and random library usage.&lt;/li&gt;
&lt;li&gt;Helps new contributors follow project conventions.&lt;/li&gt;
&lt;li&gt;Encourages consistent patterns across the codebase.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2.5 Maintaining global instructions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Update them when your architecture evolves.&lt;/li&gt;
&lt;li&gt;Add new conventions as your team adopts them.&lt;/li&gt;
&lt;li&gt;Remove outdated guidance to avoid confusion.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Scoped Instructions with &lt;code&gt;.instructions.md&lt;/code&gt; Files
&lt;/h2&gt;

&lt;h3&gt;
  
  
  3.1 Why scoped instructions matter
&lt;/h3&gt;

&lt;p&gt;The global &lt;code&gt;copilot-instructions.md&lt;/code&gt; file applies everywhere, but real projects have different rules for different layers. Your Domain layer operates under different conventions than Infrastructure. Test projects follow distinct patterns from production code. Scoped instructions let you target specific directories and file types with tailored guidance.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2 How scoped instructions work
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;.instructions.md&lt;/code&gt; files under &lt;code&gt;.github/instructions/&lt;/code&gt;. Each file uses YAML frontmatter with an &lt;code&gt;applyTo&lt;/code&gt; glob pattern that tells Copilot when to activate those instructions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;your-repo/
  .github/
    copilot-instructions.md                    # Global rules
    instructions/
      api-controllers.instructions.md          # Controller layer rules
      application-handlers.instructions.md     # CQRS/MediatR rules
      domain-entities.instructions.md          # Domain model rules
      infrastructure-data.instructions.md      # Data access rules
      testing.instructions.md                  # Test project rules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.3 Example: Controller layer instructions
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;applyTo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/Controllers/**/*.cs"&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gu"&gt;## Controller Guidelines&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Controllers must be thin. No business logic - delegate to MediatR handlers.
&lt;span class="p"&gt;-&lt;/span&gt; Every action method must return &lt;span class="sb"&gt;`ActionResult&amp;lt;T&amp;gt;`&lt;/span&gt; or &lt;span class="sb"&gt;`IActionResult`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; Use &lt;span class="sb"&gt;`[ApiController]`&lt;/span&gt; and &lt;span class="sb"&gt;`[Route("api/[controller]")]`&lt;/span&gt; attributes.
&lt;span class="p"&gt;-&lt;/span&gt; Apply rate limiting via &lt;span class="sb"&gt;`[EnableRateLimiting("PolicyName")]`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; Validate input at the handler level using FluentValidation, not in controllers.
&lt;span class="p"&gt;-&lt;/span&gt; Use constructor injection for dependencies. Maximum 3 injected services per controller.
&lt;span class="p"&gt;-&lt;/span&gt; Return appropriate HTTP status codes: 200 for success, 201 for creation, 204 for delete, 400 for validation errors, 404 for not found.
&lt;span class="p"&gt;-&lt;/span&gt; Async all the way - every action method should be async and return a Task.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.4 Example: Domain entity instructions
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;applyTo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/Domain/**/*.cs"&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gu"&gt;## Domain Layer Guidelines&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Domain entities must have ZERO dependencies on Infrastructure, Application, or external packages.
&lt;span class="p"&gt;-&lt;/span&gt; Use private setters on entity properties. Expose behavior through methods.
&lt;span class="p"&gt;-&lt;/span&gt; Value objects should override Equals and GetHashCode.
&lt;span class="p"&gt;-&lt;/span&gt; Enums belong in the Domain layer, adjacent to the entities that use them.
&lt;span class="p"&gt;-&lt;/span&gt; No EF Core attributes on domain entities - use fluent configuration in Infrastructure.
&lt;span class="p"&gt;-&lt;/span&gt; Domain exceptions should inherit from a base DomainException class.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.5 Example: Data access instructions
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;applyTo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/Infrastructure/**/*.cs"&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gu"&gt;## Infrastructure Layer Guidelines&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Use Entity Framework Core for writes and complex queries.
&lt;span class="p"&gt;-&lt;/span&gt; Use Dapper for read-optimized queries (reports, list endpoints, dashboards).
&lt;span class="p"&gt;-&lt;/span&gt; Repository interfaces are defined in Domain. Implementations live here.
&lt;span class="p"&gt;-&lt;/span&gt; EF entity configurations go in separate &lt;span class="sb"&gt;`EntityNameConfiguration.cs`&lt;/span&gt; files using &lt;span class="sb"&gt;`IEntityTypeConfiguration&amp;lt;T&amp;gt;`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; Connection strings come from IConfiguration, never hardcoded.
&lt;span class="p"&gt;-&lt;/span&gt; Always use async methods: &lt;span class="sb"&gt;`ToListAsync()`&lt;/span&gt;, &lt;span class="sb"&gt;`FirstOrDefaultAsync()`&lt;/span&gt;, &lt;span class="sb"&gt;`SaveChangesAsync()`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; Use &lt;span class="sb"&gt;`CancellationToken`&lt;/span&gt; in all async data access methods.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.6 Example: Test project instructions
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;applyTo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/*Tests*/**/*.cs"&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gu"&gt;## Testing Guidelines&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Use xUnit for all tests.
&lt;span class="p"&gt;-&lt;/span&gt; Name test methods: &lt;span class="sb"&gt;`MethodName_Scenario_ExpectedResult`&lt;/span&gt; (e.g., &lt;span class="sb"&gt;`Create_ValidOrder_ReturnsSuccess`&lt;/span&gt;).
&lt;span class="p"&gt;-&lt;/span&gt; Use Arrange-Act-Assert pattern with clear section comments.
&lt;span class="p"&gt;-&lt;/span&gt; Use Moq for mocking interfaces.
&lt;span class="p"&gt;-&lt;/span&gt; Integration tests should use WebApplicationFactory and a real test database.
&lt;span class="p"&gt;-&lt;/span&gt; Do not mock the database in integration tests - use an in-memory PostgreSQL or SQLite provider.
&lt;span class="p"&gt;-&lt;/span&gt; One assertion per test method when possible.
&lt;span class="p"&gt;-&lt;/span&gt; Test class names should match the class under test: &lt;span class="sb"&gt;`OrderServiceTests`&lt;/span&gt; for &lt;span class="sb"&gt;`OrderService`&lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.7 Example: Application/handler instructions
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;applyTo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/Application/**/*.cs"&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gu"&gt;## Application Layer Guidelines&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Use MediatR for all commands and queries. No direct service calls from controllers.
&lt;span class="p"&gt;-&lt;/span&gt; Commands mutate state. Queries read state. Never mix them.
&lt;span class="p"&gt;-&lt;/span&gt; Every command/query gets its own handler class in its own file.
&lt;span class="p"&gt;-&lt;/span&gt; Use FluentValidation validators for input validation. One validator per command/query.
&lt;span class="p"&gt;-&lt;/span&gt; Return Result&lt;span class="nt"&gt;&amp;lt;T&amp;gt;&lt;/span&gt; from handlers, not exceptions, for expected failure cases.
&lt;span class="p"&gt;-&lt;/span&gt; DTOs live in the Application layer. Map from domain entities using explicit mapping methods.
&lt;span class="p"&gt;-&lt;/span&gt; Handler naming: &lt;span class="sb"&gt;`CreateOrderCommandHandler`&lt;/span&gt;, &lt;span class="sb"&gt;`GetOrderByIdQueryHandler`&lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.8 How scoped instructions layer together
&lt;/h3&gt;

&lt;p&gt;When you edit a file in &lt;code&gt;src/Infrastructure/Repositories/OrderRepository.cs&lt;/code&gt;, Copilot loads:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Global&lt;/strong&gt; - &lt;code&gt;copilot-instructions.md&lt;/code&gt; (always active)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scoped&lt;/strong&gt; - &lt;code&gt;infrastructure-data.instructions.md&lt;/code&gt; (matches the &lt;code&gt;**/Infrastructure/**&lt;/code&gt; glob)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The scoped instructions add specificity without contradicting the global rules. Think of it like CSS specificity: global sets the baseline, scoped overrides for context.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Using a High-Reasoning Model to Bootstrap Your Configuration
&lt;/h2&gt;

&lt;h3&gt;
  
  
  4.1 The bootstrapping problem
&lt;/h3&gt;

&lt;p&gt;Setting up &lt;code&gt;copilot-instructions.md&lt;/code&gt;, scoped &lt;code&gt;.instructions.md&lt;/code&gt; files, and custom agents for a real project is a significant amount of work. You need to articulate your architecture, conventions, patterns, and edge cases in a way that's clear enough for an AI to follow. Most developers either skip this step or write something too vague to be useful.&lt;/p&gt;

&lt;p&gt;This is where a high-reasoning model like &lt;strong&gt;Claude Opus&lt;/strong&gt; shines. Rather than writing all these configuration files by hand, you can use a powerful reasoning model to analyze your codebase and generate them for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.2 The workflow: AI configures AI
&lt;/h3&gt;

&lt;p&gt;The idea is simple: use a smarter, more expensive model for the one-time setup work, then let the faster, cheaper model execute day-to-day using the configuration the reasoning model created.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Let the reasoning model explore your codebase&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open your project in a tool like Claude Code (or any CLI that uses a high-reasoning model) and ask it to analyze your architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Analyze this codebase. Identify:
- The architecture pattern (Clean Architecture, layers, dependencies)
- Naming conventions actually used (not aspirational)
- Libraries and frameworks in use
- Testing patterns and frameworks
- Data access patterns
- Authentication approach
- Any inconsistencies or anti-patterns
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reasoning model reads your actual code - not what you think your code looks like, but what it actually is. It will catch inconsistencies you've forgotten about.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Generate the Copilot configuration files&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Based on your analysis, generate:
1. A .github/copilot-instructions.md file with global project rules
2. Scoped .instructions.md files for each architectural layer
3. Target the glob patterns to match our actual directory structure

The instructions should reflect what we actually do, not theoretical best practices.
Make them specific enough that Copilot produces code consistent with the existing codebase.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Review, refine, iterate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The reasoning model gives you a complete first draft. Review it, push back on anything that doesn't match your intent, and ask it to revise. This conversation is the valuable part - the model helps you articulate decisions you've made implicitly but never documented.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The infrastructure instructions mention Dapper, but we only use Dapper for reporting queries.
Regular reads still go through EF Core. Update the instructions to reflect that distinction.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4.3 Why this works
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;A reasoning model excels at the meta-work.&lt;/strong&gt; Writing instructions for another AI is fundamentally a reasoning and articulation task - exactly what models like Claude Opus are built for. You're not asking it to write production code (where Copilot is fine). You're asking it to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand architectural decisions and their implications&lt;/li&gt;
&lt;li&gt;Identify patterns across hundreds of files&lt;/li&gt;
&lt;li&gt;Express conventions precisely enough for another AI to follow&lt;/li&gt;
&lt;li&gt;Anticipate edge cases and ambiguities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Copilot excels at the execution.&lt;/strong&gt; Once the configuration files exist, Copilot's inline suggestions, chat, and agent mode all benefit from the precise, scoped instructions. You get the reasoning model's understanding embedded in every Copilot suggestion, without paying for the reasoning model on every keystroke.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.4 Practical example
&lt;/h3&gt;

&lt;p&gt;Here's what this looks like end-to-end. You have a .NET Clean Architecture project. You open it in Claude Code:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt; "I need to set up Copilot instructions for this repo. Analyze the codebase and generate the &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt; and scoped instruction files."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Opus:&lt;/strong&gt; &lt;em&gt;Reads your solution structure, scans your controllers, handlers, entities, repositories, tests. Identifies that you use MediatR but not AutoMapper (you use manual mapping). Notices your tests use xUnit with FluentAssertions but not Moq - you use NSubstitute. Sees that your domain entities use private constructors with factory methods.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It generates instruction files that reflect your actual codebase, not a generic template. The &lt;code&gt;domain-entities.instructions.md&lt;/code&gt; says "use private constructors with static factory methods" because that's what your code actually does.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You push the files to your repo.&lt;/strong&gt; Now every developer on the team, and Copilot, operates with the same understanding of your architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.5 Maintaining instructions over time
&lt;/h3&gt;

&lt;p&gt;Architectures evolve. When you make significant changes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the project in your reasoning model&lt;/li&gt;
&lt;li&gt;Ask it to diff the current instructions against the actual codebase&lt;/li&gt;
&lt;li&gt;Update the instructions to reflect the new reality
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Compare our .github/copilot-instructions.md and scoped instructions against the current codebase.
Flag any instructions that are outdated, contradicted by actual code, or missing.
Generate updated versions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This keeps your Copilot configuration honest. Dead instructions are worse than no instructions - they cause Copilot to generate code that fights your actual patterns.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.6 Cost perspective
&lt;/h3&gt;

&lt;p&gt;Using a reasoning model for setup is a one-time (or occasional) cost. You might spend $5-10 in API calls to fully analyze a large codebase and generate all your instruction files. Those files then improve every Copilot interaction for every developer on the team, indefinitely. The ROI is asymmetric: a small upfront investment in reasoning creates compounding returns in daily productivity.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Prerequisites and Environment Setup
&lt;/h2&gt;

&lt;p&gt;Before diving in, make sure your environment is ready.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.1 Required tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;.NET 8 SDK&lt;/strong&gt; (or later) installed and on your PATH&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Studio Code&lt;/strong&gt; with these extensions:

&lt;ul&gt;
&lt;li&gt;GitHub Copilot&lt;/li&gt;
&lt;li&gt;C# Dev Kit&lt;/li&gt;
&lt;li&gt;C# (ms-dotnettools.csharp)&lt;/li&gt;
&lt;li&gt;.NET Install Tool&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.2 Authenticating Copilot
&lt;/h3&gt;

&lt;p&gt;After installing the GitHub Copilot extension, VS Code prompts you to sign in with GitHub. Approve the authorization in your browser. Once authenticated, test it with a quick comment in any &lt;code&gt;.cs&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// create a method that calculates compound interest&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If Copilot suggests a full method implementation, you're good to go.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.3 Code style configuration
&lt;/h3&gt;

&lt;p&gt;If you don't already have an &lt;code&gt;.editorconfig&lt;/code&gt;, generate one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the Command Palette (&lt;code&gt;Ctrl+Shift+P&lt;/code&gt; / &lt;code&gt;Cmd+Shift+P&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Search for &lt;strong&gt;Generate .editorconfig&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;C#&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example &lt;code&gt;.editorconfig&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[*.cs]&lt;/span&gt;
&lt;span class="py"&gt;indent_style&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;space&lt;/span&gt;
&lt;span class="py"&gt;indent_size&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;4&lt;/span&gt;
&lt;span class="py"&gt;dotnet_style_prefer_auto_properties&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;true:suggestion&lt;/span&gt;
&lt;span class="py"&gt;dotnet_style_qualification_for_field&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;true:suggestion&lt;/span&gt;
&lt;span class="py"&gt;csharp_new_line_before_open_brace&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copilot follows these conventions when generating code, especially as your codebase grows.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Working with Copilot in C
&lt;/h2&gt;

&lt;h3&gt;
  
  
  6.1 A practical development loop
&lt;/h3&gt;

&lt;p&gt;When working with Copilot on C# code, a simple loop keeps you productive:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Plan&lt;/strong&gt; - Write a comment describing what you need&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate&lt;/strong&gt; - Accept or tab through Copilot's suggestion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review&lt;/strong&gt; - Check correctness, naming, and edge cases&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test&lt;/strong&gt; - Run the project or unit tests&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refine&lt;/strong&gt; - If the output is off, rephrase your comment and try again&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The key insight: your comment quality drives the output quality. Be specific about patterns you want.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Create an ICustomerRepository interface and CustomerRepository class&lt;/span&gt;
&lt;span class="c1"&gt;// using constructor injection for DbContext, with async CRUD methods&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A vague comment like &lt;code&gt;// customer stuff&lt;/code&gt; gives you vague code. A precise comment like the above gives you something close to production-ready.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.2 Using comments and documentation to steer output
&lt;/h3&gt;

&lt;p&gt;Guide Copilot with intent comments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// validate user input and return a list of error messages if invalid&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;XML documentation comments give Copilot even more to work with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
&lt;span class="c1"&gt;/// Calculates the total price including tax.&lt;/span&gt;
&lt;span class="c1"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
&lt;span class="c1"&gt;/// &amp;lt;param name="amount"&amp;gt;Base amount.&amp;lt;/param&amp;gt;&lt;/span&gt;
&lt;span class="c1"&gt;/// &amp;lt;param name="taxRate"&amp;gt;Tax rate as a decimal.&amp;lt;/param&amp;gt;&lt;/span&gt;
&lt;span class="c1"&gt;/// &amp;lt;returns&amp;gt;Total price including tax.&amp;lt;/returns&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;decimal&lt;/span&gt; &lt;span class="nf"&gt;CalculateTotal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;decimal&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;decimal&lt;/span&gt; &lt;span class="n"&gt;taxRate&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copilot uses these to infer intent and generate more accurate method bodies.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.3 Useful shortcuts
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Windows&lt;/th&gt;
&lt;th&gt;Mac&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Accept suggestion&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Tab&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Tab&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Trigger suggestion&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Alt+\&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Option+\&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Open Copilot Chat&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Ctrl+Shift+I&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Cmd+Shift+I&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  6.4 Where Copilot shines in C
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Boilerplate&lt;/strong&gt; - DTOs, interfaces, repository stubs, controller actions. Copilot handles repetitive structure well.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test scaffolding&lt;/strong&gt; - Write one test method, Copilot suggests the rest following your pattern.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LINQ expressions&lt;/strong&gt; - Describe the transformation in a comment, get a working query back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EF Core configurations&lt;/strong&gt; - Entity type configurations, migrations setup, DbContext registration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6.5 Where to watch out
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Outdated APIs&lt;/strong&gt; - Copilot may suggest deprecated .NET methods. Check the target framework.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Async anti-patterns&lt;/strong&gt; - Watch for &lt;code&gt;.Result&lt;/code&gt;, &lt;code&gt;.Wait()&lt;/code&gt;, or missing &lt;code&gt;await&lt;/code&gt; in generated code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security-sensitive code&lt;/strong&gt; - Never trust Copilot output for authentication, authorization, or raw SQL without careful review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Over-engineering&lt;/strong&gt; - Copilot sometimes adds abstractions you didn't ask for. Keep it simple.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use Roslyn analyzers, run your tests, and treat every suggestion as a draft - not a final answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;GitHub Copilot becomes significantly more powerful when paired with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A well-structured &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt; file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scoped &lt;code&gt;.instructions.md&lt;/code&gt; files&lt;/strong&gt; that give Copilot layer-specific guidance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A high-reasoning model&lt;/strong&gt; to bootstrap and maintain your configuration&lt;/li&gt;
&lt;li&gt;Clear C# coding standards and a deliberate workflow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key insight is that &lt;strong&gt;AI tools work best when they work together&lt;/strong&gt;. Use a reasoning model like Claude Opus to do the hard thinking - analyzing your architecture, articulating your conventions, and generating precise instructions. Then let Copilot execute against those instructions thousands of times a day. The reasoning model is the architect; Copilot is the builder. Together, they're far more effective than either one alone.&lt;/p&gt;

&lt;p&gt;By defining your standards and giving Copilot explicit, scoped instructions, you transform it from a generic autocomplete tool into a project-aware assistant that genuinely understands your .NET ecosystem.&lt;/p&gt;

</description>
      <category>githubcopilot</category>
      <category>vscode</category>
      <category>c</category>
    </item>
    <item>
      <title>Leveraging GitHub Copilot CLI for Developer Productivity</title>
      <dc:creator>markring</dc:creator>
      <pubDate>Sun, 22 Mar 2026 02:41:27 +0000</pubDate>
      <link>https://dev.to/markring/leveraging-github-copilot-cli-for-developer-productivity-2f4l</link>
      <guid>https://dev.to/markring/leveraging-github-copilot-cli-for-developer-productivity-2f4l</guid>
      <description>&lt;p&gt;&lt;em&gt;A practical guide to agentic coding, custom agents, and workflow automation from the terminal&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Installation and Setup&lt;/li&gt;
&lt;li&gt;Interactive Mode and Slash Commands&lt;/li&gt;
&lt;li&gt;Operational Modes: Plan and Autopilot&lt;/li&gt;
&lt;li&gt;Custom Agents&lt;/li&gt;
&lt;li&gt;MCP Server Integration&lt;/li&gt;
&lt;li&gt;Connecting to Your Project Configuration&lt;/li&gt;
&lt;li&gt;Practical Workflows&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;GitHub Copilot CLI brings agentic coding directly to your terminal. It reached general availability in early 2026 and is available to all paid Copilot subscribers.&lt;/p&gt;

&lt;p&gt;This isn't the old &lt;code&gt;gh copilot suggest&lt;/code&gt; extension. Copilot CLI is a standalone tool that can read your codebase, edit files, run commands, create pull requests, and delegate work to specialized agents - all from an interactive terminal session.&lt;/p&gt;

&lt;p&gt;This guide covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to install, authenticate, and configure Copilot CLI&lt;/li&gt;
&lt;li&gt;The slash command system that controls sessions, models, and tools&lt;/li&gt;
&lt;li&gt;Plan mode vs. autopilot mode and when to use each&lt;/li&gt;
&lt;li&gt;Creating custom agents for repeatable workflows&lt;/li&gt;
&lt;li&gt;Connecting MCP servers for external tool integration&lt;/li&gt;
&lt;li&gt;How your existing &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt; and &lt;code&gt;AGENTS.md&lt;/code&gt; files carry over&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've already set up project-level Copilot instructions (see the companion post on configuring Copilot for C# projects), Copilot CLI picks those up automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Installation and Setup
&lt;/h2&gt;

&lt;h3&gt;
  
  
  2.1 Installation options
&lt;/h3&gt;

&lt;p&gt;Copilot CLI can be installed via multiple package managers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;npm (all platforms):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @github/copilot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Homebrew (macOS/Linux):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;github/copilot-cli/copilot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;WinGet (Windows):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;winget &lt;span class="nb"&gt;install &lt;/span&gt;GitHub.CopilotCLI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Via GitHub CLI:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you already have &lt;code&gt;gh&lt;/code&gt; installed, you can run &lt;code&gt;gh copilot&lt;/code&gt; to install and launch Copilot CLI directly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node.js 22 or later&lt;/li&gt;
&lt;li&gt;An active GitHub Copilot subscription (Individual, Business, or Enterprise)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2.2 Authentication
&lt;/h3&gt;

&lt;p&gt;On first launch, Copilot CLI prompts you to authenticate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;copilot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the interactive session, use &lt;code&gt;/login&lt;/code&gt; and follow the device flow in your browser. Alternatively, set a fine-grained personal access token with the "Copilot Requests" permission:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GH_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_token_here
copilot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2.3 First run
&lt;/h3&gt;

&lt;p&gt;Navigate to a project directory and launch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/projects/my-api
copilot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copilot CLI automatically detects your project structure, reads any instruction files, and starts an interactive session. Type a natural language prompt or a slash command to get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Interactive Mode and Slash Commands
&lt;/h2&gt;

&lt;p&gt;Slash commands are directives prefixed with &lt;code&gt;/&lt;/code&gt; that control session state, model selection, permissions, and integrations. They don't invoke the AI model - they configure it.&lt;/p&gt;

&lt;p&gt;Type &lt;code&gt;/help&lt;/code&gt; to see all available commands, or &lt;code&gt;/&lt;/code&gt; and press Tab for autocomplete.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.1 Session management
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/clear&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reset conversation history (use when switching tasks)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/compact&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Compress history to free up context window&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/session&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Show session ID, duration, and code changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/usage&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Display API usage metrics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/rename NAME&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Rename the current session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/resume SESSION-ID&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Switch to a different session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/share file PATH&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Export session to a markdown file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/share gist&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Export session to a GitHub gist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/exit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;End the session&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  3.2 Directory and file access
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/cwd PATH&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Change working directory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/add-dir PATH&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Grant access to an additional directory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/list-dirs&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Show all directories Copilot can access&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;By default, Copilot CLI has access to the directory you launched from. Use &lt;code&gt;/add-dir&lt;/code&gt; to grant access to related directories (e.g., a shared library repo) without restarting your session.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.3 Model selection
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/model&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List available models and select one&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/model MODEL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Switch directly to a specific model&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Available models include GPT-5 mini, GPT-4.1, Claude Sonnet, Claude Opus, and Gemini 3 Pro. GPT-5 mini and GPT-4.1 are included with your subscription and don't consume premium requests.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.4 Permissions and tools
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/allow-all&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Enable all permissions (tools, paths, URLs)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/reset-allowed-tools&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reset tool permissions to defaults&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Copilot CLI asks for confirmation before making file changes or running commands. For trusted workflows, &lt;code&gt;/allow-all&lt;/code&gt; (also aliased as &lt;code&gt;/yolo&lt;/code&gt;) skips all confirmation prompts.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.5 External integrations
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/mcp show&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List configured MCP servers and status&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/mcp add&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Add a new MCP server interactively&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/agent&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Browse and select from available agents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/delegate PROMPT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create a pull request from a natural language prompt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/ide&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Connect to a VS Code workspace&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  4. Operational Modes: Plan and Autopilot
&lt;/h2&gt;

&lt;p&gt;Copilot CLI has two distinct modes for how it handles work.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.1 Plan mode
&lt;/h3&gt;

&lt;p&gt;Activate with &lt;code&gt;/plan&lt;/code&gt; followed by your prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/plan Add pagination to the GET /api/orders endpoint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In plan mode, Copilot:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Analyzes your request and asks clarifying questions&lt;/li&gt;
&lt;li&gt;Reads relevant files in your codebase&lt;/li&gt;
&lt;li&gt;Produces a step-by-step implementation plan&lt;/li&gt;
&lt;li&gt;Waits for your approval before making any changes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is the right mode when you want oversight. Use it for architectural changes, unfamiliar codebases, or anything touching authentication/authorization.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.2 Autopilot mode
&lt;/h3&gt;

&lt;p&gt;For hands-off execution, use the &lt;code&gt;--yolo&lt;/code&gt; flag at launch or &lt;code&gt;/allow-all&lt;/code&gt; in an active session. In autopilot, Copilot:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reads your prompt&lt;/li&gt;
&lt;li&gt;Executes tools, edits files, and runs commands autonomously&lt;/li&gt;
&lt;li&gt;Iterates on failures without stopping for approval&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Use autopilot for well-understood tasks: scaffolding boilerplate, running and fixing tests, formatting/refactoring, or generating migration files.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.3 Choosing the right mode
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;New feature in unfamiliar code&lt;/td&gt;
&lt;td&gt;Plan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Refactoring a well-tested module&lt;/td&gt;
&lt;td&gt;Autopilot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security-sensitive changes&lt;/td&gt;
&lt;td&gt;Plan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scaffolding a new controller/service&lt;/td&gt;
&lt;td&gt;Autopilot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Debugging a failing test&lt;/td&gt;
&lt;td&gt;Either - start with plan, switch to autopilot once you understand the issue&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  5. Custom Agents
&lt;/h2&gt;

&lt;p&gt;Custom agents let you define specialized roles with specific expertise, tool access, and instructions.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.1 Agent profile structure
&lt;/h3&gt;

&lt;p&gt;Agents are defined as &lt;code&gt;.agent.md&lt;/code&gt; files with YAML frontmatter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;api-scaffolder&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Scaffolds new API endpoints following Clean Architecture conventions&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;edit&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;search&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;bash&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gu"&gt;## Instructions&lt;/span&gt;

You are an API scaffolding assistant for a .NET 8 Clean Architecture project.

When asked to create a new endpoint:
&lt;span class="p"&gt;
1.&lt;/span&gt; Create the command/query record in Application/Features/{Entity}/
&lt;span class="p"&gt;2.&lt;/span&gt; Create the handler in the same directory
&lt;span class="p"&gt;3.&lt;/span&gt; Create the FluentValidation validator
&lt;span class="p"&gt;4.&lt;/span&gt; Add the controller action in API/Controllers/{Entity}Controller.cs
&lt;span class="p"&gt;5.&lt;/span&gt; Create the DTO in Application/DTOs/

Follow these conventions:
&lt;span class="p"&gt;-&lt;/span&gt; Use MediatR for all commands and queries
&lt;span class="p"&gt;-&lt;/span&gt; Async all the way - every method returns Task
&lt;span class="p"&gt;-&lt;/span&gt; Use CancellationToken in all async signatures
&lt;span class="p"&gt;-&lt;/span&gt; Return ActionResult&lt;span class="nt"&gt;&amp;lt;T&amp;gt;&lt;/span&gt; from controller actions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5.2 Where to place agent profiles
&lt;/h3&gt;

&lt;p&gt;Agent profiles can live in several locations:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Location&lt;/th&gt;
&lt;th&gt;Scope&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.github/agents/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Repository-level, shared with team&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;~/.copilot/agents/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Personal, applies across all projects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Any directory in &lt;code&gt;COPILOT_CUSTOM_INSTRUCTIONS_DIRS&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Custom paths&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  5.3 Tool access control
&lt;/h3&gt;

&lt;p&gt;By default, custom agents have access to all tools. You can restrict this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;code-reviewer&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Reviews code changes for quality and security issues&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;search&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This agent can read and search but can't edit files or run commands - appropriate for a review-only role.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.4 Using agents
&lt;/h3&gt;

&lt;p&gt;In an interactive session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Select from the list of available agents, or reference one directly in your prompt. You can also create new agents interactively with &lt;code&gt;/agent&lt;/code&gt; and selecting "Create new agent."&lt;/p&gt;

&lt;h3&gt;
  
  
  5.5 Built-in agents
&lt;/h3&gt;

&lt;p&gt;Copilot CLI ships with specialized agents that activate automatically when appropriate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Explore&lt;/strong&gt; - Fast codebase analysis and navigation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Task&lt;/strong&gt; - Runs commands like tests and builds&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code-review&lt;/strong&gt; - Reviews changes with high signal-to-noise ratio, surfacing only genuine issues&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. MCP Server Integration
&lt;/h2&gt;

&lt;p&gt;Model Context Protocol (MCP) servers extend Copilot CLI with external tools and data sources.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.1 Adding an MCP server
&lt;/h3&gt;

&lt;p&gt;Interactively:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/mcp add
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Follow the prompts to configure the server type (STDIO or HTTP/SSE), command, and arguments.&lt;/p&gt;

&lt;p&gt;Or edit the configuration file directly at &lt;code&gt;~/.copilot/mcp-config.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"servers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"github"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"stdio"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@modelcontextprotocol/server-github"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6.2 Managing MCP servers
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/mcp show&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List servers and their status&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/mcp edit SERVER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Edit a server's configuration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/mcp disable SERVER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Temporarily disable a server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/mcp enable SERVER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Re-enable a disabled server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/mcp delete SERVER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Remove a server&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  6.3 Useful MCP servers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub MCP Server&lt;/strong&gt; - Access to issues, pull requests, repositories, and Copilot Spaces&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Azure MCP Server&lt;/strong&gt; - Query Azure resources and configurations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database servers&lt;/strong&gt; - Query databases directly from Copilot CLI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom internal servers&lt;/strong&gt; - Connect to your organization's internal tools and APIs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6.4 Agent profiles with MCP servers
&lt;/h3&gt;

&lt;p&gt;You can embed MCP server configuration directly in an agent profile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;db-analyst&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Analyzes database schema and query performance&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;search&lt;/span&gt;
&lt;span class="na"&gt;mcp-server&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;stdio&lt;/span&gt;
  &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npx&lt;/span&gt;
  &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-y"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;@modelcontextprotocol/server-postgres"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gu"&gt;## Instructions&lt;/span&gt;

You are a database analyst. When asked about schema or query performance,
use the PostgreSQL MCP server to inspect tables, indexes, and query plans.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Connecting to Your Project Configuration
&lt;/h2&gt;

&lt;p&gt;Copilot CLI automatically reads project-level configuration files. If you've already set these up for VS Code Copilot, they work in the CLI with zero additional setup.&lt;/p&gt;

&lt;h3&gt;
  
  
  7.1 Supported instruction files
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;How Copilot CLI uses it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.github/copilot-instructions.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Global project rules, always loaded&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.github/instructions/*.instructions.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Scoped rules, activated by file path glob&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; (root)&lt;/td&gt;
&lt;td&gt;Project-wide agent instructions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; (nested)&lt;/td&gt;
&lt;td&gt;Directory-specific agent instructions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;~/.copilot/copilot-instructions.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Personal global instructions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  7.2 The instruction loading order
&lt;/h3&gt;

&lt;p&gt;When you launch Copilot CLI in a project directory, it loads:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Personal instructions from &lt;code&gt;~/.copilot/copilot-instructions.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Project global instructions from &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; from the root and any nested directories&lt;/li&gt;
&lt;li&gt;Scoped &lt;code&gt;.instructions.md&lt;/code&gt; files matching the current context&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These layer together - scoped instructions add specificity on top of global rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  7.3 Custom instruction directories
&lt;/h3&gt;

&lt;p&gt;For monorepos or projects that span multiple directories, set the &lt;code&gt;COPILOT_CUSTOM_INSTRUCTIONS_DIRS&lt;/code&gt; environment variable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;COPILOT_CUSTOM_INSTRUCTIONS_DIRS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/path/to/shared-config,/path/to/team-standards"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copilot CLI looks for &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;.github/instructions/**/*.instructions.md&lt;/code&gt; in each of these directories.&lt;/p&gt;

&lt;h3&gt;
  
  
  7.4 Initializing configuration
&lt;/h3&gt;

&lt;p&gt;If your project doesn't have instruction files yet, Copilot CLI can generate them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates starter &lt;code&gt;AGENTS.md&lt;/code&gt; and instruction files based on your project structure. Review and refine them - the generated defaults are a starting point, not a final answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Practical Workflows
&lt;/h2&gt;

&lt;h3&gt;
  
  
  8.1 Scaffold a new feature
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/plan Create a new CustomerNotifications feature with:
- A SendNotificationCommand with email and SMS channels
- A FluentValidation validator
- An EF Core configuration for the Notification entity
- Unit tests for the handler
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Review the plan, approve it, and Copilot creates all the files following your project's conventions (pulled from your instruction files).&lt;/p&gt;

&lt;h3&gt;
  
  
  8.2 Fix a failing CI build
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The CI build is failing on the AddOrder_InvalidInput_ReturnsValidationError test.
Read the test, the handler, and the validator. Find the mismatch and fix it.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  8.3 Review changes before a PR
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/review Review the changes in this branch for security issues,
missing null checks, and async anti-patterns
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or use the built-in diff viewer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/diff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  8.4 Delegate a PR
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/delegate Add XML documentation comments to all public methods
in the OrdersController and OrderService classes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a pull request with the changes without modifying your local working tree.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.5 Parallel subagent work with /fleet
&lt;/h3&gt;

&lt;p&gt;For tasks that can be split across independent workstreams:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/fleet Across the Application layer, ensure every command handler
has a corresponding FluentValidation validator. Create any that are missing.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copilot spawns multiple subagents working in parallel and converges on a single result.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.6 Explore an unfamiliar codebase
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Explain the authentication flow in this project. Start from the middleware
and trace through to the token validation and claims mapping.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The built-in Explore agent handles codebase navigation efficiently, reading only the files it needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Copilot CLI changes how you interact with AI-assisted development. Instead of switching between your terminal and an editor for AI help, the terminal becomes the AI environment.&lt;/p&gt;

&lt;p&gt;The key capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plan mode&lt;/strong&gt; for oversight on complex or sensitive changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autopilot mode&lt;/strong&gt; for trusted, repetitive tasks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom agents&lt;/strong&gt; for codifying your team's workflows into reusable roles&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP servers&lt;/strong&gt; for connecting external tools and data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project configuration&lt;/strong&gt; that carries over from VS Code with zero duplication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most effective setup is layered: global instructions define your standards, scoped instructions handle layer-specific rules, custom agents encode repeatable workflows, and MCP servers connect external systems. Each layer makes Copilot CLI more precise and more useful.&lt;/p&gt;

&lt;p&gt;If you haven't already, start with your project's instruction files. Everything else builds on that foundation.&lt;/p&gt;

</description>
      <category>aiassisteddevelopment</category>
      <category>clidevelopertools</category>
      <category>githubcopilot</category>
    </item>
  </channel>
</rss>
