Skip to content

bug: squad.agent.md SKILL EXTRACTION still directs to legacy .squad/skills/ path (follow-up to #354) #869

@diberry

Description

@diberry

Bug: squad.agent.md SKILL EXTRACTION still directs agents to .squad/skills/ (legacy path)

Related Issues

Problem

The SDK/CLI migration to .copilot/skills/ is complete — skill-source.ts, init.ts, tools/index.ts, templates, and tests all use .copilot/skills/ as the primary path. However, squad.agent.md line 825 still instructs agents to write skills to the legacy path:

SKILL EXTRACTION: If you found a reusable pattern, write/update
    .squad/skills/{skill-name}/SKILL.md (read templates/skill.md for format).

This means every agent session that extracts a skill writes it to .squad/skills/ where:

  • The SDK's write_skill tool won't find it (writes to .copilot/skills/)
  • squad init and squad upgrade won't sync it (targets .copilot/skills/)
  • Copilot's native skill discovery won't see it
  • The skill-source.ts fallback will read it, but only because of legacy compat code

Additional locations in squad.agent.md with the same issue

The spawn template also tells agents to check .squad/skills/ for existing skills:

If .squad/skills/ has relevant SKILL.md files, read them before working.

And the Skill-aware routing section:

Skill-aware routing: Before spawning, check .squad/skills/ for skills relevant...

And the Plugin Marketplace section:

Install: copy to .squad/skills/{plugin-name}/SKILL.md

Also affected: collections.ts state schema

packages/squad-sdk/src/state/collections.ts line 251 still resolves skills to .squad/skills:

const skillsDir = `${this.rootDir}/.squad/skills`;

Fix

  1. squad.agent.md: Change all .squad/skills/ references to .copilot/skills/ in:
    • SKILL EXTRACTION instruction (line 825)
    • Spawn template skill-read instruction
    • Skill-aware routing section
    • Plugin Marketplace install path
  2. collections.ts: Update skillsDir to resolve to .copilot/skills
  3. Keep skill-source.ts fallback to .squad/skills/ for backward compat (already correct)

Impact

Every squad session that extracts a skill creates it in the wrong directory. The skill works due to legacy fallback but diverges from the SDK's canonical path, causing confusion about where skills live.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions