vagejs with GitHub Copilot
In VS Code and on GitHub.
GitHub Copilot can work on your site in two places: agent mode in VS Code, which edits files and runs commands on your computer, and the Copilot cloud agent, which takes a GitHub issue, works on its own branch, and opens a pull request. Both read the AGENTS.md that comes with every vagejs site.
Agent mode in VS Code
- Create a site:
npm create vagejs@latest my-site, thencd my-site && npm install. - Open the folder in VS Code and open Copilot Chat in Agent mode.
- Ask it to start the dev server with
npm run dev.
VS Code adds the root AGENTS.md to every chat request (the chat.useAgentsMdFile setting, on by default). See VS Code's custom instructions docs.
Auto-approve the safe commands
Copilot asks before running terminal commands. Allow the read-only ones in your VS Code settings:
{
"chat.tools.terminal.autoApprove": {
"/^npm run (check|build)$/": true,
"/^npx vage (info|check)/": true
}
}Anything not on the list, including vage deploy, still asks first. More options are in VS Code's approvals docs.
The Copilot cloud agent
Assign an issue to Copilot on GitHub and it works in a GitHub Actions environment. To let it run the vagejs checks, add .github/workflows/copilot-setup-steps.yml to your default branch:
name: Copilot Setup Steps
on: workflow_dispatch
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- run: npm ciThe job must be named copilot-setup-steps. GitHub's guide to customizing the agent environment has the details. When your site's CI workflow runs on Copilot's pull request (GitHub may ask you to approve the run first), you see the vage check, build and audit results before you merge.
Issues to give the cloud agent
Write issues the way you'd brief a colleague:
Add a /pricing/ page with the three plans in docs/plans.md. Follow AGENTS.md, and make sure npm run check passes.The blog post "Spring update" has a broken link to the old booking page. Fix it and add a redirect from /book/ to /booking/.Good to know
- Copilot also reads
.github/copilot-instructions.md. Use it for team preferences, and leave the vagejs rules inAGENTS.md. - The cloud agent can't publish your site: deploys need a person to confirm, and its changes arrive as a pull request.