Skip to content

GitHub Copilot

Ashley Childress edited this page Jul 20, 2025 · 1 revision

🎩 AI Sidekicks in Your IDE: GitHub Copilot & Friends

Welcome to the magical world of AI assistants for code! ✨ Whether you call it Copilot, a chat buddy, or your slightly-too-clever pair programmer, this project is built from the ground up for using AI inside your IDE—not out there running wild on your prod servers (let's keep it friendly, not Skynet).


🧸 ELI5: What’s an AI Assistant, Really?

Imagine you’re building Lego sets, and every so often, you get stuck on a step. Instead of staring at the instructions until you get a headache, your little brother pops in to hand you the right piece, point out mistakes, and—if you’re feeling brave—suggests a shortcut. That’s an AI assistant. It lives right beside you in your editor (like VS Code), making suggestions but never wandering off and building the set by itself.

  • You’re the builder: You approve, reject, or tweak every change.
  • It’s the helper: It reads the room, offers ideas, helps debug, but only when you ask or accept its nudge.
  • It never acts alone.

🤖 Why “Assistant”? What About “Autonomous AI”?

The phrase “AI assistant” isn’t just marketing. Here’s why:

  • Assistants require direction: You give the commands, you review the work. Like a junior dev or pair programmer, they only act in the context you provide.
  • Autonomous coding means the AI is running scripts, deploying code, and making decisions without you in the loop. (Not what we’re doing here. That’s more like self-driving cars vs. power steering.)
  • This project = Assistant mode only. Copilot and other tools are here to make you faster and happier in the editor. The code always runs with your approval.

🦄 Pro tip: Want to learn more about the risks & benefits of autonomous code? Check out GitHub Copilot’s documentation.


🧑‍💻 What Is This Project Set Up For?

We’re here to use Copilot (and friends) inside the IDE, where you:

  • Get autocomplete and smart suggestions as you type.
  • Can ask questions or get code explained by Copilot Chat.
  • Always keep control over what makes it into your project.

🦄 No bots merging PRs, no AI pushing to main, no autonomous magic—just helpful code nudges as you go.


⚡ Where to Get It: Quick Links

This repo is also set to add each of these to your workspace automatically when you open it in VS Code. Just create a new repo from this template, and click to install the recommended extensions when you open it.

🍭 Did you know? Microsoft recently open-sourced their Copilot Chat plugin! Check it out here. That means you can poke around or even contribute if you’re feeling spicy.


🦄 Get the Most Accurate AI Responses Every Time

Welcome to the magical (but practical!) world of user instructions for Copilot and other AI-powered tools. This is your cheat code for getting spot-on, personalized results—without repeating yourself every single time.


🤹‍♂️ What Are User Instructions?

User instructions are saved settings that tell the AI who you are and how it should answer your prompts by default. They work behind the scenes every time you use a prompt—especially handy for stuff like generating commit messages!

  • No more typing your name/email for every commit.
  • No more AI guessing who you are.
  • One setup = accurate results, always.

⚙️ How to Set Up Your Own Instructions

For GitHub Copilot:

Example user instructions:

- When prompted for a user name use `Ashley Childress`
- When prompted for a user email use `[email protected]`

Just drop these in your Copilot user instructions UI and you’re set!


🧩 What If You’re Using a Copilot Derivative?

If you’re using a tool inspired by Copilot (like Cursor, Gemini, or another AI assistant), you’ll want to verify how your tool is represented. For example, GitHub Copilot signs commits with GitHub Copilot <[email protected]>, so you will just need to update the .github/prompts/generate-commit-message.prompt.md file to include your preferred AI's name and email.

⚠️ Heads up! This page is still under construction, but for now, this is the minimum setup you need to get accurate commit messages with the example prompt above.


🪄 How to Speak Fluent AI

Welcome to the world of prompts: your backstage pass to getting the best out of your AI assistant! Whether you’re asking Copilot for help, wrangling ChatGPT, or just trying to get your tools to do what you mean—not just what you say - prompts are how you talk to your AI. They’re your secret handshake, your recipe, your wish upon a digital star. ⭐


🧸 ELF5: What’s a Prompt?

Imagine you’re ordering at a drive-thru. You can just say, “Food!” and see what you get (not ideal), or you can say, “I’d like a large fries, a veggie burger, and a chocolate shake, please.” That second option? That’s a prompt.

  • A prompt is the question or instruction you give to your AI assistant.
  • The clearer and more specific you are, the better (and tastier!) the result.
  • Good prompts set boundaries, goals, and even the vibe.

🍔 ELF5 version: Think of a prompt as how you ask your AI for exactly what you want. Be specific, be clear, and always feel free to ask for extra sauce (details)!


🎤 Why Do Prompts Matter?

Prompts are the magic spell. The same AI can give you wildly different answers depending on how you ask. A prompt can:

  • Get you a code snippet in the style you want
  • Explain an error in plain English (or in any other language)
  • Generate a witty commit message
  • Write docs or tests for you (and more!)

The more you practice, the better your results—and the more useful your AI assistant becomes.


💾 Saveable & Shareable vs. Chat Prompts: What’s the Diff?

Not all prompts are created equal—but they do share a common DNA!

  • Saveable, Shareable Prompts: Think of these as recipes you want to reuse or pass to a friend. They’re files you keep in your repo, like the generate-commit-message.prompt.md file. Anyone (or any tool) can use them for repeatable results.
  • Ad-hoc (Chat) Prompts: These are the quick questions or instructions you type directly into Copilot Chat, ChatGPT, etc. You create them on the fly—just like asking, “Hey, what’s the weather?”
  • Same format, same basic rules! Both use natural language and benefit from being clear, specific, and goal-oriented.

🦄 Pro Tip: If your ad-hoc chat prompt turns out to be gold, save it as a shareable file so others (and your future self) can reuse it!


🧪 The RICE ( +O) Formula for Writing Great Prompts

Want your AI answers to be tasty every time? Try RICE (with a side of Output):

  • Role: Tell the AI who it is (e.g., "You are a release notes generator...")
  • Input: Feed in all the relevant info (code, context, errors, or goals)
  • Constraints: Lay out the boundaries (format, length, style, must/must-not)
  • Examples: Show the AI a few model answers (the more, the merrier!)
  • Output: Be explicit about the result you want (table, markdown, commit message, code block, etc.)
**RICE+O Formula**
Role + Input + Constraints + Examples + Output = 📈 Better Prompts, Every Time!

🦄 Real Talk: The RICE formula (Role, Input, Constraints, Examples) is a genuine prompt-writing method, but I added the "O" for Output. Why? Because even if you nail the first four, your AI assistant might still make wild guesses unless you spell out exactly what you want to see at the end. Adding Output keeps your coding sidekick on the right track, every time.


🛠️ Examples in This Project


🔧 Integrating Copilot AI Tools

Important

✨ Sneak Peek Alert! ✨

You’re looking at an early preview of some automation magic I’ve been brewing up. It’s not live yet (so don’t go looking for commits - nothing to see there... yet). But once it’s ready, you’ll be able to automate your Copilot workflows in both your IDE and pipelines like a pro.

Stay tuned for the real show! 🦄

After you’ve set up both VS Code editions, you can automate AI-powered workflows in your IDE:

  1. Install GitHub CLI and Copilot plugin:

    brew install gh
    gh extension install github/copilot-cli
    gh auth login
  2. Add a generate-commit-message.sh script in your project root:

    # generate-commit-message.sh
    #!/bin/bash
    # ...existing script content...

    Make it executable:

    chmod +x generate-commit-message.sh
  3. Configure lefthook.yml hooks in the root:

    pre-commit:
      parallel: true
      commands:
        prettier: ...
        remark: ...
        generate-diff: ...
    prepare-commit-msg:
      scripts:
        "generate-commit-message.sh":
          runner: bash
    commit-msg:
      commands:
        commitlint: ...
  4. Stage your changes and commit normally. AI will generate and lint your commit message automatically:

    git add .
    git commit

Enjoy seamless AI integration in both VS Code and Insiders! 🎉