Skip to content

fix: remove unsupported mode: frontmatter from Copilot skills mode#2819

Merged
mnriem merged 1 commit into
github:mainfrom
lselvar:fix/2799-copilot-skills-mode-remove-unsupported-mode-frontmatter
Jun 2, 2026
Merged

fix: remove unsupported mode: frontmatter from Copilot skills mode#2819
mnriem merged 1 commit into
github:mainfrom
lselvar:fix/2799-copilot-skills-mode-remove-unsupported-mode-frontmatter

Conversation

@lselvar
Copy link
Copy Markdown
Contributor

@lselvar lselvar commented Jun 2, 2026

Fixes #2799

Summary

  • Removes the mode: frontmatter field injected into SKILL.md files when initializing with --integration copilot --integration-options "--skills"
  • VS Code Copilot Agent Skills do not support mode: as a valid frontmatter field — the Agent Skills spec only recognizes name, description, user-invocable, and disable-model-invocation
  • The field was injected by CopilotIntegration.post_process_skill_content() as mode: speckit.<stem> (e.g. mode: speckit.plan). After removing it, Copilot correctly picks up and executes the generated skills

Changes

src/specify_cli/integrations/copilot/__init__.py

  • Simplified post_process_skill_content() to delegate directly to _CopilotSkillsHelper.post_process_skill_content() without injecting mode:
  • Removed ~50 lines of frontmatter-parsing and injection logic

tests/integrations/test_integration_copilot.py

  • test_post_process_skill_content_injects_modetest_post_process_skill_content_does_not_inject_mode: asserts mode: is absent
  • test_post_process_skill_content_injects_hook_note: removes assertion for mode:, retains assertion for shared hook guidance (replace dots)
  • test_skills_have_mode_in_frontmattertest_skills_do_not_have_mode_in_frontmatter: asserts generated SKILL.md files have no mode key in frontmatter

tests/integrations/test_integration_subcommand.py

  • Updated Copilot extension skills test to assert mode: is absent from generated SKILL.md

Test plan

  • Run focused tests:
    uv run --extra test pytest tests/integrations/test_integration_copilot.py tests/integrations/test_integration_subcommand.py -v
    Expected: 110 passed
  • Run specify init --here --integration copilot --integration-options "--skills" and confirm generated SKILL.md files contain no mode: field
  • Confirm Copilot correctly discovers and executes the generated skills in VS Code after the fix

AI disclosure: This PR was developed with Claude Code assistance.

🤖 Generated with Claude Code

…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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 _CopilotSkillsHelper without injecting mode:.
  • 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

@mnriem mnriem merged commit d79a514 into github:main Jun 2, 2026
11 checks passed
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Jun 2, 2026

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Copilot skills mode generates unsupported mode frontmatter in SKILL.md

3 participants