Skip to content

Problems with using shared skills libraries across different harnesses (copilot, claude code), with symlinks and with scripts specifically #1090

@valtterimelkko

Description

@valtterimelkko

Describe the bug

I've tried to create a system, a shared library for skills for both copilot and claude code (I use both of the tools). This is how it looks like:

Skills-Global Repository Structure

Directory Layout

/root/.skills-global/
├── skills-global/          # 30 individual skills
│   ├── notion-*            # 10 Notion skills
│   ├── n8n-*               # 3 N8N skills
│   ├── context7-*          # 2 Context7 skills
│   ├── github-*            # 3 GitHub skills
│   ├── supabase-*          # 3 Supabase skills
│   ├── docx-*, pptx-*      # 5 Document conversion skills
│   ├── youtube-search      # 1 YouTube skill
│   ├── web-search          # 1 Web search skill
│   ├── gmail-search-*      # 1 Gmail skill
│   └── frontend-design     # 1 Design guidance skill
│
└── shared/                 # 9 shared API clients
    ├── notion/             # common.py, search_notes.py, search_projects.py
    ├── n8n/                # n8n_api.py, execute_workflow.py
    ├── context7/           # context7_api.py
    ├── github/             # github_api.py
    ├── supabase/           # supabase_api.py
    └── web/                # web_api.py

Each skill has:

  • SKILL.md - Skill documentation
  • scripts/ - Skill-specific Python scripts

Symlinks for Multi-Assistant Access

Claude Code:
  /root/.claude/skills     → /root/.skills-global/skills-global/
  /root/.claude/shared     → /root/.skills-global/shared/

GitHub Copilot:
  /root/.copilot/skills    → /root/.skills-global/skills-global/
  /root/.copilot/shared    → /root/.skills-global/shared/

Gemini CLI:
  /root/.gemini/skills     → /root/.skills-global/skills-global/
  /root/.gemini/shared     → /root/.skills-global/shared/

Script Organization

Skill-specific scripts (61 total):

  • Located in: skills-global/{skill-name}/scripts/
  • Referenced in SKILL.md as: ./scripts/script.py (relative path)

Shared scripts (9 total):

  • Located in: shared/{domain}/
  • Referenced in SKILL.md as: ~/.claude/shared/{domain}/script.py
  • Used by multiple skills

How It Works

  1. Claude Code reads skills from ~/.claude/skills/ (symlink)
  2. GitHub Copilot reads skills from ~/.copilot/skills/ (symlink)
  3. Gemini CLI reads skills from ~/.gemini/skills/ (symlink)
  4. All three access the same central repository at /root/.skills-global/
  5. Shared scripts are accessible via ~/.claude/shared/, etc.

This enables:

  • Single source of truth for all skills
  • Easy version control with git
  • Shared API clients across multiple skills
  • No code duplication

Now, I've been trying to get copilot to find the scripts the skills use without having to "look around" - but it does not seem very effective. The exact paths to the scripts are included and directly sign-posted at the SKILL.md definition files. . I also believe I have the newest copilot version - I am using the newest codeserver with the newest vscode version.

Here's copilot's own assessment of what was happening in one of the tests:

Thank you for the detailed feedback and context about your skills and scripts setup.

Here’s a summary of my process and observations:

  • I first read the SKILL.md for context7-search, which does specify the script path (resolve_library.py). However, my initial attempt used a path relative to your current working directory and the ai_product_visualizer folder, which failed.
  • I then searched for the script across the workspace, found multiple copies (including resolve_library.py), and used the one in resolve_library.py for the command.
  • I do see the symlinked skills folder and its contents, but my process does not automatically prioritize symlinks or canonical paths unless explicitly directed by the skill file or the environment.
  • The main issue is that my harness does not always resolve relative paths in SKILL.md to the symlinked canonical location, especially if the working directory or context changes. This can lead to unnecessary file searches.

Optimization suggestions:

  • Skills should always reference absolute or canonical paths in SKILL.md, or the harness should resolve relative paths to the symlinked skills location.
  • The agent should prioritize the symlinked skills/scripts directory for all skill-related operations, reducing redundant searches and context confusion.
  • A more robust harness (like Claude Code’s) would cache and resolve skill/script locations, handle symlinks, and ensure consistent access regardless of working directory.

If you want, I can help design a better harness or workflow for skill/script resolution in your environment. Let me know if you’d like a proposal or implementation for that.he newest

Affected version

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions