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
{{ message }}
Repository navigation
[Bug]: "install_ai_skills" creates spurious skills from non-speckit agent files when using "--ai copilot --ai-skills" #1858
install_ai_skills creates spurious skills from non-speckit agent files when using --ai copilot --ai-skills
Summary
When running specify init --here --ai copilot --ai-skills in a project that already has custom (non-speckit) agent files in .github/agents/, the install_ai_skills() function treats every.md file in that directory as a spec-kit command template - not just the speckit.* ones. This produces unexpected skill directories for user-authored agents that have nothing to do with spec-kit.
For every other agent type, commands_subdir points to a dedicated directory (e.g. "commands"). For copilot, it points to .github/agents/ - the same directory that holds both spec-kit command agents and user-authored agents.
install_ai_skills() then performs an unfiltered glob:
templates_dir=project_path/agent_folder/commands_subdir# resolves to .github/agents/command_files=sorted(templates_dir.glob("*.md")) # picks up ALL .md files
Every .md file in .github/agents/ becomes a skill candidate, regardless of whether it is a spec-kit command or a user-authored agent.
Add a custom (non-speckit) agent file alongside the generated speckit ones:
cat > .github/agents/my-custom-agent.agent.md << 'EOF'---name: my-custom-agentdescription: "A user-authored agent unrelated to spec-kit"---You are a custom agent.EOF
Simulate a re-init / upgrade
specify init --here --ai copilot --ai-skills
Inspect the generated skills directory:
ls .github/skills/
Expected Behavior
Only speckit-analyze/, speckit-checklist/, etc. (the standard spec-kit commands).
Actual Behavior
Also creates speckit-my-custom-agent.agent/SKILL.md - a skill wrapper for the user's custom agent, with author: github-spec-kit falsely attributed in the frontmatter.
Activity
dhilipkumars commentedon Mar 16, 2026
@darkglow-net would you like to contribute the fix for this bug ? if not feel free to assign this to me ill pick this up this week.
darkglow-net commentedon Mar 17, 2026
Resolved with PR #1867