Files
Austin Horstman feda41500e github-copilot-cli: add context, agents, and skills
Add support for managing Copilot CLI global instructions via programs.github-copilot-cli.context, written to copilot-instructions.md under COPILOT_HOME.

Also manage custom agents and skills from inline definitions, file paths, and directories, with focused tests and a news entry covering the new options.
2026-05-01 12:06:19 -05:00

40 lines
1.1 KiB
Nix

{ pkgs, ... }:
let
src = pkgs.writeTextDir "agents/code-reviewer.agent.md" ''
---
description: Review changes from a store-path directory fixture.
tools: ["*"]
---
Focus on correctness and missing coverage.
'';
skillsSrc = pkgs.writeTextDir "skills/external-skill/SKILL.md" ''
---
name: external-skill
description: Store-path directory fixture.
---
Exercise top-level store-path directory handling.
'';
in
{
programs.github-copilot-cli = {
enable = true;
agents = "${src}/agents";
skills = "${skillsSrc}/skills";
};
nmt.script = ''
assertFileExists home-files/.copilot/agents/code-reviewer.agent.md
assertLinkExists home-files/.copilot/agents/code-reviewer.agent.md
assertFileContent home-files/.copilot/agents/code-reviewer.agent.md \
"${src}/agents/code-reviewer.agent.md"
assertFileExists home-files/.copilot/skills/external-skill/SKILL.md
assertLinkExists home-files/.copilot/skills/external-skill/SKILL.md
assertFileContent home-files/.copilot/skills/external-skill/SKILL.md \
"${skillsSrc}/skills/external-skill/SKILL.md"
'';
}