feat: support Copilot CLI frontmatter fields (user-invocable, disable-model-invocation)#5
Conversation
…-model-invocation) Add support for new Copilot CLI skill frontmatter fields: - user-invocable (boolean): whether users can invoke via /skill-name - disable-model-invocation (boolean): prevent model from invoking skill - allowed-tools: validate format when present New checks in score.ts: - spec-user-invocable: validates boolean value when present - spec-disable-model-invocation: validates boolean value when present - spec-allowed-tools: validates non-empty when present - reference-only-pattern: detects user-invocable=false + disable-model-invocation=true (creates a reference file loaded from disk but never invoked) Updated ALLOWED_FIELDS to prevent false positive warnings on valid fields. Updated scoring.md and SKILL.md documentation with new field patterns. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@charris-msft These are not in the official skills spec. How would a user know when or what these options or guidance to use or not. Can you supply reference link for these fields spec? |
|
Good call — these fields are not in the agentskills.io spec; they're Copilot CLI extensions documented here: 📎 Custom agents configuration — YAML frontmatter properties I've pushed a commit (9af511d) that adds this reference link in two places:
All 109 tests pass and token limits are within budget. ✅ |
This looks like the right location: It only has one of the properties right now, but the other should show up here once the GH team adds it. |
spboyer
left a comment
There was a problem hiding this comment.
Two items from review:
1. Bug: ALLOWED_FIELDS may not include the new fields
The PR description says "Updated ALLOWED_FIELDS to prevent false positive warnings" -- but please verify user-invocable and disable-model-invocation are actually in the ALLOWED_FIELDS Set. If they're missing, any skill using these valid Copilot CLI fields will trigger a false spec-allowed-fields warning ("Unknown frontmatter fields"), even though the PR adds dedicated check functions for them.
2. Scoring posture: these are Copilot-specific, not global spec
user-invocable, disable-model-invocation, and allowed-tools are Copilot CLI extensions -- not part of the agentskills.io specification. Their absence should not negatively affect scoring. The checks should be purely informational:
- Present and valid -> note it (optimal or ok)
- Not present -> silent pass (not a warning)
- Present but invalid value -> warn (e.g. non-boolean for user-invocable)
The current implementation looks like it returns ok when absent, which is correct -- but the spec- prefix on the check names implies these are spec requirements. Consider either:
- Renaming to
copilot-user-invocable/copilot-disable-model-invocation/copilot-allowed-toolsto make it clear these are platform extensions - Or adding a note in the output/docs that these checks enhance Copilot experience but are not required for spec compliance
Nice work overall -- the reference-only pattern detection is a useful addition.
… custom agent fields
|
Correction: The link I added earlier was wrong — it pointed to the custom agents configuration docs (.agent.md), not skills. After checking the Copilot agent runtime source, these fields are valid for SKILL.md — they're defined in the
|
…hecks Addresses review feedback: these checks validate Copilot-specific fields, not agentskills.io spec requirements. The copilot- prefix makes this distinction self-documenting in output. Renamed checks: - spec-user-invocable -> copilot-user-invocable - spec-disable-model-invocation -> copilot-disable-model-invocation - spec-allowed-tools -> copilot-allowed-tools - reference-only-pattern -> copilot-reference-only-pattern
|
Addressed both review items: 1. ALLOWED_FIELDSConfirmed -- 2. Renamed spec- to copilot- prefixRenamed all Copilot-specific checks to make the distinction self-documenting:
Updated in score.ts, score.test.ts, and scoring.md. All 109 tests pass. (cb2c53f) |
|
@charris-msft some merge conflicts to check |
|
@spboyer - conflicts resolved. Thanks for the heads up. |
Add support for new Copilot CLI skill frontmatter fields:
New checks in score.ts:
Updated ALLOWED_FIELDS to prevent false positive warnings on valid fields. Updated scoring.md and SKILL.md documentation with new field patterns.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com