fix: remove unsupported mode: frontmatter from Copilot skills mode#2819
Merged
mnriem merged 1 commit intoJun 2, 2026
Conversation
…ixes github#2799) VS Code Copilot Agent Skills do not support the `mode:` frontmatter field. The generated SKILL.md files included `mode: speckit.<stem>` injected by CopilotIntegration.post_process_skill_content(), which had no effect in VS Code and could cause confusion. Simplify post_process_skill_content to delegate directly to _CopilotSkillsHelper without injecting mode:. Update tests to assert mode: is absent from generated skill frontmatter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Copilot skills-mode generation by removing the unsupported mode: frontmatter field from generated SKILL.md files, aligning output with VS Code Copilot Agent Skills’ supported frontmatter schema.
Changes:
- Simplifies
CopilotIntegration.post_process_skill_content()to delegate to_CopilotSkillsHelperwithout injectingmode:. - Updates Copilot integration tests to assert
mode:is not injected and is absent from generated skills. - Updates the integration switch test to validate Copilot skills-mode extension skills don’t include
mode:.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/integrations/copilot/__init__.py |
Removes custom frontmatter parsing/injection logic and stops adding unsupported mode: to Copilot skills. |
tests/integrations/test_integration_copilot.py |
Updates/renames tests to assert mode: is not injected and not present in generated SKILL.md frontmatter. |
tests/integrations/test_integration_subcommand.py |
Adjusts Copilot skills-mode extension migration test to assert mode: is absent from the generated skill file. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 0
Collaborator
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2799
Summary
mode:frontmatter field injected intoSKILL.mdfiles when initializing with--integration copilot --integration-options "--skills"mode:as a valid frontmatter field — the Agent Skills spec only recognizesname,description,user-invocable, anddisable-model-invocationCopilotIntegration.post_process_skill_content()asmode: speckit.<stem>(e.g.mode: speckit.plan). After removing it, Copilot correctly picks up and executes the generated skillsChanges
src/specify_cli/integrations/copilot/__init__.pypost_process_skill_content()to delegate directly to_CopilotSkillsHelper.post_process_skill_content()without injectingmode:tests/integrations/test_integration_copilot.pytest_post_process_skill_content_injects_mode→test_post_process_skill_content_does_not_inject_mode: assertsmode:is absenttest_post_process_skill_content_injects_hook_note: removes assertion formode:, retains assertion for shared hook guidance (replace dots)test_skills_have_mode_in_frontmatter→test_skills_do_not_have_mode_in_frontmatter: asserts generated SKILL.md files have nomodekey in frontmattertests/integrations/test_integration_subcommand.pymode:is absent from generatedSKILL.mdTest plan
uv run --extra test pytest tests/integrations/test_integration_copilot.py tests/integrations/test_integration_subcommand.py -vspecify init --here --integration copilot --integration-options "--skills"and confirm generatedSKILL.mdfiles contain nomode:field🤖 Generated with Claude Code