Skip to content

feat: create agent-specific skill symlinks on install/remove#83

Merged
lmajano merged 2 commits into
developmentfrom
copilot/install-skills-and-create-symlinks
Jul 7, 2026
Merged

feat: create agent-specific skill symlinks on install/remove#83
lmajano merged 2 commits into
developmentfrom
copilot/install-skills-and-create-symlinks

Conversation

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Different AI agents expect skills/context files at their own conventional paths. Without symlinks, skills installed to .agents/skills/ are invisible to agents that scan their own directories (e.g. Claude's .claude/skills/, Cursor's .cursor/rules/).

Changes

AgentRegistry — agent skill-directory registry

  • Added AGENT_SKILLS_DIRS static mapping of agent → relative skills path:
    Agent Skills directory
    claude .claude/skills
    copilot .github/instructions
    cursor .cursor/rules
    codex / gemini / opencode (none — use .agents/skills/ directly)
  • Added getAgentSkillsDirectory(directory, agent) — returns absolute path or null
  • Added createSkillSymlinks(directory, skillName, agents) — creates a relative directory symlink inside each active agent's skills dir pointing back to the canonical path:
    .claude/skills/coldbox-bdd  →  ../../.agents/skills/coldbox-bdd
    
    Falls back with a yellow warning if symlinks are unsupported (e.g. Windows without elevated privileges).
  • Added removeSkillSymlinks(directory, skillName, agents) — only removes genuine symlinks; leaves real directories untouched.

SkillManager — symlink lifecycle hooks

  • Injected AgentRegistry
  • installRemoteSkill() — calls createSkillSymlinks() after writing SKILL.md, using manifest.agents as the active agent set
  • removeSkillFromProject() — calls removeSkillSymlinks() before deleting the canonical directory (loads manifest first so agents are available)
  • deleteSkillDir() — accepts new optional agents parameter; refresh() pruning passes manifest.agents through so orphaned skills also clean up their symlinks

- AgentRegistry: add AGENT_SKILLS_DIRS static mapping per agent
  (claude→.claude/skills, copilot→.github/instructions, cursor→.cursor/rules)
- AgentRegistry: add getAgentSkillsDirectory(), createSkillSymlinks(),
  removeSkillSymlinks() methods
- SkillManager: inject agentRegistry; create symlinks in installRemoteSkill(),
  remove symlinks in removeSkillFromProject() and deleteSkillDir()
- changelog.md: document the new feature
@lmajano lmajano marked this pull request as ready for review July 7, 2026 11:36
@lmajano lmajano merged commit 64fdbdd into development Jul 7, 2026
3 of 5 checks passed
@lmajano lmajano deleted the copilot/install-skills-and-create-symlinks branch July 7, 2026 11:37
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.

2 participants