GitHub Copilot Customisation

May 19, 2026 · View on GitHub

This directory contains custom agents and always-on instructions for GitHub Copilot Chat in VS Code.


Always-on instructions

instructions/r-style.instructions.md — applied automatically to every *.R file. Enforces tidyverse idioms, script-style (top-to-bottom, minimal abstraction), and comment standards. No invocation needed.


Custom agents (agents/)

Agents appear in the Copilot Chat agent picker (the mode selector next to the chat input). Select one from the dropdown, or type its name after @ in the chat input.

How to invoke

@<agent-name> <your request>

Example:

@stats review R/process_burn_dates.R for assumption violations
@commenter document R/get_clouds_wilson.R
@coder_alpha implement a function that downloads MODIS tiles for a given month

To run all three competing coders on the same problem, send the same prompt to each:

@coder_alpha implement X
@coder_beta implement X
@coder_gamma implement X

Then pick the best solution or synthesise across them.


Agent reference

Review agents — read-only, raise issues for coders to fix

AgentInvoke when you want to…
@statsCheck statistical assumptions, sample sizes, data leakage, uncertainty
@geoMetadata QA (CRS consistency, resolution mismatches, missing files) and spatial accuracy review (resampling methods, spatial joins, zonal statistics)
@scienceGet a peer-reviewer-style critique of analytical design and methods
@gh_actionsCheck that changes will run on GitHub Actions (interactive calls, server paths, secrets, cleanup, date ranges)
@targetsCheck target dependencies, dynamic branching, format=file correctness, tar_release round-trip, deployment guards

Coding agents — produce working R code

AgentPhilosophy
@coder_alphaCorrectness-first: readable, conventional, explicit sanity checks
@coder_betaPerformance-first: memory-efficient, chunk-based, parallelism-aware
@coder_gammaMinimalist: fewest lines, no abstraction, inline everything

Documentation agent

AgentInvoke when you want to…
@commenterReview or add scientific comments, section headers, and unit annotations

Orchestrator

AgentInvoke when you want to…
@ciRun a full pre-commit sweep: lint + geo + stats + gh_actions + targets

Typical workflows

Before committing:

@ci

Writing new processing code:

  1. Draft with @coder_alpha, @coder_beta, and @coder_gamma in parallel.
  2. Pick or synthesise the best solution.
  3. Run @geo and @stats on the result.
  4. Run @commenter to fill in documentation.

Reviewing a script for scientific soundness:

@science review R/process_dynamic_data.R
@stats review R/process_dynamic_data.R
@geo review R/process_dynamic_data.R