Overview
Updated 2026-02-19: Reflects actual implementation in PR #668 and changes merged from main (notably the rpi → hve-core collection rename).
Migrate PR reference generation scripts to the Agent Skills pattern following the agentskills.io specification. Replace direct script path references in caller files with semantic task descriptions that leverage VS Code Copilot's progressive skill disclosure.
Related: #623 — Skill frontmatter schema, prompt-builder guidance, CI validation, and documentation updates (prerequisite).
Deliverables
1. Create pr-reference Skill
Create .github/skills/shared/pr-reference/ directory (collection-nested under shared):
SKILL.md — Skill definition following the video-to-gif pattern with semantic description for on-demand loading
scripts/generate.sh — Self-contained bash script (moved from scripts/dev-tools/pr-ref-gen.sh)
scripts/generate.ps1 — Self-contained PowerShell script (moved from scripts/dev-tools/Generate-PrReference.ps1, CIHelpers.psm1 dependency removed)
scripts/list-changed-files.sh / scripts/list-changed-files.ps1 — Utility to list changed files between branches
scripts/read-diff.sh / scripts/read-diff.ps1 — Utility to read diffs with chunking and line-range modes
references/REFERENCE.md — Reference documentation for skill scripts and usage
2. Remove CIHelpers.psm1 Dependency
The PowerShell script currently imports CIHelpers.psm1 for CI annotation support. Inline the error reporting logic to make the script self-contained within the skill package.
3. Refactor Caller Files (Semantic Skill Invocation)
Refactor caller files to replace direct script paths with semantic task descriptions:
| File |
Changes |
.github/prompts/hve-core/pull-request.prompt.md |
Remove ~30 lines of script discovery/platform detection/extension fallback; replace with 3-line semantic description |
.github/agents/hve-core/pr-review.agent.md |
Remove direct scripts/dev-tools/pr-ref-gen.sh references |
.github/instructions/ado/ado-create-pull-request.instructions.md |
Remove script path references with --base-branch and --no-md-diff |
.github/instructions/ado/ado-wit-discovery.instructions.md |
Remove script path reference |
.github/prompts/ado/ado-create-pull-request.prompt.md |
Update input description to remove script name |
4. Collection Registration
Register the pr-reference skill in relevant collection YAML files:
collections/hve-core.collection.yml (renamed from collections/rpi.collection.yml)
collections/hve-core-all.collection.yml
Run npm run plugin:generate to regenerate plugin manifests.
5. Remove Legacy Scripts (Breaking Change)
Remove the following legacy scripts entirely:
scripts/dev-tools/pr-ref-gen.sh
scripts/dev-tools/Generate-PrReference.ps1
scripts/dev-tools/ directory (if empty after removal)
This is a breaking change — consumers referencing these paths directly will need to update to the skill-based invocation.
6. Comprehensive Pester Tests
Create tests in .github/skills/shared/pr-reference/tests/:
Generate-PrReference.Tests.ps1 — Tests for the generate script
List-ChangedFiles.Tests.ps1 — Tests for the list-changed-files utility
Read-Diff.Tests.ps1 — Tests for the read-diff utility
7. Pester Test Infrastructure for Collection-Nested Skills
Update test infrastructure to support skills in <collection>/<skill>/ directory layout:
scripts/tests/pester.config.ps1 — Two-depth probing for both test discovery AND code coverage discovery
.github/workflows/pester-tests.yml — Updated CI workflow for skill test directory detection
Bug fix: Code coverage discovery originally only iterated direct children of .github/skills/, missing collection-nested skill scripts. Fixed to use the same two-depth glob pattern as test discovery.
Impacted Files
New Files
| File |
Purpose |
.github/skills/shared/pr-reference/SKILL.md |
Skill definition |
.github/skills/shared/pr-reference/scripts/generate.sh |
Bash generate script |
.github/skills/shared/pr-reference/scripts/generate.ps1 |
PowerShell generate script |
.github/skills/shared/pr-reference/scripts/list-changed-files.sh |
Bash list-changed-files utility |
.github/skills/shared/pr-reference/scripts/list-changed-files.ps1 |
PowerShell list-changed-files utility |
.github/skills/shared/pr-reference/scripts/read-diff.sh |
Bash read-diff utility |
.github/skills/shared/pr-reference/scripts/read-diff.ps1 |
PowerShell read-diff utility |
.github/skills/shared/pr-reference/references/REFERENCE.md |
Reference documentation |
.github/skills/shared/pr-reference/tests/Generate-PrReference.Tests.ps1 |
Generate script tests |
.github/skills/shared/pr-reference/tests/List-ChangedFiles.Tests.ps1 |
List-changed-files tests |
.github/skills/shared/pr-reference/tests/Read-Diff.Tests.ps1 |
Read-diff tests |
Modified Files
| File |
Changes |
.github/prompts/hve-core/pull-request.prompt.md |
Semantic skill invocation |
.github/agents/hve-core/pr-review.agent.md |
Semantic skill invocation |
.github/instructions/ado/ado-create-pull-request.instructions.md |
Semantic skill invocation |
.github/instructions/ado/ado-wit-discovery.instructions.md |
Semantic skill invocation |
.github/prompts/ado/ado-create-pull-request.prompt.md |
Semantic skill invocation |
scripts/tests/pester.config.ps1 |
Skill test discovery + coverage fix |
.github/workflows/pester-tests.yml |
Skill test CI integration |
collections/hve-core.collection.yml |
Skill registration |
collections/hve-core-all.collection.yml |
Skill registration |
Removed Files
| File |
Reason |
scripts/dev-tools/pr-ref-gen.sh |
Moved to skill |
scripts/dev-tools/Generate-PrReference.ps1 |
Moved to skill |
scripts/tests/dev-tools/Generate-PrReference.Tests.ps1 |
Replaced by skill tests |
References
- Existing skill pattern:
.github/skills/experimental/video-to-gif/SKILL.md
- PR with implementation: #668
- Research:
.copilot-tracking/research/2026-02-15-pr-prompt-skill-refactoring-research.md
Acceptance Criteria
Overview
Migrate PR reference generation scripts to the Agent Skills pattern following the agentskills.io specification. Replace direct script path references in caller files with semantic task descriptions that leverage VS Code Copilot's progressive skill disclosure.
Related: #623 — Skill frontmatter schema, prompt-builder guidance, CI validation, and documentation updates (prerequisite).
Deliverables
1. Create pr-reference Skill
Create
.github/skills/shared/pr-reference/directory (collection-nested undershared):SKILL.md— Skill definition following the video-to-gif pattern with semanticdescriptionfor on-demand loadingscripts/generate.sh— Self-contained bash script (moved fromscripts/dev-tools/pr-ref-gen.sh)scripts/generate.ps1— Self-contained PowerShell script (moved fromscripts/dev-tools/Generate-PrReference.ps1, CIHelpers.psm1 dependency removed)scripts/list-changed-files.sh/scripts/list-changed-files.ps1— Utility to list changed files between branchesscripts/read-diff.sh/scripts/read-diff.ps1— Utility to read diffs with chunking and line-range modesreferences/REFERENCE.md— Reference documentation for skill scripts and usage2. Remove CIHelpers.psm1 Dependency
The PowerShell script currently imports
CIHelpers.psm1for CI annotation support. Inline the error reporting logic to make the script self-contained within the skill package.3. Refactor Caller Files (Semantic Skill Invocation)
Refactor caller files to replace direct script paths with semantic task descriptions:
.github/prompts/hve-core/pull-request.prompt.md.github/agents/hve-core/pr-review.agent.mdscripts/dev-tools/pr-ref-gen.shreferences.github/instructions/ado/ado-create-pull-request.instructions.md--base-branchand--no-md-diff.github/instructions/ado/ado-wit-discovery.instructions.md.github/prompts/ado/ado-create-pull-request.prompt.md4. Collection Registration
Register the pr-reference skill in relevant collection YAML files:
collections/hve-core.collection.yml(renamed fromcollections/rpi.collection.yml)collections/hve-core-all.collection.ymlRun
npm run plugin:generateto regenerate plugin manifests.5. Remove Legacy Scripts (Breaking Change)
Remove the following legacy scripts entirely:
scripts/dev-tools/pr-ref-gen.shscripts/dev-tools/Generate-PrReference.ps1scripts/dev-tools/directory (if empty after removal)This is a breaking change — consumers referencing these paths directly will need to update to the skill-based invocation.
6. Comprehensive Pester Tests
Create tests in
.github/skills/shared/pr-reference/tests/:Generate-PrReference.Tests.ps1— Tests for the generate scriptList-ChangedFiles.Tests.ps1— Tests for the list-changed-files utilityRead-Diff.Tests.ps1— Tests for the read-diff utility7. Pester Test Infrastructure for Collection-Nested Skills
Update test infrastructure to support skills in
<collection>/<skill>/directory layout:scripts/tests/pester.config.ps1— Two-depth probing for both test discovery AND code coverage discovery.github/workflows/pester-tests.yml— Updated CI workflow for skill test directory detectionBug fix: Code coverage discovery originally only iterated direct children of
.github/skills/, missing collection-nested skill scripts. Fixed to use the same two-depth glob pattern as test discovery.Impacted Files
New Files
.github/skills/shared/pr-reference/SKILL.md.github/skills/shared/pr-reference/scripts/generate.sh.github/skills/shared/pr-reference/scripts/generate.ps1.github/skills/shared/pr-reference/scripts/list-changed-files.sh.github/skills/shared/pr-reference/scripts/list-changed-files.ps1.github/skills/shared/pr-reference/scripts/read-diff.sh.github/skills/shared/pr-reference/scripts/read-diff.ps1.github/skills/shared/pr-reference/references/REFERENCE.md.github/skills/shared/pr-reference/tests/Generate-PrReference.Tests.ps1.github/skills/shared/pr-reference/tests/List-ChangedFiles.Tests.ps1.github/skills/shared/pr-reference/tests/Read-Diff.Tests.ps1Modified Files
.github/prompts/hve-core/pull-request.prompt.md.github/agents/hve-core/pr-review.agent.md.github/instructions/ado/ado-create-pull-request.instructions.md.github/instructions/ado/ado-wit-discovery.instructions.md.github/prompts/ado/ado-create-pull-request.prompt.mdscripts/tests/pester.config.ps1.github/workflows/pester-tests.ymlcollections/hve-core.collection.ymlcollections/hve-core-all.collection.ymlRemoved Files
scripts/dev-tools/pr-ref-gen.shscripts/dev-tools/Generate-PrReference.ps1scripts/tests/dev-tools/Generate-PrReference.Tests.ps1References
.github/skills/experimental/video-to-gif/SKILL.md.copilot-tracking/research/2026-02-15-pr-prompt-skill-refactoring-research.mdAcceptance Criteria
.github/skills/shared/pr-reference/SKILL.mdcreated following agentskills.io specificationscripts/generate.shis self-contained (no external dependencies beyond git)scripts/generate.ps1is self-contained (CIHelpers.psm1 dependency removed)list-changed-files,read-diff) created with cross-platform supporthve-core,hve-core-all)npm run plugin:generatesucceeds with the new skillscripts/dev-tools/