GitHub CopilotBeginner20 minDay 6 · Nov 10, 2026

Save a repeatable task as a Copilot agent skill

Turn a task you keep explaining to Copilot into an agent skill that anyone on your team can run with a slash command in VS Code.

Today's task

In Pair with GitHub Copilot's agent in VS Code you wrote an instructions file with house rules. Today you'll add the other half: an agent skill, a saved task Copilot can run on demand. You'll create a "review this script" skill that works the same way every time, for everyone on your team.

You'll need: an up-to-date VS Code with GitHub Copilot, and the project folder from the earlier lesson (any folder with a script will do).

Steps

  1. Understand the difference. Instructions in .github/copilot-instructions.md always apply. A skill is a folder with a SKILL.md file inside, and Copilot loads it only when a task calls for it. That suits a specific, repeatable job.
  2. Open the skills list. Start a new chat and check that Session Target is set to Copilot. Then open the Command Palette, run Chat: Open Customizations and select Skills.
  3. Create the skill. Select New Skill (the plus icon) next to Workspace and name it review-script. Names use only lowercase letters, numbers and hyphens. VS Code creates a folder with that name and a SKILL.md file inside it. Project skills live under .github/skills/.
  4. Write the instructions. Set up the generated SKILL.md file like this:
    ---
    name: review-script
    description: Review a script for clarity, safety and missing tests. Use when asked to review code before it is shared.
    ---
    
    # Review a script
    
    1. Read the script the user names.
    1. List problems in three groups: clarity, safety (secrets, unsafe input) and missing tests.
    1. Suggest fixes, but do not change any files.
    The name must match the folder name. The description says what the skill does and when to use it.
  5. Run it. Start a fresh chat, type / and pick review-script. You can add detail after the command, such as /review-script the ticket-sorting script, focus on input handling.
  6. Improve it once. Compare the result with what you'd have written by hand. Tighten the wording, rerun, and stop when the output is consistently useful.
  7. Share it. Commit the .github/skills folder to your repository so teammates get the same skill.

What to notice

  • Instructions are always on; skills load on demand. Put rules that must always hold in instructions, and repeatable tasks in skills.
  • The description does two jobs. It tells teammates what the skill is for, and Copilot uses it to decide when to load the skill by itself. To make a skill run only when you ask for it, add disable-model-invocation: true to the header.
  • A good skill states its limits. "Do not change any files" turns an agent that can act into a reviewer that only advises.

If you've seen .prompt.md prompt files, they were the earlier way to save a prompt. The VS Code docs now say prompt files only run in the older Local mode, which is due to be removed by February 2027, and recommend skills for new work.

Governance tip: Treat skills like code. Review them in a pull request before they're shared, never put secrets or customer data in them, and read every file in a skill before you copy one from the internet. A skill can include scripts, not just instructions.

Go further

Rather have it built?

We build and govern Microsoft AI agents for businesses like yours.

If you'd rather skip the learning curve, Louder IT designs, builds and runs agents in Copilot Studio and Azure, with guardrails included.