You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(skills): edit SKILL frontmatter schema, add CI validation, and documentation (#625)
## Description
Added foundational skill infrastructure to support semantic invocation
and optional frontmatter properties. This is a prerequisite for
migrating existing scripts to the Agent Skills pattern. Changes span the
frontmatter schema, a new CI validation script with Pester tests,
prompt-builder guidance for semantic skill invocation, documentation
updates, and PR validation pipeline integration.
> Note: Some additional changes were done to
`prompt-builder.instructions.md` based on optimization recommended by
the `/analyse-prompt` command to improve clarity and structure of the
semantic invocation documentation.
- feat(skills): Added `user-invokable`, `disable-model-invocation`, and
`argument-hint` optional properties to `skill-frontmatter.schema.json`
with `maxLength` constraints on `name` (64), `description` (1024), and
`argument-hint` (256)
- feat(skills): Created `Validate-SkillStructure.ps1` (464 lines) with
SKILL.md presence checks, frontmatter field validation, name-directory
consistency, unrecognized subdirectory warnings, changed-files-only mode
via Git merge-base, CI annotations, and JSON results export
- feat(skills): Created `Validate-SkillStructure.Tests.ps1` (876 lines)
with full Pester coverage across `Get-SkillFrontmatter`,
`Test-SkillDirectory`, `Get-ChangedSkillDirectories`, and
`Write-SkillValidationResults` including edge cases for git failures,
path normalization, and CI annotation emission
- feat(skills): Added "Skill Invocation from Callers" subsection to
`prompt-builder.instructions.md` documenting semantic description
matching as the primary invocation pattern with before/after examples,
progressive disclosure levels, and updated optional field documentation
- docs(skills): Updated `docs/contributing/skills.md` with Optional
Fields section, Invocation Control Matrix table, frontmatter example
with optional fields, Semantic Skill Loading section with progressive
disclosure levels, caller invocation patterns, and external references
to agentskills.io and VS Code docs
- ci(skills): Created `skill-validation.yml` reusable workflow with
`soft-fail` and `changed-files-only` inputs, pinned action SHAs, and
artifact upload for `skill-validation-results`
- ci(skills): Integrated `skill-validation` job into `pr-validation.yml`
with `changed-files-only: true`
- chore: Added `validate:skills` npm script to `package.json` and
appended it to `lint:all`; updated `CONTRIBUTING.md`,
`scripts/README.md`, `scripts/linting/README.md`,
`docs/architecture/workflows.md`,
`docs/contributing/ai-artifacts-common.md`,
`.github/workflows/README.md`, and `.github/PULL_REQUEST_TEMPLATE.md` to
document the new validation step
- chore: Added `agentskills` and `invokable` to `.cspell.json`
dictionary
## Related Issue(s)
Closes#623
## Type of Change
Select all that apply:
**Code & Documentation:**
- [ ] Bug fix (non-breaking change fixing an issue)
- [x] New feature (non-breaking change adding functionality)
- [ ] Breaking change (fix or feature causing existing functionality to
change)
- [x] Documentation update
**Infrastructure & Configuration:**
- [x] GitHub Actions workflow
- [ ] Linting configuration (markdown, PowerShell, etc.)
- [ ] Security configuration
- [ ] DevContainer configuration
- [ ] Dependency update
**AI Artifacts:**
- [x] Reviewed contribution with `prompt-builder` agent and addressed
all feedback
- [x] Copilot instructions (`.github/instructions/*.instructions.md`)
- [ ] Copilot prompt (`.github/prompts/*.prompt.md`)
- [ ] Copilot agent (`.github/agents/*.agent.md`)
- [ ] Copilot skill (`.github/skills/*/SKILL.md`)
> **Note for AI Artifact Contributors**:
>
> - **Agents**: Research, indexing/referencing other project (using
standard VS Code GitHub Copilot/MCP tools), planning, and general
implementation agents likely already exist. Review `.github/agents/`
before creating new ones.
> - **Skills**: Must include both bash and PowerShell scripts. See
[Skills](../docs/contributing/skills.md).
> - **Model Versions**: Only contributions targeting the **latest
Anthropic and OpenAI models** will be accepted. Older model versions
(e.g., GPT-3.5, Claude 3) will be rejected.
> - See [Agents Not
Accepted](../docs/contributing/custom-agents.md#agents-not-accepted) and
[Model Version
Requirements](../docs/contributing/ai-artifacts-common.md#model-version-requirements).
**Other:**
- [x] Script/automation (`.ps1`, `.sh`, `.py`)
- [ ] Other (please describe):
## Sample Prompts (for AI Artifact Contributions)
<!-- Not applicable — this PR updates prompt-builder instructions rather
than creating a new standalone AI artifact -->
## Testing
- Ran `/analyze-prompt`
- Ran `Validate-SkillStructure.Tests.ps1` with Pester to verify all
tests pass, including edge cases for git failures, path normalization,
and CI annotation emission.
- Ran `npm run validate:skills` to ensure the validation script executes
without errors in a real-world scenario (based on currently one existing
skill).
## Checklist
### Required Checks
- [x] Documentation is updated (if applicable)
- [x] Files follow existing naming conventions
- [ ] Changes are backwards compatible (if applicable)
- [x] Tests added for new functionality (if applicable)
### AI Artifact Contributions
<!-- If contributing an agent, prompt, instruction, or skill, complete
these checks -->
- [x] Used `/prompt-analyze` to review contribution
- [x] Addressed all feedback from `prompt-builder` review
- [x] Verified contribution follows common standards and type-specific
requirements
### Required Automated Checks
The following validation commands must pass before merging:
- [x] Markdown linting: `npm run lint:md`
- [x] Spell checking: `npm run spell-check`
- [x] Frontmatter validation: `npm run lint:frontmatter`
- [x] Skill structure validation: `npm run validate:skills`
- [x] Link validation: `npm run lint:md-links`
- [x] PowerShell analysis: `npm run lint:ps`
## Security Considerations
- [x] This PR does not contain any sensitive or NDA information
- [ ] Any new dependencies have been reviewed for security issues
- [ ] Security-related scripts follow the principle of least privilege
## Additional Notes
All four deliverables from issue #623 are addressed in this PR:
1. **Skill Frontmatter Schema Updates** — Added three optional
properties with type constraints and length limits
2. **Prompt-Builder Instructions Updates** — Added semantic invocation
guidance with before/after examples and progressive disclosure
documentation
3. **CI Validation for Skill Structure** — Created
`Validate-SkillStructure.ps1` with comprehensive Pester test coverage in
`Validate-SkillStructure.Tests.ps1`
4. **Documentation Updates** — Updated `docs/contributing/skills.md`
with optional fields, invocation control matrix, semantic skill loading,
and external specification references
🛠️ - Generated by Copilot
---------
Co-authored-by: Bill Berry <WilliamBerryiii@users.noreply.github.com>
Co-authored-by: Bill Berry <wberry@microsoft.com>
Copy file name to clipboardExpand all lines: .github/instructions/prompt-builder.instructions.md
+57-5Lines changed: 57 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -248,9 +248,10 @@ Purpose: Self-contained packages that bundle documentation with executable scrip
248
248
249
249
Characteristics:
250
250
251
-
* Bundled with bash and PowerShell scripts in the same directory.
251
+
* Optionally bundled with bash and PowerShell scripts in a `scripts/` subdirectory.
252
252
* Provides step-by-step instructions for task execution.
253
253
* Includes prerequisites, parameters, and troubleshooting sections.
254
+
* Skills without scripts are valid documentation-driven knowledge packages.
254
255
255
256
Skill directory structure:
256
257
@@ -268,6 +269,32 @@ Skill directory structure:
268
269
└── README.md # Usage examples (recommended)
269
270
```
270
271
272
+
#### Optional Directories
273
+
274
+
##### scripts/
275
+
276
+
Contains executable code that agents run to perform tasks:
277
+
278
+
* Scripts are self-contained or clearly document dependencies.
279
+
* Include helpful error messages and handle edge cases gracefully.
280
+
* Provide parallel implementations for bash and PowerShell when targeting cross-platform use.
281
+
282
+
##### references/
283
+
284
+
Contains additional documentation that agents read when needed:
285
+
286
+
* *REFERENCE.md* for detailed technical reference material.
287
+
* Domain-specific files such as `finance.md` or `legal.md`.
288
+
* Keep individual reference files focused; agents load these on demand.
289
+
290
+
##### assets/
291
+
292
+
Contains static resources:
293
+
294
+
* Templates for documents or configuration files.
295
+
* Images such as diagrams or examples.
296
+
* Data files such as lookup tables or schemas.
297
+
271
298
### Skill Content Structure
272
299
273
300
Skill files include these sections in order:
@@ -281,7 +308,7 @@ Skill files include these sections in order:
281
308
7. Troubleshooting: Common issues and solutions.
282
309
8. Attribution: Attribution in `description:` frontmatter and standard footer.
283
310
284
-
### Progressive Disclosure
311
+
#### Progressive Disclosure
285
312
286
313
Structure skills for efficient context usage:
287
314
@@ -291,7 +318,7 @@ Structure skills for efficient context usage:
291
318
292
319
Keep the main *SKILL.md* focused. Move detailed reference material to separate files.
293
320
294
-
### File References
321
+
#### File References
295
322
296
323
When referencing other files in the skill, use relative paths from the skill root:
297
324
@@ -304,10 +331,35 @@ scripts/extract.py
304
331
305
332
Keep file references one level deep from *SKILL.md*. Avoid deeply nested reference chains.
306
333
334
+
#### Skill Invocation from Callers
335
+
336
+
When prompts, agents, or instructions need a skill's capability, describe the task intent rather than referencing script paths directly. Copilot matches the task description against each skill's `description` frontmatter and loads the skill on-demand via progressive disclosure.
337
+
338
+
Avoid hardcoded script paths, platform detection logic, or extension fallback code in caller files. Skills handle these concerns internally through their SKILL.md instructions and scripts.
339
+
340
+
For explicit invocation, reference the slash command `/skill-name` in usage documentation.
341
+
342
+
Semantic invocation pattern:
343
+
344
+
```markdown
345
+
<!-- Direct script reference (avoid) -->
346
+
Run `./scripts/dev-tools/pr-ref-gen.sh --base-branch origin/main` to generate the PR reference.
347
+
348
+
<!-- Semantic skill invocation (preferred) -->
349
+
Generate the PR reference XML file comparing the current branch against origin/main.
350
+
```
351
+
352
+
When a caller describes a task that semantically matches a skill's `description`, Copilot follows this loading sequence:
353
+
354
+
1. Level 1 (Discovery): Matches the task description against skill frontmatter `name` and `description` fields (~100 tokens per skill).
355
+
2. Level 2 (Instructions): Loads the full SKILL.md body into context with script usage instructions (<5000 tokens recommended).
356
+
3. Level 3 (Resources): Accesses scripts, examples, and references in the skill directory on-demand during execution.
357
+
307
358
Validation guidelines:
308
359
309
360
* Frontmatter follows the Frontmatter Requirements section, including `name` and `description` fields.
310
361
* Provide parallel script implementations for bash and PowerShell when targeting cross-platform use.
362
+
* Skills without scripts are valid; omit Parameters Reference and Script Reference sections in that case.
311
363
* Document prerequisites for each supported platform.
312
364
* Keep *SKILL.md* focused; move detailed reference material to `references/`.
313
365
* Additional sections can be added between Parameters Reference and Troubleshooting as needed.
@@ -328,7 +380,7 @@ Skill files also include a standard attribution footer as the last line of body
328
380
329
381
## Frontmatter Requirements
330
382
331
-
This section defines frontmatter field requirements for prompt engineering artifacts.
383
+
Frontmatter field requirements for prompt engineering artifacts follow.
332
384
333
385
Maturity is tracked in `collections/*.collection.yml` item metadata, not in frontmatter. Do not include a `maturity` field in artifact frontmatter. Set maturity on the artifact's matching collection item entry; when omitted, maturity defaults to `stable`.
334
386
@@ -352,7 +404,7 @@ Optional fields available by file type:
352
404
353
405
*`tools:` - Tool restrictions for agents and subagents. When omitted, all tools are accessible. When specified, list only tools available in the current VS Code context.
354
406
*`handoffs:` - Agent handoff declarations. Each entry includes `label` (display text, supports emoji), `agent` (target agent name), and optionally `prompt` (slash command to invoke) and `send` (boolean, auto-send the prompt when `true`).
355
-
* `user-invocable:` - Boolean. Set to `false` to hide the agent from the user and prevent direct invocation. Defaults to `true` when omitted. Use for subagents that should not appear in the agent picker.
407
+
*`user-invocable:` - Boolean. Set to `false` to hide the artifact from the user and prevent direct invocation. Defaults to `true` when omitted. Use for subagents that should not appear in the agent picker or background-only skills that should not appear in the slash command menu.
356
408
*`disable-model-invocation:` - Boolean. Set to `true` to prevent Copilot from automatically invoking the agent. Use for agents that run subagents, agents that cause side effects (git operations, backlog management, deployments), or agents that should only run when explicitly requested. Defaults to `false` when omitted.
357
409
*`agent:` - Agent delegation for prompt files.
358
410
*`argument-hint:` - Hint text for prompt picker display.
-[Local Development Setup](#local-development-setup)
78
88
-[Coding Conventions](#coding-conventions)
89
+
-[Copyright and License Headers](#copyright-and-license-headers)
79
90
-[Testing Requirements](#testing-requirements)
80
91
-[When Tests Are Required](#when-tests-are-required)
81
92
-[Test Conventions](#test-conventions)
@@ -175,7 +186,7 @@ When contributing code to the project, please consider the following guidance:
175
186
- Assign an issue to yourself before beginning any effort, and update the issue status accordingly.
176
187
- If an issue for your contribution does not exist, [please file an issue](https://github.com/microsoft/hve-core/issues/new) first to engage with the project maintainers for guidance.
177
188
- Commits should reference related issues for traceability (e.g., "Fixes #123" or "Relates to #456").
178
-
- When creating a PR, use [GitHub's closing keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) in the description to automatically link and close related issues.
189
+
- When creating a PR, use [GitHub's closing keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue) in the description to automatically link and close related issues.
179
190
- All code PRs destined for the `main` branch will be reviewed by pre-determined reviewer groups that are automatically added to each PR.
180
191
181
192
This project also includes a Dev Container for development work, and using that dev container is preferred, to ensure you are using the same toolchains and tool versions as other contributors. You can read more about the Dev Container in its [ReadMe](./.devcontainer/README.md).
0 commit comments