fix(ai-skills): exclude non-speckit copilot agent markdown from skill…#1867
Open
darkglow-net wants to merge 1 commit intogithub:mainfrom
Open
fix(ai-skills): exclude non-speckit copilot agent markdown from skill…#1867darkglow-net wants to merge 1 commit intogithub:mainfrom
darkglow-net wants to merge 1 commit intogithub:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes #1858 by preventing install_ai_skills() from generating skills from non–spec-kit GitHub Copilot agent markdown files that may coexist in .github/agents/.
Changes:
- Update
install_ai_skills()to filter Copilot templates tospeckit.*.md. - Update the all-agents skills installation test to respect
commands_subdirand adjust Copilot’s template filename. - Add a new test ensuring non-speckit Copilot agent markdown files are ignored during skill generation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/specify_cli/__init__.py |
Adds Copilot-specific template globbing to avoid converting unrelated .md files into skills. |
tests/test_ai_skills.py |
Updates fixture setup to follow commands_subdir and adds coverage for ignoring non-speckit Copilot agent files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1184
to
+1187
| if selected_ai == "copilot": | ||
| command_files = sorted(templates_dir.glob("speckit.*.md")) | ||
| else: | ||
| command_files = sorted(templates_dir.glob("*.md")) |
Comment on lines
+436
to
+437
| # Copilot filters for speckit.*.md; other agents use plain names | ||
| fname = "speckit.specify.md" if agent_key == "copilot" else "specify.md" |
Comment on lines
+458
to
+463
| (agents_dir / "speckit.plan.md").write_text( | ||
| "---\ndescription: Generate implementation plan.\n---\n\n# Plan\n\nBody.\n" | ||
| ) | ||
| (agents_dir / "other-agent.agent.md").write_text( | ||
| "---\ndescription: Some other agent\n---\n\n# Other\n\nBody.\n" | ||
| ) |
mnriem
requested changes
Mar 16, 2026
Collaborator
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback. If not applicable please explain why
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.
Description
Fix issue #1858 -
install_ai_skillscreates spurious skills from non-speckit agent files when using--ai copilot --ai-skillsFix:
install_ai_skills()now filters copilot command templates tospeckit.*.md- preventing user-authored agent files in agents from being incorrectly converted into skills.Other agents are unaffected since their
commands_subdirdirectories contain only speckit templates.Test: Adds
test_copilot_ignores_non_speckit_agentsto verify that non-speckit markdown files (e.g.other-agent.agent.md) in the shared agents directory are excluded from skill generation.Testing
.github/agents/specify init --ai copilot --ai-skills --here.github/skills/AI Disclosure
RCA and remediation developed with Github Copilot. Code review conducted with Opus 4.6.